[switch] Use C++17 nested namespace syntax (#14241)

This commit is contained in:
J. Nick Koston authored and GitHub committed 2026-02-23 20:49:15 -05:00
1 parent 30cc51eac9
commit 843d06df3f
6 files changed
+16 -28

No files matched your search

@@ -1,8 +1,7 @@
#include "switch_binary_sensor.h"
#include "esphome/core/log.h"
namespace esphome {
namespace switch_ {
namespace esphome::switch_ {
static const char *const TAG = "switch.binary_sensor";
@@ -13,5 +12,4 @@ void SwitchBinarySensor::setup() {
void SwitchBinarySensor::dump_config() { LOG_BINARY_SENSOR("", "Switch Binary Sensor", this); }
} // namespace switch_
} // namespace esphome
} // namespace esphome::switch_
@@ -4,8 +4,7 @@
#include "esphome/core/component.h"
#include "esphome/components/binary_sensor/binary_sensor.h"
namespace esphome {
namespace switch_ {
namespace esphome::switch_ {
class SwitchBinarySensor : public binary_sensor::BinarySensor, public Component {
public:
@@ -17,5 +16,4 @@ class SwitchBinarySensor : public binary_sensor::BinarySensor, public Component
Switch *source_;
};
} // namespace switch_
} // namespace esphome
} // namespace esphome::switch_