[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
+2 -4
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
+2 -4
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
+2 -4
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
@@ -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
@@ -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
+2 -4
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
+2 -4
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
+2 -4
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
@@ -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
+2 -4
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
+2 -4
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
+2 -4
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
+2 -4
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
@@ -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
+2 -4
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
@@ -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
@@ -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
+2 -4
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
+2 -4
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
+2 -4
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
+2 -4
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
+2 -4
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
+2 -4
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
@@ -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
+2 -4
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
+2 -4
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
+2 -4
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
+2 -4
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
+2 -4
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
+2 -4
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
+2 -4
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
@@ -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
@@ -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
+2 -4
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
+2 -4
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
@@ -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
@@ -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
+2 -4
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
+2 -4
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
+2 -4
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
+2 -4
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
+2 -4
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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
+2 -4
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
+2 -4
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

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