[version] Use C++17 nested namespace syntax

This commit is contained in:
J. Nick Koston
2026-02-23 18:20:08 -06:00
parent 869678953d
commit 249b0555a9
2 changed files with 4 additions and 8 deletions
@@ -5,8 +5,7 @@
#include "esphome/core/helpers.h"
#include "esphome/core/progmem.h"
namespace esphome {
namespace version {
namespace esphome::version {
static const char *const TAG = "version.text_sensor";
@@ -35,5 +34,4 @@ void VersionTextSensor::setup() {
void VersionTextSensor::set_hide_timestamp(bool hide_timestamp) { this->hide_timestamp_ = hide_timestamp; }
void VersionTextSensor::dump_config() { LOG_TEXT_SENSOR("", "Version Text Sensor", this); }
} // namespace version
} // namespace esphome
} // namespace esphome::version
@@ -3,8 +3,7 @@
#include "esphome/core/component.h"
#include "esphome/components/text_sensor/text_sensor.h"
namespace esphome {
namespace version {
namespace esphome::version {
class VersionTextSensor : public text_sensor::TextSensor, public Component {
public:
@@ -16,5 +15,4 @@ class VersionTextSensor : public text_sensor::TextSensor, public Component {
bool hide_timestamp_{false};
};
} // namespace version
} // namespace esphome
} // namespace esphome::version