mirror of
https://github.com/esphome/esphome.git
synced 2026-05-10 05:37:55 +08:00
[clang-tidy] Concatenate nested namespaces (6/7: components t-z) (#16305)
This commit is contained in:
@@ -2,8 +2,7 @@
|
||||
#include "esphome/core/helpers.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace t6615 {
|
||||
namespace esphome::t6615 {
|
||||
|
||||
static const char *const TAG = "t6615";
|
||||
|
||||
@@ -92,5 +91,4 @@ void T6615Component::dump_config() {
|
||||
this->check_uart_settings(19200);
|
||||
}
|
||||
|
||||
} // namespace t6615
|
||||
} // namespace esphome
|
||||
} // namespace esphome::t6615
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
#include "esphome/components/sensor/sensor.h"
|
||||
#include "esphome/components/uart/uart.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace t6615 {
|
||||
namespace esphome::t6615 {
|
||||
|
||||
enum class T6615Command : uint8_t {
|
||||
NONE = 0,
|
||||
@@ -38,5 +37,4 @@ class T6615Component : public PollingComponent, public uart::UARTDevice {
|
||||
sensor::Sensor *co2_sensor_{nullptr};
|
||||
};
|
||||
|
||||
} // namespace t6615
|
||||
} // namespace esphome
|
||||
} // namespace esphome::t6615
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "tc74.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tc74 {
|
||||
namespace esphome::tc74 {
|
||||
|
||||
static const char *const TAG = "tc74";
|
||||
|
||||
@@ -62,5 +61,4 @@ void TC74Component::read_temperature_() {
|
||||
this->status_clear_warning();
|
||||
}
|
||||
|
||||
} // namespace tc74
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tc74
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/components/sensor/sensor.h"
|
||||
#include "esphome/components/i2c/i2c.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tc74 {
|
||||
namespace esphome::tc74 {
|
||||
|
||||
class TC74Component : public PollingComponent, public i2c::I2CDevice, public sensor::Sensor {
|
||||
public:
|
||||
@@ -22,5 +21,4 @@ class TC74Component : public PollingComponent, public i2c::I2CDevice, public sen
|
||||
bool data_ready_ = false;
|
||||
};
|
||||
|
||||
} // namespace tc74
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tc74
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "tca9548a.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tca9548a {
|
||||
namespace esphome::tca9548a {
|
||||
|
||||
static const char *const TAG = "tca9548a";
|
||||
|
||||
@@ -44,5 +43,4 @@ void TCA9548AComponent::disable_all_channels() {
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace tca9548a
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tca9548a
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/core/component.h"
|
||||
#include "esphome/components/i2c/i2c.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tca9548a {
|
||||
namespace esphome::tca9548a {
|
||||
|
||||
static const uint8_t TCA9548A_DISABLE_CHANNELS_COMMAND = 0x00;
|
||||
|
||||
@@ -35,5 +34,4 @@ class TCA9548AComponent : public Component, public i2c::I2CDevice {
|
||||
protected:
|
||||
friend class TCA9548AChannel;
|
||||
};
|
||||
} // namespace tca9548a
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tca9548a
|
||||
|
||||
@@ -10,8 +10,7 @@ static const uint8_t TCA9555_POLARITY_REGISTER_1 = 0x05;
|
||||
static const uint8_t TCA9555_CONFIGURATION_PORT_0 = 0x06;
|
||||
static const uint8_t TCA9555_CONFIGURATION_PORT_1 = 0x07;
|
||||
|
||||
namespace esphome {
|
||||
namespace tca9555 {
|
||||
namespace esphome::tca9555 {
|
||||
|
||||
static const char *const TAG = "tca9555";
|
||||
|
||||
@@ -162,5 +161,4 @@ size_t TCA9555GPIOPin::dump_summary(char *buffer, size_t len) const {
|
||||
return buf_append_printf(buffer, len, 0, "%u via TCA9555", this->pin_);
|
||||
}
|
||||
|
||||
} // namespace tca9555
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tca9555
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
#include "esphome/core/component.h"
|
||||
#include "esphome/core/hal.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tca9555 {
|
||||
namespace esphome::tca9555 {
|
||||
|
||||
class TCA9555Component : public Component,
|
||||
public i2c::I2CDevice,
|
||||
@@ -67,5 +66,4 @@ class TCA9555GPIOPin : public GPIOPin, public Parented<TCA9555Component> {
|
||||
gpio::Flags flags_;
|
||||
};
|
||||
|
||||
} // namespace tca9555
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tca9555
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "tcl112.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tcl112 {
|
||||
namespace esphome::tcl112 {
|
||||
|
||||
static const char *const TAG = "tcl112.climate";
|
||||
|
||||
@@ -240,5 +239,4 @@ bool Tcl112Climate::on_receive(remote_base::RemoteReceiveData data) {
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace tcl112
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tcl112
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
|
||||
#include "esphome/components/climate_ir/climate_ir.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tcl112 {
|
||||
namespace esphome::tcl112 {
|
||||
|
||||
// Temperature
|
||||
const float TCL112_TEMP_MAX = 31.0;
|
||||
@@ -24,5 +23,4 @@ class Tcl112Climate : public climate_ir::ClimateIR {
|
||||
bool on_receive(remote_base::RemoteReceiveData data) override;
|
||||
};
|
||||
|
||||
} // namespace tcl112
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tcl112
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/core/log.h"
|
||||
#include <algorithm>
|
||||
|
||||
namespace esphome {
|
||||
namespace tcs34725 {
|
||||
namespace esphome::tcs34725 {
|
||||
|
||||
static const char *const TAG = "tcs34725";
|
||||
|
||||
@@ -348,5 +347,4 @@ void TCS34725Component::set_glass_attenuation_factor(float ga) {
|
||||
this->glass_attenuation_ = ga;
|
||||
}
|
||||
|
||||
} // namespace tcs34725
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tcs34725
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/components/sensor/sensor.h"
|
||||
#include "esphome/components/i2c/i2c.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tcs34725 {
|
||||
namespace esphome::tcs34725 {
|
||||
|
||||
enum TCS34725IntegrationTime {
|
||||
TCS34725_INTEGRATION_TIME_2_4MS = 0xFF,
|
||||
@@ -85,5 +84,4 @@ class TCS34725Component : public PollingComponent, public i2c::I2CDevice {
|
||||
uint8_t gain_reg_{TCS34725_GAIN_1X};
|
||||
};
|
||||
|
||||
} // namespace tcs34725
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tcs34725
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
#include "esphome/core/helpers.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tee501 {
|
||||
namespace esphome::tee501 {
|
||||
|
||||
static const char *const TAG = "tee501";
|
||||
|
||||
@@ -66,5 +65,4 @@ void TEE501Component::update() {
|
||||
});
|
||||
}
|
||||
|
||||
} // namespace tee501
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tee501
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/components/sensor/sensor.h"
|
||||
#include "esphome/core/component.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tee501 {
|
||||
namespace esphome::tee501 {
|
||||
|
||||
/// This class implements support for the tee501 of temperature i2c sensors.
|
||||
class TEE501Component : public sensor::Sensor, public PollingComponent, public i2c::I2CDevice {
|
||||
@@ -18,5 +17,4 @@ class TEE501Component : public sensor::Sensor, public PollingComponent, public i
|
||||
enum ErrorCode { NONE = 0, COMMUNICATION_FAILED, CRC_CHECK_FAILED } error_code_{NONE};
|
||||
};
|
||||
|
||||
} // namespace tee501
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tee501
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "esphome/core/log.h"
|
||||
#include "teleinfo_sensor.h"
|
||||
namespace esphome {
|
||||
namespace teleinfo {
|
||||
|
||||
namespace esphome::teleinfo {
|
||||
|
||||
static const char *const TAG = "teleinfo_sensor";
|
||||
TeleInfoSensor::TeleInfoSensor(const char *tag) { this->tag = std::string(tag); }
|
||||
@@ -10,5 +10,4 @@ void TeleInfoSensor::publish_val(const std::string &val) {
|
||||
publish_state(newval);
|
||||
}
|
||||
void TeleInfoSensor::dump_config() { LOG_SENSOR(" ", "Teleinfo Sensor", this); }
|
||||
} // namespace teleinfo
|
||||
} // namespace esphome
|
||||
} // namespace esphome::teleinfo
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
#include "esphome/components/teleinfo/teleinfo.h"
|
||||
#include "esphome/components/sensor/sensor.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace teleinfo {
|
||||
namespace esphome::teleinfo {
|
||||
|
||||
class TeleInfoSensor : public TeleInfoListener, public sensor::Sensor, public Component {
|
||||
public:
|
||||
@@ -12,5 +11,4 @@ class TeleInfoSensor : public TeleInfoListener, public sensor::Sensor, public Co
|
||||
void dump_config() override;
|
||||
};
|
||||
|
||||
} // namespace teleinfo
|
||||
} // namespace esphome
|
||||
} // namespace esphome::teleinfo
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "teleinfo.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace teleinfo {
|
||||
namespace esphome::teleinfo {
|
||||
|
||||
static const char *const TAG = "teleinfo";
|
||||
|
||||
@@ -205,5 +204,4 @@ TeleInfo::TeleInfo(bool historical_mode) {
|
||||
}
|
||||
void TeleInfo::register_teleinfo_listener(TeleInfoListener *listener) { teleinfo_listeners_.push_back(listener); }
|
||||
|
||||
} // namespace teleinfo
|
||||
} // namespace esphome
|
||||
} // namespace esphome::teleinfo
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace esphome {
|
||||
namespace teleinfo {
|
||||
namespace esphome::teleinfo {
|
||||
/*
|
||||
* 198 bytes should be enough to contain a full session in historical mode with
|
||||
* three phases. But go with 1024 just to be sure.
|
||||
@@ -50,5 +49,4 @@ class TeleInfo : public PollingComponent, public uart::UARTDevice {
|
||||
bool check_crc_(const char *grp, const char *grp_end);
|
||||
void publish_value_(const std::string &tag, const std::string &val);
|
||||
};
|
||||
} // namespace teleinfo
|
||||
} // namespace esphome
|
||||
} // namespace esphome::teleinfo
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
#include "esphome/core/log.h"
|
||||
#include "teleinfo_text_sensor.h"
|
||||
namespace esphome {
|
||||
namespace teleinfo {
|
||||
|
||||
namespace esphome::teleinfo {
|
||||
|
||||
static const char *const TAG = "teleinfo_text_sensor";
|
||||
TeleInfoTextSensor::TeleInfoTextSensor(const char *tag) { this->tag = std::string(tag); }
|
||||
void TeleInfoTextSensor::publish_val(const std::string &val) { publish_state(val); }
|
||||
void TeleInfoTextSensor::dump_config() { LOG_TEXT_SENSOR(" ", "Teleinfo Text Sensor", this); }
|
||||
} // namespace teleinfo
|
||||
} // namespace esphome
|
||||
} // namespace esphome::teleinfo
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
#pragma once
|
||||
#include "esphome/components/teleinfo/teleinfo.h"
|
||||
#include "esphome/components/text_sensor/text_sensor.h"
|
||||
namespace esphome {
|
||||
namespace teleinfo {
|
||||
|
||||
namespace esphome::teleinfo {
|
||||
class TeleInfoTextSensor : public TeleInfoListener, public text_sensor::TextSensor, public Component {
|
||||
public:
|
||||
TeleInfoTextSensor(const char *tag);
|
||||
void publish_val(const std::string &val) override;
|
||||
void dump_config() override;
|
||||
};
|
||||
} // namespace teleinfo
|
||||
} // namespace esphome
|
||||
} // namespace esphome::teleinfo
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/core/helpers.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tem3200 {
|
||||
namespace esphome::tem3200 {
|
||||
|
||||
static const char *const TAG = "tem3200";
|
||||
|
||||
@@ -142,5 +141,4 @@ void TEM3200Component::update() {
|
||||
this->status_clear_warning();
|
||||
}
|
||||
|
||||
} // namespace tem3200
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tem3200
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/components/sensor/sensor.h"
|
||||
#include "esphome/components/i2c/i2c.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tem3200 {
|
||||
namespace esphome::tem3200 {
|
||||
|
||||
/// This class implements support for the tem3200 pressure and temperature i2c sensors.
|
||||
class TEM3200Component : public PollingComponent, public i2c::I2CDevice {
|
||||
@@ -25,5 +24,4 @@ class TEM3200Component : public PollingComponent, public i2c::I2CDevice {
|
||||
sensor::Sensor *raw_pressure_sensor_{nullptr};
|
||||
};
|
||||
|
||||
} // namespace tem3200
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tem3200
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/core/hal.h"
|
||||
#include "esphome/core/application.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace time_based {
|
||||
namespace esphome::time_based {
|
||||
|
||||
static const char *const TAG = "time_based.cover";
|
||||
|
||||
@@ -183,5 +182,4 @@ void TimeBasedCover::recompute_position_() {
|
||||
this->last_recompute_time_ = now;
|
||||
}
|
||||
|
||||
} // namespace time_based
|
||||
} // namespace esphome
|
||||
} // namespace esphome::time_based
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/core/automation.h"
|
||||
#include "esphome/components/cover/cover.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace time_based {
|
||||
namespace esphome::time_based {
|
||||
|
||||
class TimeBasedCover : public cover::Cover, public Component {
|
||||
public:
|
||||
@@ -50,5 +49,4 @@ class TimeBasedCover : public cover::Cover, public Component {
|
||||
cover::CoverOperation last_operation_{cover::COVER_OPERATION_OPENING};
|
||||
};
|
||||
|
||||
} // namespace time_based
|
||||
} // namespace esphome
|
||||
} // namespace esphome::time_based
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/core/helpers.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tlc59208f {
|
||||
namespace esphome::tlc59208f {
|
||||
|
||||
static const char *const TAG = "tlc59208f";
|
||||
|
||||
@@ -143,5 +142,4 @@ void TLC59208FChannel::write_state(float state) {
|
||||
this->parent_->set_channel_value_(this->channel_, duty);
|
||||
}
|
||||
|
||||
} // namespace tlc59208f
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tlc59208f
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
#include "esphome/components/output/float_output.h"
|
||||
#include "esphome/components/i2c/i2c.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tlc59208f {
|
||||
namespace esphome::tlc59208f {
|
||||
|
||||
// 0*: Group dimming, 1: Group blinking
|
||||
inline constexpr uint8_t TLC59208F_MODE2_DMBLNK = (1 << 5);
|
||||
@@ -65,5 +64,4 @@ class TLC59208FOutput : public Component, public i2c::I2CDevice {
|
||||
bool update_{true};
|
||||
};
|
||||
|
||||
} // namespace tlc59208f
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tlc59208f
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
#include "tlc5947_output.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tlc5947 {
|
||||
namespace esphome::tlc5947 {
|
||||
|
||||
void TLC5947Channel::write_state(float state) {
|
||||
auto amount = static_cast<uint16_t>(state * 0xfff);
|
||||
this->parent_->set_channel_value(this->channel_, amount);
|
||||
}
|
||||
|
||||
} // namespace tlc5947
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tlc5947
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
|
||||
#include "../tlc5947.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tlc5947 {
|
||||
namespace esphome::tlc5947 {
|
||||
|
||||
class TLC5947Channel : public output::FloatOutput, public Parented<TLC5947> {
|
||||
public:
|
||||
@@ -18,5 +17,4 @@ class TLC5947Channel : public output::FloatOutput, public Parented<TLC5947> {
|
||||
uint16_t channel_;
|
||||
};
|
||||
|
||||
} // namespace tlc5947
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tlc5947
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "tlc5947.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tlc5947 {
|
||||
namespace esphome::tlc5947 {
|
||||
|
||||
static const char *const TAG = "tlc5947";
|
||||
|
||||
@@ -69,5 +68,4 @@ void TLC5947::set_channel_value(uint16_t channel, uint16_t value) {
|
||||
this->pwm_amounts_[channel] = value;
|
||||
}
|
||||
|
||||
} // namespace tlc5947
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tlc5947
|
||||
|
||||
@@ -7,8 +7,7 @@
|
||||
#include "esphome/core/component.h"
|
||||
#include "esphome/core/hal.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tlc5947 {
|
||||
namespace esphome::tlc5947 {
|
||||
|
||||
class TLC5947 : public Component {
|
||||
public:
|
||||
@@ -42,5 +41,4 @@ class TLC5947 : public Component {
|
||||
bool update_{true};
|
||||
};
|
||||
|
||||
} // namespace tlc5947
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tlc5947
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
#include "tlc5971_output.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tlc5971 {
|
||||
namespace esphome::tlc5971 {
|
||||
|
||||
void TLC5971Channel::write_state(float state) {
|
||||
auto amount = static_cast<uint16_t>(state * 0xffff);
|
||||
this->parent_->set_channel_value(this->channel_, amount);
|
||||
}
|
||||
|
||||
} // namespace tlc5971
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tlc5971
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
|
||||
#include "../tlc5971.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tlc5971 {
|
||||
namespace esphome::tlc5971 {
|
||||
|
||||
class TLC5971Channel : public output::FloatOutput, public Parented<TLC5971> {
|
||||
public:
|
||||
@@ -18,5 +17,4 @@ class TLC5971Channel : public output::FloatOutput, public Parented<TLC5971> {
|
||||
uint16_t channel_;
|
||||
};
|
||||
|
||||
} // namespace tlc5971
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tlc5971
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "tlc5971.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tlc5971 {
|
||||
namespace esphome::tlc5971 {
|
||||
|
||||
static const char *const TAG = "tlc5971";
|
||||
|
||||
@@ -90,5 +89,4 @@ void TLC5971::set_channel_value(uint16_t channel, uint16_t value) {
|
||||
this->pwm_amounts_[channel] = value;
|
||||
}
|
||||
|
||||
} // namespace tlc5971
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tlc5971
|
||||
|
||||
@@ -7,8 +7,7 @@
|
||||
#include "esphome/components/output/float_output.h"
|
||||
#include <vector>
|
||||
|
||||
namespace esphome {
|
||||
namespace tlc5971 {
|
||||
namespace esphome::tlc5971 {
|
||||
|
||||
class TLC5971 : public Component {
|
||||
public:
|
||||
@@ -39,5 +38,4 @@ class TLC5971 : public Component {
|
||||
std::vector<uint16_t> pwm_amounts_;
|
||||
bool update_{true};
|
||||
};
|
||||
} // namespace tlc5971
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tlc5971
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/core/helpers.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tm1621 {
|
||||
namespace esphome::tm1621 {
|
||||
|
||||
static const char *const TAG = "tm1621";
|
||||
|
||||
@@ -277,5 +276,4 @@ int TM1621Display::get_command_code_(char *destination, size_t destination_size,
|
||||
}
|
||||
return result;
|
||||
}
|
||||
} // namespace tm1621
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tm1621
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
#include "esphome/core/hal.h"
|
||||
#include "esphome/components/display/display.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tm1621 {
|
||||
namespace esphome::tm1621 {
|
||||
|
||||
class TM1621Display;
|
||||
|
||||
@@ -71,5 +70,4 @@ class TM1621Display : public PollingComponent {
|
||||
bool kwh_;
|
||||
};
|
||||
|
||||
} // namespace tm1621
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tm1621
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/core/helpers.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tm1637 {
|
||||
namespace esphome::tm1637 {
|
||||
|
||||
static const char *const TAG = "display.tm1637";
|
||||
const uint8_t TM1637_CMD_DATA = 0x40; //!< Display data command
|
||||
@@ -391,5 +390,4 @@ uint8_t TM1637Display::strftime(uint8_t pos, const char *format, ESPTime time) {
|
||||
}
|
||||
uint8_t TM1637Display::strftime(const char *format, ESPTime time) { return this->strftime(0, format, time); }
|
||||
|
||||
} // namespace tm1637
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tm1637
|
||||
|
||||
@@ -12,8 +12,7 @@
|
||||
#include "esphome/components/binary_sensor/binary_sensor.h"
|
||||
#endif
|
||||
|
||||
namespace esphome {
|
||||
namespace tm1637 {
|
||||
namespace esphome::tm1637 {
|
||||
|
||||
class TM1637Display;
|
||||
#ifdef USE_BINARY_SENSOR
|
||||
@@ -105,5 +104,4 @@ class TM1637Key : public binary_sensor::BinarySensor {
|
||||
};
|
||||
#endif
|
||||
|
||||
} // namespace tm1637
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tm1637
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "tm1638_key.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tm1638 {
|
||||
namespace esphome::tm1638 {
|
||||
|
||||
void TM1638Key::keys_update(uint8_t keys) {
|
||||
bool pressed = keys & (1 << key_code_);
|
||||
@@ -9,5 +8,4 @@ void TM1638Key::keys_update(uint8_t keys) {
|
||||
this->publish_state(pressed);
|
||||
}
|
||||
|
||||
} // namespace tm1638
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tm1638
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/components/binary_sensor/binary_sensor.h"
|
||||
#include "../tm1638.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tm1638 {
|
||||
namespace esphome::tm1638 {
|
||||
|
||||
class TM1638Key : public binary_sensor::BinarySensor, public KeyListener {
|
||||
public:
|
||||
@@ -15,5 +14,4 @@ class TM1638Key : public binary_sensor::BinarySensor, public KeyListener {
|
||||
uint8_t key_code_{0};
|
||||
};
|
||||
|
||||
} // namespace tm1638
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tm1638
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "tm1638_output_led.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tm1638 {
|
||||
namespace esphome::tm1638 {
|
||||
|
||||
static const char *const TAG = "tm1638.led";
|
||||
|
||||
@@ -13,5 +12,4 @@ void TM1638OutputLed::dump_config() {
|
||||
ESP_LOGCONFIG(TAG, " LED: %d", led_);
|
||||
}
|
||||
|
||||
} // namespace tm1638
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tm1638
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/components/output/binary_output.h"
|
||||
#include "../tm1638.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tm1638 {
|
||||
namespace esphome::tm1638 {
|
||||
|
||||
class TM1638OutputLed : public output::BinaryOutput, public Component {
|
||||
public:
|
||||
@@ -21,5 +20,4 @@ class TM1638OutputLed : public output::BinaryOutput, public Component {
|
||||
int led_;
|
||||
};
|
||||
|
||||
} // namespace tm1638
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tm1638
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
namespace esphome {
|
||||
namespace tm1638 {
|
||||
namespace esphome::tm1638 {
|
||||
namespace TM1638Translation {
|
||||
|
||||
constexpr unsigned char SEVEN_SEG[] PROGMEM = {
|
||||
@@ -103,5 +102,4 @@ constexpr unsigned char SEVEN_SEG[] PROGMEM = {
|
||||
};
|
||||
|
||||
}; // namespace TM1638Translation
|
||||
} // namespace tm1638
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tm1638
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "tm1638_switch_led.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tm1638 {
|
||||
namespace esphome::tm1638 {
|
||||
|
||||
static const char *const TAG = "tm1638.led";
|
||||
|
||||
@@ -16,5 +15,4 @@ void TM1638SwitchLed::dump_config() {
|
||||
ESP_LOGCONFIG(TAG, " LED: %d", led_);
|
||||
}
|
||||
|
||||
} // namespace tm1638
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tm1638
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/components/switch/switch.h"
|
||||
#include "../tm1638.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tm1638 {
|
||||
namespace esphome::tm1638 {
|
||||
|
||||
class TM1638SwitchLed : public switch_::Switch, public Component {
|
||||
public:
|
||||
@@ -19,5 +18,4 @@ class TM1638SwitchLed : public switch_::Switch, public Component {
|
||||
TM1638Component *tm1638_;
|
||||
int led_;
|
||||
};
|
||||
} // namespace tm1638
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tm1638
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/core/helpers.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tm1638 {
|
||||
namespace esphome::tm1638 {
|
||||
|
||||
static const char *const TAG = "display.tm1638";
|
||||
static const uint8_t TM1638_REGISTER_FIXEDADDRESS = 0x44;
|
||||
@@ -282,5 +281,4 @@ void TM1638Component::shift_out_(uint8_t val) {
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace tm1638
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tm1638
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace esphome {
|
||||
namespace tm1638 {
|
||||
namespace esphome::tm1638 {
|
||||
|
||||
class KeyListener {
|
||||
public:
|
||||
@@ -75,5 +74,4 @@ class TM1638Component : public PollingComponent {
|
||||
std::vector<KeyListener *> listeners_{};
|
||||
};
|
||||
|
||||
} // namespace tm1638
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tm1638
|
||||
|
||||
@@ -51,8 +51,7 @@
|
||||
#include "tm1651.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tm1651 {
|
||||
namespace esphome::tm1651 {
|
||||
|
||||
static const char *const TAG = "tm1651.display";
|
||||
|
||||
@@ -256,5 +255,4 @@ void TM1651Display::delineate_transmission_(bool dio_state) {
|
||||
delayMicroseconds(QUARTER_CLOCK_CYCLE);
|
||||
}
|
||||
|
||||
} // namespace tm1651
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tm1651
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/core/component.h"
|
||||
#include "esphome/core/hal.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tm1651 {
|
||||
namespace esphome::tm1651 {
|
||||
|
||||
enum TM1651Brightness : uint8_t {
|
||||
TM1651_DARKEST = 1,
|
||||
@@ -97,5 +96,4 @@ template<typename... Ts> class TurnOffAction : public Action<Ts...>, public Pare
|
||||
void play(const Ts &...x) override { this->parent_->turn_off(); }
|
||||
};
|
||||
|
||||
} // namespace tm1651
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tm1651
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
#include "esphome/core/log.h"
|
||||
#include "esphome/core/hal.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tmp102 {
|
||||
namespace esphome::tmp102 {
|
||||
|
||||
static const char *const TAG = "tmp102";
|
||||
|
||||
@@ -46,5 +45,4 @@ void TMP102Component::update() {
|
||||
});
|
||||
}
|
||||
|
||||
} // namespace tmp102
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tmp102
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user