mirror of
https://github.com/esphome/esphome.git
synced 2026-06-24 14:01:01 +00: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
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/components/sensor/sensor.h"
|
||||
#include "esphome/components/i2c/i2c.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tmp102 {
|
||||
namespace esphome::tmp102 {
|
||||
|
||||
class TMP102Component : public PollingComponent, public i2c::I2CDevice, public sensor::Sensor {
|
||||
public:
|
||||
@@ -13,5 +12,4 @@ class TMP102Component : public PollingComponent, public i2c::I2CDevice, public s
|
||||
void update() override;
|
||||
};
|
||||
|
||||
} // namespace tmp102
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tmp102
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "esphome/core/log.h"
|
||||
#include "tmp1075.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tmp1075 {
|
||||
namespace esphome::tmp1075 {
|
||||
|
||||
static const char *const TAG = "tmp1075";
|
||||
|
||||
@@ -127,5 +126,4 @@ static float regvalue2temp(const uint16_t regvalue) {
|
||||
return (signed_value >> 4) * 0.0625f;
|
||||
}
|
||||
|
||||
} // namespace tmp1075
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tmp1075
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/components/sensor/sensor.h"
|
||||
#include "esphome/core/component.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tmp1075 {
|
||||
namespace esphome::tmp1075 {
|
||||
|
||||
struct TMP1075Config {
|
||||
union {
|
||||
@@ -85,5 +84,4 @@ class TMP1075Sensor : public PollingComponent, public sensor::Sensor, public i2c
|
||||
void log_config_();
|
||||
};
|
||||
|
||||
} // namespace tmp1075
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tmp1075
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
|
||||
// Very basic support for TOF10120 distance sensor
|
||||
|
||||
namespace esphome {
|
||||
namespace tof10120 {
|
||||
namespace esphome::tof10120 {
|
||||
|
||||
static const char *const TAG = "tof10120";
|
||||
static const uint8_t TOF10120_READ_DISTANCE_CMD[] = {0x00};
|
||||
@@ -56,5 +55,4 @@ void TOF10120Sensor::update() {
|
||||
this->status_clear_warning();
|
||||
}
|
||||
|
||||
} // namespace tof10120
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tof10120
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/components/sensor/sensor.h"
|
||||
#include "esphome/components/i2c/i2c.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tof10120 {
|
||||
namespace esphome::tof10120 {
|
||||
|
||||
class TOF10120Sensor : public sensor::Sensor, public PollingComponent, public i2c::I2CDevice {
|
||||
public:
|
||||
@@ -14,5 +13,4 @@ class TOF10120Sensor : public sensor::Sensor, public PollingComponent, public i2
|
||||
void dump_config() override;
|
||||
void update() override;
|
||||
};
|
||||
} // namespace tof10120
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tof10120
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace esphome {
|
||||
namespace tormatic {
|
||||
namespace esphome::tormatic {
|
||||
|
||||
static const char *const TAG = "tormatic.cover";
|
||||
|
||||
@@ -390,5 +389,4 @@ void Tormatic::drain_rx_(uint16_t n) {
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace tormatic
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tormatic
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
|
||||
#include "tormatic_protocol.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tormatic {
|
||||
namespace esphome::tormatic {
|
||||
|
||||
using namespace esphome::cover;
|
||||
|
||||
@@ -56,5 +55,4 @@ class Tormatic : public cover::Cover, public uart::UARTDevice, public PollingCom
|
||||
optional<float> target_position_{};
|
||||
};
|
||||
|
||||
} // namespace tormatic
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tormatic
|
||||
|
||||
@@ -46,8 +46,7 @@
|
||||
* for this purpose.
|
||||
*/
|
||||
|
||||
namespace esphome {
|
||||
namespace tormatic {
|
||||
namespace esphome::tormatic {
|
||||
|
||||
using namespace esphome::cover;
|
||||
|
||||
@@ -225,5 +224,4 @@ struct CommandRequestReply {
|
||||
void byteswap() { this->type = convert_big_endian(this->type); }
|
||||
} __attribute__((packed));
|
||||
|
||||
} // namespace tormatic
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tormatic
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace esphome {
|
||||
namespace toshiba {
|
||||
namespace esphome::toshiba {
|
||||
|
||||
struct RacPt1411hwruFanSpeed {
|
||||
uint8_t code1;
|
||||
@@ -1372,5 +1371,4 @@ bool ToshibaClimate::decode_(remote_base::RemoteReceiveData *data, uint8_t *mess
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace toshiba
|
||||
} // namespace esphome
|
||||
} // namespace esphome::toshiba
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/components/climate_ir/climate_ir.h"
|
||||
#include "esphome/components/remote_base/toshiba_ac_protocol.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace toshiba {
|
||||
namespace esphome::toshiba {
|
||||
|
||||
// Simple enum to represent models.
|
||||
enum Model {
|
||||
@@ -82,5 +81,4 @@ class ToshibaClimate : public climate_ir::ClimateIR {
|
||||
Model model_;
|
||||
};
|
||||
|
||||
} // namespace toshiba
|
||||
} // namespace esphome
|
||||
} // namespace esphome::toshiba
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "touchscreen_binary_sensor.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace touchscreen {
|
||||
namespace esphome::touchscreen {
|
||||
|
||||
void TouchscreenBinarySensor::setup() {
|
||||
this->parent_->register_listener(this);
|
||||
@@ -30,5 +29,4 @@ void TouchscreenBinarySensor::touch(TouchPoint tp) {
|
||||
|
||||
void TouchscreenBinarySensor::release() { this->publish_state(false); }
|
||||
|
||||
} // namespace touchscreen
|
||||
} // namespace esphome
|
||||
} // namespace esphome::touchscreen
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace esphome {
|
||||
namespace touchscreen {
|
||||
namespace esphome::touchscreen {
|
||||
|
||||
class TouchscreenBinarySensor : public binary_sensor::BinarySensor,
|
||||
public Component,
|
||||
@@ -44,5 +43,4 @@ class TouchscreenBinarySensor : public binary_sensor::BinarySensor,
|
||||
std::vector<display::DisplayPage *> pages_{};
|
||||
};
|
||||
|
||||
} // namespace touchscreen
|
||||
} // namespace esphome
|
||||
} // namespace esphome::touchscreen
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace touchscreen {
|
||||
namespace esphome::touchscreen {
|
||||
|
||||
static const char *const TAG = "touchscreen";
|
||||
|
||||
@@ -162,5 +161,4 @@ int16_t Touchscreen::normalize_(int16_t val, int16_t min_val, int16_t max_val, b
|
||||
return ret;
|
||||
}
|
||||
|
||||
} // namespace touchscreen
|
||||
} // namespace esphome
|
||||
} // namespace esphome::touchscreen
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace esphome {
|
||||
namespace touchscreen {
|
||||
namespace esphome::touchscreen {
|
||||
|
||||
static const uint8_t STATE_RELEASED = 0x00;
|
||||
static const uint8_t STATE_PRESSED = 0x01;
|
||||
@@ -120,5 +119,4 @@ class Touchscreen : public PollingComponent {
|
||||
bool skip_update_{false};
|
||||
};
|
||||
|
||||
} // namespace touchscreen
|
||||
} // namespace esphome
|
||||
} // namespace esphome::touchscreen
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "tsl2561.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tsl2561 {
|
||||
namespace esphome::tsl2561 {
|
||||
|
||||
static const char *const TAG = "tsl2561";
|
||||
|
||||
@@ -165,5 +164,4 @@ bool TSL2561Sensor::tsl2561_read_byte(uint8_t a_register, uint8_t *value) {
|
||||
return this->read_byte(a_register | TSL2561_COMMAND_BIT, value);
|
||||
}
|
||||
|
||||
} // namespace tsl2561
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tsl2561
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/components/sensor/sensor.h"
|
||||
#include "esphome/components/i2c/i2c.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tsl2561 {
|
||||
namespace esphome::tsl2561 {
|
||||
|
||||
/** Enum listing all conversion/integration time settings for the TSL2561
|
||||
*
|
||||
@@ -82,5 +81,4 @@ class TSL2561Sensor : public sensor::Sensor, public PollingComponent, public i2c
|
||||
bool package_cs_{false};
|
||||
};
|
||||
|
||||
} // namespace tsl2561
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tsl2561
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
#include "esphome/core/log.h"
|
||||
#include "esphome/core/hal.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tsl2591 {
|
||||
namespace esphome::tsl2591 {
|
||||
|
||||
static const char *const TAG = "tsl2591.sensor";
|
||||
|
||||
@@ -475,5 +474,4 @@ float TSL2591Component::get_actual_gain() {
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace tsl2591
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tsl2591
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
|
||||
#include <cinttypes>
|
||||
|
||||
namespace esphome {
|
||||
namespace tsl2591 {
|
||||
namespace esphome::tsl2591 {
|
||||
|
||||
/** Enum listing all conversion/integration time settings for the TSL2591.
|
||||
*
|
||||
@@ -270,5 +269,4 @@ class TSL2591Component : public PollingComponent, public i2c::I2CDevice {
|
||||
void interval_function_for_update_();
|
||||
};
|
||||
|
||||
} // namespace tsl2591
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tsl2591
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "tt21100_button.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tt21100 {
|
||||
namespace esphome::tt21100 {
|
||||
|
||||
static const char *const TAG = "tt21100.binary_sensor";
|
||||
|
||||
@@ -23,5 +22,4 @@ void TT21100Button::update_button(uint8_t index, uint16_t state) {
|
||||
this->publish_state(state > 0);
|
||||
}
|
||||
|
||||
} // namespace tt21100
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tt21100
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
#include "esphome/core/component.h"
|
||||
#include "esphome/core/helpers.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tt21100 {
|
||||
namespace esphome::tt21100 {
|
||||
|
||||
class TT21100Button : public binary_sensor::BinarySensor,
|
||||
public Component,
|
||||
@@ -24,5 +23,4 @@ class TT21100Button : public binary_sensor::BinarySensor,
|
||||
uint8_t index_;
|
||||
};
|
||||
|
||||
} // namespace tt21100
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tt21100
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "tt21100.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tt21100 {
|
||||
namespace esphome::tt21100 {
|
||||
|
||||
static const char *const TAG = "tt21100";
|
||||
|
||||
@@ -139,5 +138,4 @@ void TT21100Touchscreen::dump_config() {
|
||||
LOG_PIN(" Reset Pin: ", this->reset_pin_);
|
||||
}
|
||||
|
||||
} // namespace tt21100
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tt21100
|
||||
|
||||
@@ -7,8 +7,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace esphome {
|
||||
namespace tt21100 {
|
||||
namespace esphome::tt21100 {
|
||||
|
||||
using namespace touchscreen;
|
||||
|
||||
@@ -39,5 +38,4 @@ class TT21100Touchscreen : public Touchscreen, public i2c::I2CDevice {
|
||||
std::vector<TT21100ButtonListener *> button_listeners_;
|
||||
};
|
||||
|
||||
} // namespace tt21100
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tt21100
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "ttp229_bsf.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace ttp229_bsf {
|
||||
namespace esphome::ttp229_bsf {
|
||||
|
||||
static const char *const TAG = "ttp229_bsf";
|
||||
|
||||
@@ -18,5 +17,4 @@ void TTP229BSFComponent::dump_config() {
|
||||
LOG_PIN(" SDO pin: ", this->sdo_pin_);
|
||||
}
|
||||
|
||||
} // namespace ttp229_bsf
|
||||
} // namespace esphome
|
||||
} // namespace esphome::ttp229_bsf
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace esphome {
|
||||
namespace ttp229_bsf {
|
||||
namespace esphome::ttp229_bsf {
|
||||
|
||||
class TTP229BSFChannel : public binary_sensor::BinarySensor {
|
||||
public:
|
||||
@@ -51,5 +50,4 @@ class TTP229BSFComponent : public Component {
|
||||
std::vector<TTP229BSFChannel *> channels_{};
|
||||
};
|
||||
|
||||
} // namespace ttp229_bsf
|
||||
} // namespace esphome
|
||||
} // namespace esphome::ttp229_bsf
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "ttp229_lsf.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace ttp229_lsf {
|
||||
namespace esphome::ttp229_lsf {
|
||||
|
||||
static const char *const TAG = "ttp229_lsf";
|
||||
|
||||
@@ -40,5 +39,4 @@ void TTP229LSFComponent::loop() {
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace ttp229_lsf
|
||||
} // namespace esphome
|
||||
} // namespace esphome::ttp229_lsf
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace esphome {
|
||||
namespace ttp229_lsf {
|
||||
namespace esphome::ttp229_lsf {
|
||||
|
||||
class TTP229Channel : public binary_sensor::BinarySensor {
|
||||
public:
|
||||
@@ -33,5 +32,4 @@ class TTP229LSFComponent : public Component, public i2c::I2CDevice {
|
||||
} error_code_{NONE};
|
||||
};
|
||||
|
||||
} // namespace ttp229_lsf
|
||||
} // namespace esphome
|
||||
} // namespace esphome::ttp229_lsf
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
|
||||
static const char *const TAG = "tuya.automation";
|
||||
|
||||
namespace esphome {
|
||||
namespace tuya {
|
||||
namespace esphome::tuya {
|
||||
|
||||
void check_expected_datapoint(const TuyaDatapoint &dp, TuyaDatapointType expected) {
|
||||
if (dp.type != expected) {
|
||||
@@ -63,5 +62,4 @@ TuyaBitmaskDatapointUpdateTrigger::TuyaBitmaskDatapointUpdateTrigger(Tuya *paren
|
||||
});
|
||||
}
|
||||
|
||||
} // namespace tuya
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tuya
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace esphome {
|
||||
namespace tuya {
|
||||
namespace esphome::tuya {
|
||||
|
||||
class TuyaDatapointUpdateTrigger : public Trigger<TuyaDatapoint> {
|
||||
public:
|
||||
@@ -51,5 +50,4 @@ class TuyaBitmaskDatapointUpdateTrigger : public Trigger<uint32_t> {
|
||||
explicit TuyaBitmaskDatapointUpdateTrigger(Tuya *parent, uint8_t sensor_id);
|
||||
};
|
||||
|
||||
} // namespace tuya
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tuya
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "esphome/core/log.h"
|
||||
#include "tuya_binary_sensor.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tuya {
|
||||
namespace esphome::tuya {
|
||||
|
||||
static const char *const TAG = "tuya.binary_sensor";
|
||||
|
||||
@@ -20,5 +19,4 @@ void TuyaBinarySensor::dump_config() {
|
||||
this->sensor_id_);
|
||||
}
|
||||
|
||||
} // namespace tuya
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tuya
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/components/tuya/tuya.h"
|
||||
#include "esphome/components/binary_sensor/binary_sensor.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tuya {
|
||||
namespace esphome::tuya {
|
||||
|
||||
class TuyaBinarySensor : public binary_sensor::BinarySensor, public Component {
|
||||
public:
|
||||
@@ -20,5 +19,4 @@ class TuyaBinarySensor : public binary_sensor::BinarySensor, public Component {
|
||||
uint8_t sensor_id_{0};
|
||||
};
|
||||
|
||||
} // namespace tuya
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tuya
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "tuya_climate.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tuya {
|
||||
namespace esphome::tuya {
|
||||
|
||||
static const char *const TAG = "tuya.climate";
|
||||
|
||||
@@ -533,5 +532,4 @@ void TuyaClimate::switch_to_action_(climate::ClimateAction action) {
|
||||
this->action = action;
|
||||
}
|
||||
|
||||
} // namespace tuya
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tuya
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/components/tuya/tuya.h"
|
||||
#include "esphome/components/climate/climate.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tuya {
|
||||
namespace esphome::tuya {
|
||||
|
||||
class TuyaClimate : public climate::Climate, public Component {
|
||||
public:
|
||||
@@ -125,5 +124,4 @@ class TuyaClimate : public climate::Climate, public Component {
|
||||
bool reports_fahrenheit_{false};
|
||||
};
|
||||
|
||||
} // namespace tuya
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tuya
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "esphome/core/log.h"
|
||||
#include "tuya_cover.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tuya {
|
||||
namespace esphome::tuya {
|
||||
|
||||
const uint8_t COMMAND_OPEN = 0x00;
|
||||
const uint8_t COMMAND_CLOSE = 0x02;
|
||||
@@ -140,5 +139,4 @@ cover::CoverTraits TuyaCover::get_traits() {
|
||||
return traits;
|
||||
}
|
||||
|
||||
} // namespace tuya
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tuya
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/components/tuya/tuya.h"
|
||||
#include "esphome/components/cover/cover.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tuya {
|
||||
namespace esphome::tuya {
|
||||
|
||||
enum TuyaCoverRestoreMode {
|
||||
COVER_NO_RESTORE,
|
||||
@@ -46,5 +45,4 @@ class TuyaCover : public cover::Cover, public Component {
|
||||
bool invert_position_report_;
|
||||
};
|
||||
|
||||
} // namespace tuya
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tuya
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "esphome/core/log.h"
|
||||
#include "tuya_fan.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tuya {
|
||||
namespace esphome::tuya {
|
||||
|
||||
static const char *const TAG = "tuya.fan";
|
||||
|
||||
@@ -127,5 +126,4 @@ void TuyaFan::control(const fan::FanCall &call) {
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace tuya
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tuya
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/components/tuya/tuya.h"
|
||||
#include "esphome/components/fan/fan.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tuya {
|
||||
namespace esphome::tuya {
|
||||
|
||||
class TuyaFan : public Component, public fan::Fan {
|
||||
public:
|
||||
@@ -32,5 +31,4 @@ class TuyaFan : public Component, public fan::Fan {
|
||||
TuyaDatapointType oscillation_type_{};
|
||||
};
|
||||
|
||||
} // namespace tuya
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tuya
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
#include "tuya_light.h"
|
||||
#include "esphome/core/helpers.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tuya {
|
||||
namespace esphome::tuya {
|
||||
|
||||
static const char *const TAG = "tuya.light";
|
||||
|
||||
@@ -228,5 +227,4 @@ void TuyaLight::write_state(light::LightState *state) {
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace tuya
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tuya
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/components/tuya/tuya.h"
|
||||
#include "esphome/components/light/light_output.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tuya {
|
||||
namespace esphome::tuya {
|
||||
|
||||
enum TuyaColorType { RGB, HSV, RGBHSV };
|
||||
|
||||
@@ -65,5 +64,4 @@ class TuyaLight : public Component, public light::LightOutput {
|
||||
light::LightState *state_{nullptr};
|
||||
};
|
||||
|
||||
} // namespace tuya
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tuya
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "esphome/core/log.h"
|
||||
#include "tuya_number.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tuya {
|
||||
namespace esphome::tuya {
|
||||
|
||||
static const char *const TAG = "tuya.number";
|
||||
|
||||
@@ -91,5 +90,4 @@ void TuyaNumber::dump_config() {
|
||||
ESP_LOGCONFIG(TAG, " Restore Value: %s", YESNO(this->restore_value_));
|
||||
}
|
||||
|
||||
} // namespace tuya
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tuya
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
#include "esphome/core/optional.h"
|
||||
#include "esphome/core/preferences.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tuya {
|
||||
namespace esphome::tuya {
|
||||
|
||||
class TuyaNumber : public number::Number, public Component {
|
||||
public:
|
||||
@@ -34,5 +33,4 @@ class TuyaNumber : public number::Number, public Component {
|
||||
ESPPreferenceObject pref_;
|
||||
};
|
||||
|
||||
} // namespace tuya
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tuya
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "esphome/core/log.h"
|
||||
#include "tuya_select.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tuya {
|
||||
namespace esphome::tuya {
|
||||
|
||||
static const char *const TAG = "tuya.select";
|
||||
|
||||
@@ -47,5 +46,4 @@ void TuyaSelect::dump_config() {
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace tuya
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tuya
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace esphome {
|
||||
namespace tuya {
|
||||
namespace esphome::tuya {
|
||||
|
||||
class TuyaSelect : public select::Select, public Component {
|
||||
public:
|
||||
@@ -32,5 +31,4 @@ class TuyaSelect : public select::Select, public Component {
|
||||
bool is_int_ = false;
|
||||
};
|
||||
|
||||
} // namespace tuya
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tuya
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
#include "tuya_sensor.h"
|
||||
#include <cinttypes>
|
||||
|
||||
namespace esphome {
|
||||
namespace tuya {
|
||||
namespace esphome::tuya {
|
||||
|
||||
static const char *const TAG = "tuya.sensor";
|
||||
|
||||
@@ -30,5 +29,4 @@ void TuyaSensor::dump_config() {
|
||||
ESP_LOGCONFIG(TAG, " Sensor has datapoint ID %u", this->sensor_id_);
|
||||
}
|
||||
|
||||
} // namespace tuya
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tuya
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/components/tuya/tuya.h"
|
||||
#include "esphome/components/sensor/sensor.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tuya {
|
||||
namespace esphome::tuya {
|
||||
|
||||
class TuyaSensor : public sensor::Sensor, public Component {
|
||||
public:
|
||||
@@ -20,5 +19,4 @@ class TuyaSensor : public sensor::Sensor, public Component {
|
||||
uint8_t sensor_id_{0};
|
||||
};
|
||||
|
||||
} // namespace tuya
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tuya
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "esphome/core/log.h"
|
||||
#include "tuya_switch.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tuya {
|
||||
namespace esphome::tuya {
|
||||
|
||||
static const char *const TAG = "tuya.switch";
|
||||
|
||||
@@ -24,5 +23,4 @@ void TuyaSwitch::dump_config() {
|
||||
ESP_LOGCONFIG(TAG, " Switch has datapoint ID %u", this->switch_id_);
|
||||
}
|
||||
|
||||
} // namespace tuya
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tuya
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/components/tuya/tuya.h"
|
||||
#include "esphome/components/switch/switch.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tuya {
|
||||
namespace esphome::tuya {
|
||||
|
||||
class TuyaSwitch : public switch_::Switch, public Component {
|
||||
public:
|
||||
@@ -22,5 +21,4 @@ class TuyaSwitch : public switch_::Switch, public Component {
|
||||
uint8_t switch_id_{0};
|
||||
};
|
||||
|
||||
} // namespace tuya
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tuya
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
#include "esphome/core/entity_base.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tuya {
|
||||
namespace esphome::tuya {
|
||||
|
||||
static const char *const TAG = "tuya.text_sensor";
|
||||
|
||||
@@ -43,5 +42,4 @@ void TuyaTextSensor::dump_config() {
|
||||
this->sensor_id_);
|
||||
}
|
||||
|
||||
} // namespace tuya
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tuya
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/components/tuya/tuya.h"
|
||||
#include "esphome/components/text_sensor/text_sensor.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace tuya {
|
||||
namespace esphome::tuya {
|
||||
|
||||
class TuyaTextSensor : public text_sensor::TextSensor, public Component {
|
||||
public:
|
||||
@@ -20,5 +19,4 @@ class TuyaTextSensor : public text_sensor::TextSensor, public Component {
|
||||
uint8_t sensor_id_{0};
|
||||
};
|
||||
|
||||
} // namespace tuya
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tuya
|
||||
|
||||
@@ -13,8 +13,7 @@
|
||||
#include "esphome/components/captive_portal/captive_portal.h"
|
||||
#endif
|
||||
|
||||
namespace esphome {
|
||||
namespace tuya {
|
||||
namespace esphome::tuya {
|
||||
|
||||
static const char *const TAG = "tuya";
|
||||
static const int COMMAND_DELAY = 10;
|
||||
@@ -760,5 +759,4 @@ void Tuya::register_listener(uint8_t datapoint_id, const std::function<void(Tuya
|
||||
|
||||
TuyaInitState Tuya::get_init_state() { return this->init_state_; }
|
||||
|
||||
} // namespace tuya
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tuya
|
||||
|
||||
@@ -13,8 +13,7 @@
|
||||
#include "esphome/core/time.h"
|
||||
#endif
|
||||
|
||||
namespace esphome {
|
||||
namespace tuya {
|
||||
namespace esphome::tuya {
|
||||
|
||||
enum class TuyaDatapointType : uint8_t {
|
||||
RAW = 0x00, // variable length
|
||||
@@ -162,5 +161,4 @@ class Tuya : public Component, public uart::UARTDevice {
|
||||
CallbackManager<void()> initialized_callback_{};
|
||||
};
|
||||
|
||||
} // namespace tuya
|
||||
} // namespace esphome
|
||||
} // namespace esphome::tuya
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user