diff --git a/esphome/components/mhz19/mhz19.cpp b/esphome/components/mhz19/mhz19.cpp index f110dc8dcc..b6b4031e16 100644 --- a/esphome/components/mhz19/mhz19.cpp +++ b/esphome/components/mhz19/mhz19.cpp @@ -3,8 +3,7 @@ #include -namespace esphome { -namespace mhz19 { +namespace esphome::mhz19 { static const char *const TAG = "mhz19"; static const uint8_t MHZ19_REQUEST_LENGTH = 8; @@ -156,5 +155,4 @@ void MHZ19Component::dump_config() { ESP_LOGCONFIG(TAG, " Detection range: %s", LOG_STR_ARG(detection_range_to_log_string(this->detection_range_))); } -} // namespace mhz19 -} // namespace esphome +} // namespace esphome::mhz19 diff --git a/esphome/components/mhz19/mhz19.h b/esphome/components/mhz19/mhz19.h index f7ceefd16d..a27f1c31eb 100644 --- a/esphome/components/mhz19/mhz19.h +++ b/esphome/components/mhz19/mhz19.h @@ -5,8 +5,7 @@ #include "esphome/components/sensor/sensor.h" #include "esphome/components/uart/uart.h" -namespace esphome { -namespace mhz19 { +namespace esphome::mhz19 { enum MHZ19ABCLogic { MHZ19_ABC_NONE = 0, @@ -74,5 +73,4 @@ template class MHZ19DetectionRangeSetAction : public Actionparent_->range_set(this->detection_range_.value(x...)); } }; -} // namespace mhz19 -} // namespace esphome +} // namespace esphome::mhz19