diff --git a/esphome/components/safe_mode/automation.h b/esphome/components/safe_mode/automation.h index 22395a51f2..952ed4da33 100644 --- a/esphome/components/safe_mode/automation.h +++ b/esphome/components/safe_mode/automation.h @@ -6,8 +6,7 @@ #include "esphome/core/automation.h" -namespace esphome { -namespace safe_mode { +namespace esphome::safe_mode { class SafeModeTrigger : public Trigger<> { public: @@ -16,7 +15,6 @@ class SafeModeTrigger : public Trigger<> { } }; -} // namespace safe_mode -} // namespace esphome +} // namespace esphome::safe_mode #endif // USE_SAFE_MODE_CALLBACK diff --git a/esphome/components/safe_mode/safe_mode.cpp b/esphome/components/safe_mode/safe_mode.cpp index 48776c7983..ef6ebea247 100644 --- a/esphome/components/safe_mode/safe_mode.cpp +++ b/esphome/components/safe_mode/safe_mode.cpp @@ -13,8 +13,7 @@ #include #endif -namespace esphome { -namespace safe_mode { +namespace esphome::safe_mode { static const char *const TAG = "safe_mode"; @@ -159,5 +158,4 @@ void SafeModeComponent::on_safe_shutdown() { this->clean_rtc(); } -} // namespace safe_mode -} // namespace esphome +} // namespace esphome::safe_mode diff --git a/esphome/components/safe_mode/safe_mode.h b/esphome/components/safe_mode/safe_mode.h index 3b6c6ab07b..4aefd11458 100644 --- a/esphome/components/safe_mode/safe_mode.h +++ b/esphome/components/safe_mode/safe_mode.h @@ -5,8 +5,7 @@ #include "esphome/core/helpers.h" #include "esphome/core/preferences.h" -namespace esphome { -namespace safe_mode { +namespace esphome::safe_mode { /// SafeModeComponent provides a safe way to recover from repeated boot failures class SafeModeComponent : public Component { @@ -53,5 +52,4 @@ class SafeModeComponent : public Component { 0x5afe5afe; ///< a magic number to indicate that safe mode should be entered on next boot }; -} // namespace safe_mode -} // namespace esphome +} // namespace esphome::safe_mode