[clang-tidy] Concatenate nested namespaces (3/7: components i-m) (#16297)

This commit is contained in:
Jonathan Swoboda
2026-05-07 19:00:17 -04:00
committed by GitHub
parent 56ef357162
commit cbe192df49
250 changed files with 508 additions and 1013 deletions

View File

@@ -3,8 +3,7 @@
#include "esphome/core/hal.h"
#include <cinttypes>
namespace esphome {
namespace i2c_device {
namespace esphome::i2c_device {
static const char *const TAG = "i2c_device";
@@ -13,5 +12,4 @@ void I2CDeviceComponent::dump_config() {
LOG_I2C_DEVICE(this);
}
} // namespace i2c_device
} // namespace esphome
} // namespace esphome::i2c_device

View File

@@ -3,8 +3,7 @@
#include "esphome/core/component.h"
#include "esphome/components/i2c/i2c.h"
namespace esphome {
namespace i2c_device {
namespace esphome::i2c_device {
class I2CDeviceComponent : public Component, public i2c::I2CDevice {
public:
@@ -13,5 +12,4 @@ class I2CDeviceComponent : public Component, public i2c::I2CDevice {
protected:
};
} // namespace i2c_device
} // namespace esphome
} // namespace esphome::i2c_device

View File

@@ -8,8 +8,7 @@
#include <esp_idf_version.h>
#include <driver/i2s_std.h>
namespace esphome {
namespace i2s_audio {
namespace esphome::i2s_audio {
class I2SAudioComponent;
@@ -77,7 +76,6 @@ class I2SAudioComponent : public Component {
int port_{};
};
} // namespace i2s_audio
} // namespace esphome
} // namespace esphome::i2s_audio
#endif // USE_ESP32

View File

@@ -10,8 +10,7 @@
#include "esphome/components/audio/audio.h"
namespace esphome {
namespace i2s_audio {
namespace esphome::i2s_audio {
static const UBaseType_t MAX_LISTENERS = 16;
@@ -426,7 +425,6 @@ void I2SAudioMicrophone::loop() {
}
}
} // namespace i2s_audio
} // namespace esphome
} // namespace esphome::i2s_audio
#endif // USE_ESP32

View File

@@ -12,8 +12,7 @@
#include <freertos/semphr.h>
#include <freertos/task.h>
namespace esphome {
namespace i2s_audio {
namespace esphome::i2s_audio {
class I2SAudioMicrophone : public I2SAudioIn, public microphone::Microphone, public Component {
public:
@@ -65,7 +64,6 @@ class I2SAudioMicrophone : public I2SAudioIn, public microphone::Microphone, pub
int32_t dc_offset_prev_output_{0};
};
} // namespace i2s_audio
} // namespace esphome
} // namespace esphome::i2s_audio
#endif // USE_ESP32

View File

@@ -3,8 +3,7 @@
#include "esphome/core/helpers.h"
#include "esphome/core/log.h"
namespace esphome {
namespace iaqcore {
namespace esphome::iaqcore {
static const char *const TAG = "iaqcore";
@@ -97,5 +96,4 @@ void IAQCore::dump_config() {
LOG_SENSOR(" ", "TVOC", this->tvoc_);
}
} // namespace iaqcore
} // namespace esphome
} // namespace esphome::iaqcore

View File

@@ -4,8 +4,7 @@
#include "esphome/components/sensor/sensor.h"
#include "esphome/components/i2c/i2c.h"
namespace esphome {
namespace iaqcore {
namespace esphome::iaqcore {
class IAQCore : public PollingComponent, public i2c::I2CDevice {
public:
@@ -23,5 +22,4 @@ class IAQCore : public PollingComponent, public i2c::I2CDevice {
void publish_nans_();
};
} // namespace iaqcore
} // namespace esphome
} // namespace esphome::iaqcore

View File

@@ -2,8 +2,7 @@
#include <cstdint>
namespace esphome {
namespace ili9xxx {
namespace esphome::ili9xxx {
// Color definitions
// clang-format off
@@ -98,5 +97,4 @@ static const uint8_t ILI9XXX_DELAY_FLAG = 0xFF;
// special marker for delay - command byte reprents ms, length byte is an impossible value
#define ILI9XXX_DELAY(ms) ((uint8_t) ((ms) | 0x80)), ILI9XXX_DELAY_FLAG
} // namespace ili9xxx
} // namespace esphome
} // namespace esphome::ili9xxx

View File

@@ -4,8 +4,7 @@
#include "esphome/core/helpers.h"
#include "esphome/core/log.h"
namespace esphome {
namespace ili9xxx {
namespace esphome::ili9xxx {
static const uint16_t SPI_SETUP_US = 100; // estimated fixed overhead in microseconds for an SPI write
static const uint16_t SPI_MAX_BLOCK_SIZE = 4092; // Max size of continuous SPI transfer
@@ -470,5 +469,4 @@ void ILI9XXXDisplay::invert_colors(bool invert) {
int ILI9XXXDisplay::get_width_internal() { return this->width_; }
int ILI9XXXDisplay::get_height_internal() { return this->height_; }
} // namespace ili9xxx
} // namespace esphome
} // namespace esphome::ili9xxx

View File

@@ -5,8 +5,7 @@
#include "ili9xxx_defines.h"
#include "ili9xxx_init.h"
namespace esphome {
namespace ili9xxx {
namespace esphome::ili9xxx {
static const char *const TAG = "ili9xxx";
const size_t ILI9XXX_TRANSFER_BUFFER_SIZE = 126; // ensure this is divisible by 6
@@ -283,5 +282,4 @@ class ILI9XXXST7735 : public ILI9XXXDisplay {
ILI9XXXST7735() : ILI9XXXDisplay(INITCMD_ST7735, 128, 160) {}
};
} // namespace ili9xxx
} // namespace esphome
} // namespace esphome::ili9xxx

View File

@@ -3,8 +3,7 @@
#include <cinttypes>
namespace esphome {
namespace ili9xxx {
namespace esphome::ili9xxx {
// clang-format off
static constexpr uint8_t PROGMEM INITCMD_M5STACK[] = {
@@ -478,5 +477,4 @@ static constexpr uint8_t PROGMEM INITCMD_ST7735[] = {
};
// clang-format on
} // namespace ili9xxx
} // namespace esphome
} // namespace esphome::ili9xxx

View File

@@ -3,8 +3,7 @@
#include "esphome/core/hal.h"
#include "esphome/core/helpers.h"
namespace esphome {
namespace image {
namespace esphome::image {
void Image::draw(int x, int y, display::Display *display, Color color_on, Color color_off) {
int img_x0 = 0;
@@ -243,5 +242,4 @@ Image::Image(const uint8_t *data_start, int width, int height, ImageType type, T
}
}
} // namespace image
} // namespace esphome
} // namespace esphome::image

View File

@@ -6,8 +6,7 @@
#include "esphome/components/lvgl/lvgl_proxy.h"
#endif // USE_LVGL
namespace esphome {
namespace image {
namespace esphome::image {
enum ImageType {
IMAGE_TYPE_BINARY = 0,
@@ -61,5 +60,4 @@ class Image : public display::BaseImage {
#endif
};
} // namespace image
} // namespace esphome
} // namespace esphome::image

View File

@@ -5,8 +5,7 @@
#include "esphome/core/application.h"
#include "esphome/core/defines.h"
namespace esphome {
namespace improv_base {
namespace esphome::improv_base {
#if defined(USE_ESP32_IMPROV_NEXT_URL) || defined(USE_IMPROV_SERIAL_NEXT_URL)
static constexpr const char DEVICE_NAME_PLACEHOLDER[] = "{{device_name}}";
@@ -65,5 +64,4 @@ size_t ImprovBase::get_formatted_next_url_(char *buffer, size_t buffer_size) {
}
#endif
} // namespace improv_base
} // namespace esphome
} // namespace esphome::improv_base

View File

@@ -3,8 +3,7 @@
#include <cstddef>
#include "esphome/core/defines.h"
namespace esphome {
namespace improv_base {
namespace esphome::improv_base {
class ImprovBase {
public:
@@ -20,5 +19,4 @@ class ImprovBase {
#endif
};
} // namespace improv_base
} // namespace esphome
} // namespace esphome::improv_base

View File

@@ -8,8 +8,7 @@
#include "esphome/components/logger/logger.h"
namespace esphome {
namespace improv_serial {
namespace esphome::improv_serial {
static const char *const TAG = "improv_serial";
@@ -329,6 +328,6 @@ void ImprovSerialComponent::on_wifi_connect_timeout_() {
ImprovSerialComponent *global_improv_serial_component = // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
nullptr; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
} // namespace improv_serial
} // namespace esphome
} // namespace esphome::improv_serial
#endif

View File

@@ -23,8 +23,7 @@
#include <HardwareSerial.h>
#endif
namespace esphome {
namespace improv_serial {
namespace esphome::improv_serial {
// TX buffer layout constants
static constexpr uint8_t TX_HEADER_SIZE = 6; // Bytes 0-5 = "IMPROV"
@@ -99,6 +98,6 @@ class ImprovSerialComponent : public Component, public improv_base::ImprovBase {
extern ImprovSerialComponent
*global_improv_serial_component; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
} // namespace improv_serial
} // namespace esphome
} // namespace esphome::improv_serial
#endif

View File

@@ -2,8 +2,7 @@
#include "esphome/core/log.h"
#include "esphome/core/hal.h"
namespace esphome {
namespace ina219 {
namespace esphome::ina219 {
static const char *const TAG = "ina219";
@@ -196,5 +195,4 @@ void INA219Component::update() {
this->status_clear_warning();
}
} // namespace ina219
} // namespace esphome
} // namespace esphome::ina219

View File

@@ -6,8 +6,7 @@
#include <cinttypes>
namespace esphome {
namespace ina219 {
namespace esphome::ina219 {
class INA219Component : public PollingComponent, public i2c::I2CDevice {
public:
@@ -35,5 +34,4 @@ class INA219Component : public PollingComponent, public i2c::I2CDevice {
sensor::Sensor *power_sensor_{nullptr};
};
} // namespace ina219
} // namespace esphome
} // namespace esphome::ina219

View File

@@ -3,8 +3,7 @@
#include "esphome/core/hal.h"
#include <cinttypes>
namespace esphome {
namespace ina226 {
namespace esphome::ina226 {
static const char *const TAG = "ina226";
@@ -161,5 +160,4 @@ int32_t INA226Component::twos_complement_(int32_t val, uint8_t bits) {
return val;
}
} // namespace ina226
} // namespace esphome
} // namespace esphome::ina226

View File

@@ -4,8 +4,7 @@
#include "esphome/components/sensor/sensor.h"
#include "esphome/components/i2c/i2c.h"
namespace esphome {
namespace ina226 {
namespace esphome::ina226 {
enum AdcTime : uint16_t {
ADC_TIME_140US = 0,
@@ -73,5 +72,4 @@ class INA226Component : public PollingComponent, public i2c::I2CDevice {
int32_t twos_complement_(int32_t val, uint8_t bits);
};
} // namespace ina226
} // namespace esphome
} // namespace esphome::ina226

View File

@@ -2,8 +2,7 @@
#include "esphome/core/log.h"
#include "esphome/core/hal.h"
namespace esphome {
namespace ina260 {
namespace esphome::ina260 {
static const char *const TAG = "ina260";
@@ -122,5 +121,4 @@ void INA260Component::update() {
this->status_clear_warning();
}
} // namespace ina260
} // namespace esphome
} // namespace esphome::ina260

View File

@@ -4,8 +4,7 @@
#include "esphome/components/sensor/sensor.h"
#include "esphome/components/i2c/i2c.h"
namespace esphome {
namespace ina260 {
namespace esphome::ina260 {
class INA260Component : public PollingComponent, public i2c::I2CDevice {
public:
@@ -33,5 +32,4 @@ class INA260Component : public PollingComponent, public i2c::I2CDevice {
} error_code_{NONE};
};
} // namespace ina260
} // namespace esphome
} // namespace esphome::ina260

View File

@@ -5,8 +5,7 @@
#include <cinttypes>
#include <cmath>
namespace esphome {
namespace ina2xx_base {
namespace esphome::ina2xx_base {
static const char *const TAG = "ina2xx";
@@ -600,5 +599,4 @@ bool INA2XX::read_unsigned_16_(uint8_t reg, uint16_t &out) {
int64_t INA2XX::two_complement_(uint64_t value, uint8_t bits) {
return (int64_t) (value << (64 - bits)) >> (64 - bits);
}
} // namespace ina2xx_base
} // namespace esphome
} // namespace esphome::ina2xx_base

View File

@@ -3,8 +3,7 @@
#include "esphome/core/component.h"
#include "esphome/components/sensor/sensor.h"
namespace esphome {
namespace ina2xx_base {
namespace esphome::ina2xx_base {
enum RegisterMap : uint8_t {
REG_CONFIG = 0x00,
@@ -250,5 +249,4 @@ class INA2XX : public PollingComponent {
virtual bool read_ina_register(uint8_t a_register, uint8_t *data, size_t len) = 0;
virtual bool write_ina_register(uint8_t a_register, const uint8_t *data, size_t len) = 0;
};
} // namespace ina2xx_base
} // namespace esphome
} // namespace esphome::ina2xx_base

View File

@@ -1,8 +1,7 @@
#include "ina2xx_i2c.h"
#include "esphome/core/log.h"
namespace esphome {
namespace ina2xx_i2c {
namespace esphome::ina2xx_i2c {
static const char *const TAG = "ina2xx_i2c";
@@ -35,5 +34,4 @@ bool INA2XXI2C::write_ina_register(uint8_t reg, const uint8_t *data, size_t len)
}
return ret == i2c::ERROR_OK;
}
} // namespace ina2xx_i2c
} // namespace esphome
} // namespace esphome::ina2xx_i2c

View File

@@ -4,8 +4,7 @@
#include "esphome/components/ina2xx_base/ina2xx_base.h"
#include "esphome/components/i2c/i2c.h"
namespace esphome {
namespace ina2xx_i2c {
namespace esphome::ina2xx_i2c {
class INA2XXI2C : public ina2xx_base::INA2XX, public i2c::I2CDevice {
public:
@@ -17,5 +16,4 @@ class INA2XXI2C : public ina2xx_base::INA2XX, public i2c::I2CDevice {
bool write_ina_register(uint8_t reg, const uint8_t *data, size_t len) override;
};
} // namespace ina2xx_i2c
} // namespace esphome
} // namespace esphome::ina2xx_i2c

View File

@@ -1,8 +1,7 @@
#include "ina2xx_spi.h"
#include "esphome/core/log.h"
namespace esphome {
namespace ina2xx_spi {
namespace esphome::ina2xx_spi {
static const char *const TAG = "ina2xx_spi";
@@ -34,5 +33,4 @@ bool INA2XXSPI::write_ina_register(uint8_t reg, const uint8_t *data, size_t len)
this->disable();
return true;
}
} // namespace ina2xx_spi
} // namespace esphome
} // namespace esphome::ina2xx_spi

View File

@@ -4,8 +4,7 @@
#include "esphome/components/ina2xx_base/ina2xx_base.h"
#include "esphome/components/spi/spi.h"
namespace esphome {
namespace ina2xx_spi {
namespace esphome::ina2xx_spi {
class INA2XXSPI : public ina2xx_base::INA2XX,
public spi::SPIDevice<spi::BIT_ORDER_MSB_FIRST, spi::CLOCK_POLARITY_LOW, spi::CLOCK_PHASE_TRAILING,
@@ -18,5 +17,4 @@ class INA2XXSPI : public ina2xx_base::INA2XX,
bool read_ina_register(uint8_t reg, uint8_t *data, size_t len) override;
bool write_ina_register(uint8_t reg, const uint8_t *data, size_t len) override;
};
} // namespace ina2xx_spi
} // namespace esphome
} // namespace esphome::ina2xx_spi

View File

@@ -2,8 +2,7 @@
#include "esphome/core/log.h"
#include "esphome/core/hal.h"
namespace esphome {
namespace ina3221 {
namespace esphome::ina3221 {
static const char *const TAG = "ina3221";
@@ -128,5 +127,4 @@ bool INA3221Component::INA3221Channel::should_measure_bus_voltage() {
return this->bus_voltage_sensor_ != nullptr || this->power_sensor_ != nullptr;
}
} // namespace ina3221
} // namespace esphome
} // namespace esphome::ina3221

View File

@@ -4,8 +4,7 @@
#include "esphome/components/sensor/sensor.h"
#include "esphome/components/i2c/i2c.h"
namespace esphome {
namespace ina3221 {
namespace esphome::ina3221 {
class INA3221Component : public PollingComponent, public i2c::I2CDevice {
public:
@@ -35,5 +34,4 @@ class INA3221Component : public PollingComponent, public i2c::I2CDevice {
} channels_[3];
};
} // namespace ina3221
} // namespace esphome
} // namespace esphome::ina3221

View File

@@ -3,8 +3,7 @@
#ifdef USE_ESP32
namespace esphome {
namespace inkbird_ibsth1_mini {
namespace esphome::inkbird_ibsth1_mini {
static const char *const TAG = "inkbird_ibsth1_mini";
@@ -104,7 +103,6 @@ bool InkbirdIbstH1Mini::parse_device(const esp32_ble_tracker::ESPBTDevice &devic
return true;
}
} // namespace inkbird_ibsth1_mini
} // namespace esphome
} // namespace esphome::inkbird_ibsth1_mini
#endif

View File

@@ -6,8 +6,7 @@
#ifdef USE_ESP32
namespace esphome {
namespace inkbird_ibsth1_mini {
namespace esphome::inkbird_ibsth1_mini {
class InkbirdIbstH1Mini : public Component, public esp32_ble_tracker::ESPBTDeviceListener {
public:
@@ -29,7 +28,6 @@ class InkbirdIbstH1Mini : public Component, public esp32_ble_tracker::ESPBTDevic
sensor::Sensor *battery_level_{nullptr};
};
} // namespace inkbird_ibsth1_mini
} // namespace esphome
} // namespace esphome::inkbird_ibsth1_mini
#endif

View File

@@ -7,8 +7,7 @@
#include <hal/gpio_hal.h>
namespace esphome {
namespace inkplate {
namespace esphome::inkplate {
static const char *const TAG = "inkplate";
@@ -820,5 +819,4 @@ void Inkplate::pins_as_outputs_() {
this->display_data_7_pin_->pin_mode(gpio::FLAG_OUTPUT);
}
} // namespace inkplate
} // namespace esphome
} // namespace esphome::inkplate

View File

@@ -7,8 +7,7 @@
#include <array>
namespace esphome {
namespace inkplate {
namespace esphome::inkplate {
enum InkplateModel : uint8_t {
INKPLATE_6 = 0,
@@ -210,5 +209,4 @@ class Inkplate : public display::DisplayBuffer, public i2c::I2CDevice {
GPIOPin *wakeup_pin_;
};
} // namespace inkplate
} // namespace esphome
} // namespace esphome::inkplate

View File

@@ -3,8 +3,7 @@
#include "esphome/core/helpers.h"
#include "esphome/core/log.h"
namespace esphome {
namespace integration {
namespace esphome::integration {
static const char *const TAG = "integration";
@@ -47,5 +46,4 @@ void IntegrationSensor::process_sensor_value_(float value) {
this->publish_and_save_(this->result_ + area);
}
} // namespace integration
} // namespace esphome
} // namespace esphome::integration

View File

@@ -6,8 +6,7 @@
#include "esphome/core/hal.h"
#include "esphome/components/sensor/sensor.h"
namespace esphome {
namespace integration {
namespace esphome::integration {
enum IntegrationSensorTime {
INTEGRATION_SENSOR_TIME_MILLISECOND = 0,
@@ -84,5 +83,4 @@ template<typename... Ts> class SetValueAction : public Action<Ts...>, public Par
void play(const Ts &...x) override { this->parent_->set_value(this->value_.value(x...)); }
};
} // namespace integration
} // namespace esphome
} // namespace esphome::integration

View File

@@ -4,8 +4,7 @@
#include "esphome/core/log.h"
#include "esphome/core/automation.h"
namespace esphome {
namespace interval {
namespace esphome::interval {
class IntervalTrigger : public Trigger<>, public PollingComponent {
public:
@@ -24,5 +23,4 @@ class IntervalTrigger : public Trigger<>, public PollingComponent {
uint32_t startup_delay_{0};
};
} // namespace interval
} // namespace esphome
} // namespace esphome::interval

View File

@@ -4,8 +4,7 @@
// Very basic support for JSN_SR04T V3.0 distance sensor in mode 2
namespace esphome {
namespace jsn_sr04t {
namespace esphome::jsn_sr04t {
static const char *const TAG = "jsn_sr04t.sensor";
@@ -62,5 +61,4 @@ void Jsnsr04tComponent::dump_config() {
LOG_UPDATE_INTERVAL(this);
}
} // namespace jsn_sr04t
} // namespace esphome
} // namespace esphome::jsn_sr04t

View File

@@ -6,8 +6,7 @@
#include "esphome/components/sensor/sensor.h"
#include "esphome/components/uart/uart.h"
namespace esphome {
namespace jsn_sr04t {
namespace esphome::jsn_sr04t {
enum Model {
JSN_SR04T,
@@ -30,5 +29,4 @@ class Jsnsr04tComponent : public sensor::Sensor, public PollingComponent, public
std::vector<uint8_t> buffer_;
};
} // namespace jsn_sr04t
} // namespace esphome
} // namespace esphome::jsn_sr04t

View File

@@ -3,8 +3,7 @@
// ArduinoJson::Allocator is included via ArduinoJson.h in json_util.h
namespace esphome {
namespace json {
namespace esphome::json {
static const char *const TAG = "json";
@@ -149,5 +148,4 @@ SerializationBuffer<> JsonBuilder::serialize() {
return result;
}
} // namespace json
} // namespace esphome
} // namespace esphome::json

View File

@@ -13,8 +13,7 @@
#include <ArduinoJson.h>
namespace esphome {
namespace json {
namespace esphome::json {
/// Buffer for JSON serialization that uses stack allocation for small payloads.
/// Template parameter STACK_SIZE specifies the stack buffer size (default 512 bytes).
@@ -192,5 +191,4 @@ class JsonBuilder {
bool root_created_{false};
};
} // namespace json
} // namespace esphome
} // namespace esphome::json

View File

@@ -2,8 +2,7 @@
#include "esphome/core/log.h"
namespace esphome {
namespace kamstrup_kmp {
namespace esphome::kamstrup_kmp {
static const char *const TAG = "kamstrup_kmp";
@@ -303,5 +302,4 @@ uint16_t crc16_ccitt(const uint8_t *buffer, int len) {
return (uint16_t) reg;
}
} // namespace kamstrup_kmp
} // namespace esphome
} // namespace esphome::kamstrup_kmp

View File

@@ -5,8 +5,7 @@
#include "esphome/components/uart/uart.h"
#include "esphome/core/component.h"
namespace esphome {
namespace kamstrup_kmp {
namespace esphome::kamstrup_kmp {
/*
===========================================================================
@@ -127,5 +126,4 @@ class KamstrupKMPComponent : public PollingComponent, public uart::UARTDevice {
// "true" CCITT CRC-16
uint16_t crc16_ccitt(const uint8_t *buffer, int len);
} // namespace kamstrup_kmp
} // namespace esphome
} // namespace esphome::kamstrup_kmp

View File

@@ -2,8 +2,7 @@
#include "esphome/core/hal.h"
#include "esphome/core/log.h"
namespace esphome {
namespace key_collector {
namespace esphome::key_collector {
static const char *const TAG = "key_collector";
@@ -102,5 +101,4 @@ void KeyCollector::send_key(uint8_t key) {
this->progress_callbacks_.call(this->result_, this->start_key_);
}
} // namespace key_collector
} // namespace esphome
} // namespace esphome::key_collector

View File

@@ -5,8 +5,7 @@
#include "esphome/core/automation.h"
#include "esphome/core/helpers.h"
namespace esphome {
namespace key_collector {
namespace esphome::key_collector {
class KeyCollector : public Component {
public:
@@ -63,5 +62,4 @@ template<typename... Ts> class DisableAction : public Action<Ts...>, public Pare
void play(const Ts &...x) override { this->parent_->set_enabled(false); }
};
} // namespace key_collector
} // namespace esphome
} // namespace esphome::key_collector

View File

@@ -1,9 +1,7 @@
#include "key_provider.h"
namespace esphome {
namespace key_provider {
namespace esphome::key_provider {
void KeyProvider::send_key_(uint8_t key) { this->key_callback_.call(key); }
} // namespace key_provider
} // namespace esphome
} // namespace esphome::key_provider

View File

@@ -3,8 +3,7 @@
#include "esphome/core/automation.h"
#include "esphome/core/component.h"
namespace esphome {
namespace key_provider {
namespace esphome::key_provider {
/// interface for components that provide keypresses
class KeyProvider {
@@ -17,5 +16,4 @@ class KeyProvider {
CallbackManager<void(uint8_t)> key_callback_{};
};
} // namespace key_provider
} // namespace esphome
} // namespace esphome::key_provider

View File

@@ -3,8 +3,7 @@
#include "esphome/core/helpers.h"
#include "esphome/core/log.h"
namespace esphome {
namespace kmeteriso {
namespace esphome::kmeteriso {
static const char *const TAG = "kmeteriso.sensor";
@@ -74,5 +73,4 @@ void KMeterISOComponent::update() {
}
}
} // namespace kmeteriso
} // namespace esphome
} // namespace esphome::kmeteriso

View File

@@ -5,8 +5,7 @@
#include "esphome/components/i2c/i2c.h"
#include "esphome/components/i2c/i2c_bus.h"
namespace esphome {
namespace kmeteriso {
namespace esphome::kmeteriso {
/// This class implements support for the KMeterISO thermocouple sensor.
class KMeterISOComponent : public PollingComponent, public i2c::I2CDevice {
@@ -29,5 +28,4 @@ class KMeterISOComponent : public PollingComponent, public i2c::I2CDevice {
} error_code_{NONE};
};
} // namespace kmeteriso
} // namespace esphome
} // namespace esphome::kmeteriso

View File

@@ -3,8 +3,7 @@
#include "esphome/core/log.h"
#include "esphome/core/application.h"
namespace esphome {
namespace kuntze {
namespace esphome::kuntze {
static const char *const TAG = "kuntze";
@@ -97,5 +96,4 @@ void Kuntze::dump_config() {
LOG_SENSOR("", "OCI", this->oci_sensor_);
}
} // namespace kuntze
} // namespace esphome
} // namespace esphome::kuntze

View File

@@ -4,8 +4,7 @@
#include "esphome/components/sensor/sensor.h"
#include "esphome/components/modbus/modbus.h"
namespace esphome {
namespace kuntze {
namespace esphome::kuntze {
class Kuntze : public PollingComponent, public modbus::ModbusDevice {
public:
@@ -38,5 +37,4 @@ class Kuntze : public PollingComponent, public modbus::ModbusDevice {
sensor::Sensor *oci_sensor_{nullptr};
};
} // namespace kuntze
} // namespace esphome
} // namespace esphome::kuntze

View File

@@ -2,8 +2,7 @@
#include "esphome/core/helpers.h"
#include "esphome/core/log.h"
namespace esphome {
namespace lc709203f {
namespace esphome::lc709203f {
static const char *const TAG = "lc709203f.sensor";
@@ -279,5 +278,4 @@ void Lc709203f::set_thermistor_b_constant(uint16_t b_constant) { this->b_constan
void Lc709203f::set_pack_voltage(LC709203FBatteryVoltage pack_voltage) { this->pack_voltage_ = pack_voltage; }
} // namespace lc709203f
} // namespace esphome
} // namespace esphome::lc709203f

View File

@@ -4,8 +4,7 @@
#include "esphome/components/sensor/sensor.h"
#include "esphome/core/component.h"
namespace esphome {
namespace lc709203f {
namespace esphome::lc709203f {
enum LC709203FState {
STATE_INIT,
@@ -50,5 +49,4 @@ class Lc709203f : public sensor::Sensor, public PollingComponent, public i2c::I2
uint16_t pack_voltage_;
};
} // namespace lc709203f
} // namespace esphome
} // namespace esphome::lc709203f

View File

@@ -3,8 +3,7 @@
#include "esphome/core/helpers.h"
#include "esphome/core/log.h"
namespace esphome {
namespace lcd_base {
namespace esphome::lcd_base {
static const char *const TAG = "lcd";
@@ -173,5 +172,4 @@ void LCDDisplay::loadchar(uint8_t location, uint8_t charmap[]) {
}
}
} // namespace lcd_base
} // namespace esphome
} // namespace esphome::lcd_base

View File

@@ -6,8 +6,7 @@
#include <map>
#include <vector>
namespace esphome {
namespace lcd_base {
namespace esphome::lcd_base {
class LCDDisplay;
@@ -62,5 +61,4 @@ class LCDDisplay : public PollingComponent {
std::map<uint8_t, std::vector<uint8_t> > user_defined_chars_;
};
} // namespace lcd_base
} // namespace esphome
} // namespace esphome::lcd_base

View File

@@ -1,8 +1,7 @@
#include "gpio_lcd_display.h"
#include "esphome/core/log.h"
namespace esphome {
namespace lcd_gpio {
namespace esphome::lcd_gpio {
static const char *const TAG = "lcd_gpio";
@@ -63,5 +62,4 @@ void GPIOLCDDisplay::send(uint8_t value, bool rs) {
}
}
} // namespace lcd_gpio
} // namespace esphome
} // namespace esphome::lcd_gpio

View File

@@ -4,8 +4,7 @@
#include "esphome/components/lcd_base/lcd_display.h"
#include "esphome/components/display/display.h"
namespace esphome {
namespace lcd_gpio {
namespace esphome::lcd_gpio {
class GPIOLCDDisplay;
@@ -51,5 +50,4 @@ class GPIOLCDDisplay : public lcd_base::LCDDisplay {
gpio_lcd_writer_t writer_;
};
} // namespace lcd_gpio
} // namespace esphome
} // namespace esphome::lcd_gpio

View File

@@ -2,8 +2,7 @@
#include "esphome/core/log.h"
#include <algorithm>
namespace esphome {
namespace lcd_menu {
namespace esphome::lcd_menu {
static const char *const TAG = "lcd_menu";
@@ -72,5 +71,4 @@ void LCDCharacterMenuComponent::draw_item(const display_menu_base::MenuItem *ite
this->display_->print(0, row, data);
}
} // namespace lcd_menu
} // namespace esphome
} // namespace esphome::lcd_menu

View File

@@ -6,8 +6,7 @@
#include <forward_list>
#include <vector>
namespace esphome {
namespace lcd_menu {
namespace esphome::lcd_menu {
/** Class to display a hierarchical menu.
*
@@ -41,5 +40,4 @@ class LCDCharacterMenuComponent : public display_menu_base::DisplayMenuComponent
char mark_back_;
};
} // namespace lcd_menu
} // namespace esphome
} // namespace esphome::lcd_menu

View File

@@ -2,8 +2,7 @@
#include "esphome/core/log.h"
#include "esphome/core/hal.h"
namespace esphome {
namespace lcd_pcf8574 {
namespace esphome::lcd_pcf8574 {
static const char *const TAG = "lcd_pcf8574";
@@ -56,5 +55,4 @@ void PCF8574LCDDisplay::no_backlight() {
this->write_bytes(this->backlight_value_, nullptr, 0);
}
} // namespace lcd_pcf8574
} // namespace esphome
} // namespace esphome::lcd_pcf8574

View File

@@ -5,8 +5,7 @@
#include "esphome/components/i2c/i2c.h"
#include "esphome/components/display/display.h"
namespace esphome {
namespace lcd_pcf8574 {
namespace esphome::lcd_pcf8574 {
class PCF8574LCDDisplay;
@@ -32,5 +31,4 @@ class PCF8574LCDDisplay : public lcd_base::LCDDisplay, public i2c::I2CDevice {
pcf8574_lcd_writer_t writer_;
};
} // namespace lcd_pcf8574
} // namespace esphome
} // namespace esphome::lcd_pcf8574

View File

@@ -3,8 +3,7 @@
#include "esphome/core/component.h"
#include "esphome/core/hal.h"
namespace esphome {
namespace lightwaverf {
namespace esphome::lightwaverf {
// LwRx.h
//
@@ -138,5 +137,4 @@ class LwRx {
InternalGPIOPin *rx_pin_;
};
} // namespace lightwaverf
} // namespace esphome
} // namespace esphome::lightwaverf

View File

@@ -5,8 +5,7 @@
#include <vector>
namespace esphome {
namespace lightwaverf {
namespace esphome::lightwaverf {
// LxTx.h
//
@@ -90,5 +89,4 @@ class LwTx {
uint32_t duty_off_;
};
} // namespace lightwaverf
} // namespace esphome
} // namespace esphome::lightwaverf

View File

@@ -3,8 +3,7 @@
#include "esphome/core/helpers.h"
#include "esphome/core/log.h"
namespace esphome {
namespace lilygo_t5_47 {
namespace esphome::lilygo_t5_47 {
static const char *const TAG = "lilygo_t5_47.touchscreen";
@@ -104,5 +103,4 @@ void LilygoT547Touchscreen::dump_config() {
LOG_PIN(" Interrupt Pin: ", this->interrupt_pin_);
}
} // namespace lilygo_t5_47
} // namespace esphome
} // namespace esphome::lilygo_t5_47

View File

@@ -8,8 +8,7 @@
#include <vector>
namespace esphome {
namespace lilygo_t5_47 {
namespace esphome::lilygo_t5_47 {
using namespace touchscreen;
@@ -27,5 +26,4 @@ class LilygoT547Touchscreen : public Touchscreen, public i2c::I2CDevice {
InternalGPIOPin *interrupt_pin_;
};
} // namespace lilygo_t5_47
} // namespace esphome
} // namespace esphome::lilygo_t5_47

View File

@@ -2,8 +2,7 @@
#include "esphome/core/log.h"
#include "esphome/core/hal.h"
namespace esphome {
namespace lm75b {
namespace esphome::lm75b {
static const char *const TAG = "lm75b";
@@ -35,5 +34,4 @@ void LM75BComponent::update() {
}
}
} // namespace lm75b
} // namespace esphome
} // namespace esphome::lm75b

View File

@@ -4,8 +4,7 @@
#include "esphome/components/sensor/sensor.h"
#include "esphome/components/i2c/i2c.h"
namespace esphome {
namespace lm75b {
namespace esphome::lm75b {
static const uint8_t LM75B_REG_TEMPERATURE = 0x00;
@@ -15,5 +14,4 @@ class LM75BComponent : public PollingComponent, public i2c::I2CDevice, public se
void update() override;
};
} // namespace lm75b
} // namespace esphome
} // namespace esphome::lm75b

View File

@@ -1,7 +1,6 @@
#include "lps22.h"
namespace esphome {
namespace lps22 {
namespace esphome::lps22 {
static constexpr const char *const TAG = "lps22";
@@ -78,5 +77,4 @@ void LPS22Component::try_read_() {
}
}
} // namespace lps22
} // namespace esphome
} // namespace esphome::lps22

View File

@@ -4,8 +4,7 @@
#include "esphome/components/sensor/sensor.h"
#include "esphome/components/i2c/i2c.h"
namespace esphome {
namespace lps22 {
namespace esphome::lps22 {
class LPS22Component : public sensor::Sensor, public PollingComponent, public i2c::I2CDevice {
public:
@@ -24,5 +23,4 @@ class LPS22Component : public sensor::Sensor, public PollingComponent, public i2
uint8_t read_attempts_remaining_{0};
};
} // namespace lps22
} // namespace esphome
} // namespace esphome::lps22

View File

@@ -3,8 +3,7 @@
#include "esphome/core/hal.h"
#include "esphome/core/log.h"
namespace esphome {
namespace ltr390 {
namespace esphome::ltr390 {
static const char *const TAG = "ltr390";
@@ -203,5 +202,4 @@ void LTR390Component::update() {
this->read_mode_((this->enabled_modes_ & ENABLED_MODE_ALS) ? LTR390_MODE_ALS : LTR390_MODE_UVS);
}
} // namespace ltr390
} // namespace esphome
} // namespace esphome::ltr390

View File

@@ -5,8 +5,7 @@
#include "esphome/core/component.h"
#include "esphome/core/optional.h"
namespace esphome {
namespace ltr390 {
namespace esphome::ltr390 {
enum LTR390CTRL {
LTR390_CTRL_EN = 1,
@@ -85,5 +84,4 @@ class LTR390Component : public PollingComponent, public i2c::I2CDevice {
sensor::Sensor *uv_sensor_{nullptr};
};
} // namespace ltr390
} // namespace esphome
} // namespace esphome::ltr390

View File

@@ -6,8 +6,7 @@
using esphome::i2c::ErrorCode;
namespace esphome {
namespace ltr501 {
namespace esphome::ltr501 {
static const char *const TAG = "ltr501";
@@ -542,5 +541,4 @@ void LTRAlsPs501Component::publish_data_part_2_(AlsReadings &data) {
this->actual_integration_time_sensor_->publish_state(get_itime_ms(data.integration_time));
}
}
} // namespace ltr501
} // namespace esphome
} // namespace esphome::ltr501

View File

@@ -8,8 +8,7 @@
#include "ltr_definitions_501.h"
namespace esphome {
namespace ltr501 {
namespace esphome::ltr501 {
enum LtrDataAvail : uint8_t { LTR_NO_DATA, LTR_BAD_DATA, LTR_DATA_OK };
@@ -162,5 +161,4 @@ class LTRAlsPs501Component : public PollingComponent, public i2c::I2CDevice {
CallbackManager<void()> on_ps_high_trigger_callback_;
CallbackManager<void()> on_ps_low_trigger_callback_;
};
} // namespace ltr501
} // namespace esphome
} // namespace esphome::ltr501

View File

@@ -2,8 +2,7 @@
#include <cstdint>
namespace esphome {
namespace ltr501 {
namespace esphome::ltr501 {
enum class CommandRegisters : uint8_t {
ALS_CONTR = 0x80, // ALS operation mode control and SW reset
@@ -256,5 +255,4 @@ union InterruptPersistRegister {
} __attribute__((packed));
};
} // namespace ltr501
} // namespace esphome
} // namespace esphome::ltr501

View File

@@ -6,8 +6,7 @@
using esphome::i2c::ErrorCode;
namespace esphome {
namespace ltr_als_ps {
namespace esphome::ltr_als_ps {
static const char *const TAG = "ltr_als_ps";
@@ -521,5 +520,4 @@ void LTRAlsPsComponent::publish_data_part_2_(AlsReadings &data) {
this->actual_integration_time_sensor_->publish_state(get_itime_ms(data.integration_time));
}
}
} // namespace ltr_als_ps
} // namespace esphome
} // namespace esphome::ltr_als_ps

View File

@@ -8,8 +8,7 @@
#include "ltr_definitions.h"
namespace esphome {
namespace ltr_als_ps {
namespace esphome::ltr_als_ps {
enum LtrDataAvail : uint8_t { LTR_NO_DATA, LTR_BAD_DATA, LTR_DATA_OK };
@@ -162,5 +161,4 @@ class LTRAlsPsComponent : public PollingComponent, public i2c::I2CDevice {
CallbackManager<void()> on_ps_high_trigger_callback_;
CallbackManager<void()> on_ps_low_trigger_callback_;
};
} // namespace ltr_als_ps
} // namespace esphome
} // namespace esphome::ltr_als_ps

View File

@@ -2,8 +2,7 @@
#include <cstdint>
namespace esphome {
namespace ltr_als_ps {
namespace esphome::ltr_als_ps {
enum class CommandRegisters : uint8_t {
ALS_CONTR = 0x80, // ALS operation mode control and SW reset
@@ -271,5 +270,4 @@ union InterruptPersistRegister {
} __attribute__((packed));
};
} // namespace ltr_als_ps
} // namespace esphome
} // namespace esphome::ltr_als_ps

View File

@@ -4,8 +4,7 @@
#include "esphome/components/light/light_output.h"
#include "../lvgl_esphome.h"
namespace esphome {
namespace lvgl {
namespace esphome::lvgl {
class LVLight : public light::LightOutput {
public:
@@ -44,5 +43,4 @@ class LVLight : public light::LightOutput {
optional<lv_color_t> initial_value_{};
};
} // namespace lvgl
} // namespace esphome
} // namespace esphome::lvgl

View File

@@ -11,7 +11,5 @@ file is included in the build, LVGL is always included.
#endif // LV_CONF_H
#include <lvgl.h>
namespace esphome {
namespace lvgl {} // namespace lvgl
} // namespace esphome
#endif // USE_LVGL
namespace esphome::lvgl {} // namespace esphome::lvgl
#endif // USE_LVGL

View File

@@ -6,8 +6,7 @@
#include "esphome/core/component.h"
#include "esphome/core/preferences.h"
namespace esphome {
namespace lvgl {
namespace esphome::lvgl {
class LVGLNumber : public number::Number, public Component {
public:
@@ -48,5 +47,4 @@ class LVGLNumber : public number::Number, public Component {
ESPPreferenceObject pref_{};
};
} // namespace lvgl
} // namespace esphome
} // namespace esphome::lvgl

View File

@@ -8,8 +8,7 @@
#include "esphome/core/preferences.h"
#include "esphome/components/lvgl/lvgl_esphome.h"
namespace esphome {
namespace lvgl {
namespace esphome::lvgl {
class LVGLSelect : public select::Select, public Component {
public:
@@ -71,5 +70,4 @@ class LVGLSelect : public select::Select, public Component {
ESPPreferenceObject pref_{};
};
} // namespace lvgl
} // namespace esphome
} // namespace esphome::lvgl

View File

@@ -7,8 +7,7 @@
#include "esphome/core/component.h"
#include "esphome/core/preferences.h"
namespace esphome {
namespace lvgl {
namespace esphome::lvgl {
class LVGLSwitch : public switch_::Switch, public Component {
public:
@@ -21,5 +20,4 @@ class LVGLSwitch : public switch_::Switch, public Component {
std::function<void(bool)> state_lambda_{};
};
} // namespace lvgl
} // namespace esphome
} // namespace esphome::lvgl

View File

@@ -4,8 +4,7 @@
#include "esphome/core/automation.h"
#include "esphome/core/component.h"
namespace esphome {
namespace lvgl {
namespace esphome::lvgl {
class LVGLText : public text::Text {
public:
@@ -29,5 +28,4 @@ class LVGLText : public text::Text {
optional<std::string> initial_state_{};
};
} // namespace lvgl
} // namespace esphome
} // namespace esphome::lvgl

View File

@@ -1,7 +1,6 @@
#include "m5stack_8angle_binary_sensor.h"
namespace esphome {
namespace m5stack_8angle {
namespace esphome::m5stack_8angle {
void M5Stack8AngleSwitchBinarySensor::update() {
int8_t out = this->parent_->read_switch();
@@ -13,5 +12,4 @@ void M5Stack8AngleSwitchBinarySensor::update() {
this->status_clear_warning();
}
} // namespace m5stack_8angle
} // namespace esphome
} // namespace esphome::m5stack_8angle

View File

@@ -5,8 +5,7 @@
#include "../m5stack_8angle.h"
namespace esphome {
namespace m5stack_8angle {
namespace esphome::m5stack_8angle {
class M5Stack8AngleSwitchBinarySensor : public binary_sensor::BinarySensor,
public PollingComponent,
@@ -15,5 +14,4 @@ class M5Stack8AngleSwitchBinarySensor : public binary_sensor::BinarySensor,
void update() override;
};
} // namespace m5stack_8angle
} // namespace esphome
} // namespace esphome::m5stack_8angle

View File

@@ -2,8 +2,7 @@
#include "esphome/core/log.h"
namespace esphome {
namespace m5stack_8angle {
namespace esphome::m5stack_8angle {
static const char *const TAG = "m5stack_8angle.light";
@@ -41,5 +40,4 @@ light::ESPColorView M5Stack8AngleLightOutput::get_view_internal(int32_t index) c
nullptr, this->effect_data_ + index, &this->correction_};
}
} // namespace m5stack_8angle
} // namespace esphome
} // namespace esphome::m5stack_8angle

View File

@@ -5,8 +5,7 @@
#include "../m5stack_8angle.h"
namespace esphome {
namespace m5stack_8angle {
namespace esphome::m5stack_8angle {
static const uint8_t M5STACK_8ANGLE_NUM_LEDS = 9;
static const uint8_t M5STACK_8ANGLE_BYTES_PER_LED = 4;
@@ -33,5 +32,4 @@ class M5Stack8AngleLightOutput : public light::AddressableLight, public Parented
uint8_t *effect_data_{nullptr};
};
} // namespace m5stack_8angle
} // namespace esphome
} // namespace esphome::m5stack_8angle

View File

@@ -2,8 +2,7 @@
#include "esphome/core/hal.h"
#include "esphome/core/log.h"
namespace esphome {
namespace m5stack_8angle {
namespace esphome::m5stack_8angle {
static const char *const TAG = "m5stack_8angle";
@@ -69,5 +68,4 @@ int8_t M5Stack8AngleComponent::read_switch() {
}
}
} // namespace m5stack_8angle
} // namespace esphome
} // namespace esphome::m5stack_8angle

View File

@@ -3,8 +3,7 @@
#include "esphome/components/i2c/i2c.h"
#include "esphome/core/component.h"
namespace esphome {
namespace m5stack_8angle {
namespace esphome::m5stack_8angle {
static const uint8_t M5STACK_8ANGLE_REGISTER_ANALOG_INPUT_12B = 0x00;
static const uint8_t M5STACK_8ANGLE_REGISTER_ANALOG_INPUT_8B = 0x10;
@@ -29,5 +28,4 @@ class M5Stack8AngleComponent : public i2c::I2CDevice, public Component {
uint8_t fw_version_;
};
} // namespace m5stack_8angle
} // namespace esphome
} // namespace esphome::m5stack_8angle

View File

@@ -1,7 +1,6 @@
#include "m5stack_8angle_sensor.h"
namespace esphome {
namespace m5stack_8angle {
namespace esphome::m5stack_8angle {
void M5Stack8AngleKnobSensor::update() {
if (this->parent_ != nullptr) {
@@ -20,5 +19,4 @@ void M5Stack8AngleKnobSensor::update() {
};
}
} // namespace m5stack_8angle
} // namespace esphome
} // namespace esphome::m5stack_8angle

View File

@@ -5,8 +5,7 @@
#include "../m5stack_8angle.h"
namespace esphome {
namespace m5stack_8angle {
namespace esphome::m5stack_8angle {
class M5Stack8AngleKnobSensor : public sensor::Sensor,
public PollingComponent,
@@ -23,5 +22,4 @@ class M5Stack8AngleKnobSensor : public sensor::Sensor,
bool raw_;
};
} // namespace m5stack_8angle
} // namespace esphome
} // namespace esphome::m5stack_8angle

View File

@@ -3,8 +3,7 @@
#include "esphome/components/matrix_keypad/matrix_keypad.h"
#include "esphome/components/binary_sensor/binary_sensor.h"
namespace esphome {
namespace matrix_keypad {
namespace esphome::matrix_keypad {
class MatrixKeypadBinarySensor : public MatrixKeypadListener, public binary_sensor::BinarySensorInitiallyOff {
public:
@@ -47,5 +46,4 @@ class MatrixKeypadBinarySensor : public MatrixKeypadListener, public binary_sens
int col_;
};
} // namespace matrix_keypad
} // namespace esphome
} // namespace esphome::matrix_keypad

View File

@@ -2,8 +2,7 @@
#include "esphome/core/log.h"
#include "esphome/core/application.h"
namespace esphome {
namespace matrix_keypad {
namespace esphome::matrix_keypad {
static const char *const TAG = "matrix_keypad";
@@ -110,5 +109,4 @@ void MatrixKeypad::register_listener(MatrixKeypadListener *listener) { this->lis
void MatrixKeypad::register_key_trigger(MatrixKeyTrigger *trig) { this->key_triggers_.push_back(trig); }
} // namespace matrix_keypad
} // namespace esphome
} // namespace esphome::matrix_keypad

View File

@@ -8,8 +8,7 @@
#include <cstdlib>
#include <utility>
namespace esphome {
namespace matrix_keypad {
namespace esphome::matrix_keypad {
class MatrixKeypadListener {
public:
@@ -51,5 +50,4 @@ class MatrixKeypad : public key_provider::KeyProvider, public Component {
std::vector<MatrixKeyTrigger *> key_triggers_;
};
} // namespace matrix_keypad
} // namespace esphome
} // namespace esphome::matrix_keypad

View File

@@ -3,8 +3,7 @@
#include "esphome/core/automation.h"
#include "max17043.h"
namespace esphome {
namespace max17043 {
namespace esphome::max17043 {
template<typename... Ts> class SleepAction : public Action<Ts...> {
public:
@@ -16,5 +15,4 @@ template<typename... Ts> class SleepAction : public Action<Ts...> {
MAX17043Component *max17043_;
};
} // namespace max17043
} // namespace esphome
} // namespace esphome::max17043

View File

@@ -1,8 +1,7 @@
#include "max17043.h"
#include "esphome/core/log.h"
namespace esphome {
namespace max17043 {
namespace esphome::max17043 {
// MAX174043 is a 1-Cell Fuel Gauge with ModelGauge and Low-Battery Alert
// Consult the datasheet at https://www.analog.com/en/products/max17043.html
@@ -90,5 +89,4 @@ void MAX17043Component::sleep_mode() {
}
}
} // namespace max17043
} // namespace esphome
} // namespace esphome::max17043

View File

@@ -4,8 +4,7 @@
#include "esphome/components/sensor/sensor.h"
#include "esphome/components/i2c/i2c.h"
namespace esphome {
namespace max17043 {
namespace esphome::max17043 {
class MAX17043Component : public PollingComponent, public i2c::I2CDevice {
public:
@@ -24,5 +23,4 @@ class MAX17043Component : public PollingComponent, public i2c::I2CDevice {
sensor::Sensor *battery_remaining_sensor_{nullptr};
};
} // namespace max17043
} // namespace esphome
} // namespace esphome::max17043

View File

@@ -3,8 +3,7 @@
#include "esphome/core/helpers.h"
#include "esphome/core/log.h"
namespace esphome {
namespace max31855 {
namespace esphome::max31855 {
static const char *const TAG = "max31855";
@@ -100,5 +99,4 @@ void MAX31855Sensor::read_data_() {
this->status_clear_warning();
}
} // namespace max31855
} // namespace esphome
} // namespace esphome::max31855

View File

@@ -6,8 +6,7 @@
#include <cinttypes>
namespace esphome {
namespace max31855 {
namespace esphome::max31855 {
class MAX31855Sensor : public sensor::Sensor,
public PollingComponent,
@@ -26,5 +25,4 @@ class MAX31855Sensor : public sensor::Sensor,
sensor::Sensor *temperature_reference_{nullptr};
};
} // namespace max31855
} // namespace esphome
} // namespace esphome::max31855

Some files were not shown because too many files have changed in this diff Show More