mirror of
https://github.com/esphome/esphome.git
synced 2026-06-24 15:28:53 +00:00
[clang-tidy] Concatenate nested namespaces (2/7: components d-h) (#16295)
This commit is contained in:
@@ -3,8 +3,7 @@
|
||||
#include "esphome/core/helpers.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace dac7678 {
|
||||
namespace esphome::dac7678 {
|
||||
|
||||
static const char *const TAG = "dac7678";
|
||||
|
||||
@@ -82,5 +81,4 @@ void DAC7678Channel::write_state(float state) {
|
||||
this->parent_->set_channel_value_(this->channel_, input);
|
||||
}
|
||||
|
||||
} // namespace dac7678
|
||||
} // namespace esphome
|
||||
} // namespace esphome::dac7678
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
#include "esphome/components/output/float_output.h"
|
||||
#include "esphome/components/i2c/i2c.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace dac7678 {
|
||||
namespace esphome::dac7678 {
|
||||
|
||||
class DAC7678Output;
|
||||
|
||||
@@ -51,5 +50,4 @@ class DAC7678Output : public Component, public i2c::I2CDevice {
|
||||
};
|
||||
};
|
||||
|
||||
} // namespace dac7678
|
||||
} // namespace esphome
|
||||
} // namespace esphome::dac7678
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "daikin.h"
|
||||
#include "esphome/components/remote_base/remote_base.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace daikin {
|
||||
namespace esphome::daikin {
|
||||
|
||||
static const char *const TAG = "daikin.climate";
|
||||
|
||||
@@ -251,5 +250,4 @@ bool DaikinClimate::on_receive(remote_base::RemoteReceiveData data) {
|
||||
return this->parse_state_frame_(state_frame);
|
||||
}
|
||||
|
||||
} // namespace daikin
|
||||
} // namespace esphome
|
||||
} // namespace esphome::daikin
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
|
||||
#include "esphome/components/climate_ir/climate_ir.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace daikin {
|
||||
namespace esphome::daikin {
|
||||
|
||||
// Values for Daikin ARC43XXX IR Controllers
|
||||
// Temperature
|
||||
@@ -60,5 +59,4 @@ class DaikinClimate : public climate_ir::ClimateIR {
|
||||
bool parse_state_frame_(const uint8_t frame[]);
|
||||
};
|
||||
|
||||
} // namespace daikin
|
||||
} // namespace esphome
|
||||
} // namespace esphome::daikin
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
#include "esphome/components/remote_base/remote_base.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace daikin_arc {
|
||||
namespace esphome::daikin_arc {
|
||||
|
||||
static const char *const TAG = "daikin.climate";
|
||||
|
||||
@@ -492,5 +491,4 @@ void DaikinArcClimate::control(const climate::ClimateCall &call) {
|
||||
climate_ir::ClimateIR::control(call);
|
||||
}
|
||||
|
||||
} // namespace daikin_arc
|
||||
} // namespace esphome
|
||||
} // namespace esphome::daikin_arc
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
|
||||
#include "esphome/components/climate_ir/climate_ir.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace daikin_arc {
|
||||
namespace esphome::daikin_arc {
|
||||
|
||||
// Values for Daikin ARC43XXX IR Controllers
|
||||
// Temperature
|
||||
@@ -73,5 +72,4 @@ class DaikinArcClimate : public climate_ir::ClimateIR {
|
||||
uint8_t last_humidity_{0x66};
|
||||
};
|
||||
|
||||
} // namespace daikin_arc
|
||||
} // namespace esphome
|
||||
} // namespace esphome::daikin_arc
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "daikin_brc.h"
|
||||
#include "esphome/components/remote_base/remote_base.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace daikin_brc {
|
||||
namespace esphome::daikin_brc {
|
||||
|
||||
static const char *const TAG = "daikin_brc.climate";
|
||||
|
||||
@@ -269,5 +268,4 @@ bool DaikinBrcClimate::on_receive(remote_base::RemoteReceiveData data) {
|
||||
return this->parse_state_frame_(state_frame);
|
||||
}
|
||||
|
||||
} // namespace daikin_brc
|
||||
} // namespace esphome
|
||||
} // namespace esphome::daikin_brc
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
|
||||
#include "esphome/components/climate_ir/climate_ir.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace daikin_brc {
|
||||
namespace esphome::daikin_brc {
|
||||
|
||||
// Values for Daikin BRC4CXXX IR Controllers
|
||||
// Temperature
|
||||
@@ -78,5 +77,4 @@ class DaikinBrcClimate : public climate_ir::ClimateIR {
|
||||
bool fahrenheit_{false};
|
||||
};
|
||||
|
||||
} // namespace daikin_brc
|
||||
} // namespace esphome
|
||||
} // namespace esphome::daikin_brc
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "dallas_temp.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace dallas_temp {
|
||||
namespace esphome::dallas_temp {
|
||||
|
||||
static const char *const TAG = "dallas.temp.sensor";
|
||||
|
||||
@@ -159,5 +158,4 @@ float DallasTemperatureSensor::get_temp_c_() {
|
||||
return temp / 16.0f;
|
||||
}
|
||||
|
||||
} // namespace dallas_temp
|
||||
} // namespace esphome
|
||||
} // namespace esphome::dallas_temp
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/components/sensor/sensor.h"
|
||||
#include "esphome/components/one_wire/one_wire.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace dallas_temp {
|
||||
namespace esphome::dallas_temp {
|
||||
|
||||
class DallasTemperatureSensor : public PollingComponent, public sensor::Sensor, public one_wire::OneWireDevice {
|
||||
public:
|
||||
@@ -27,5 +26,4 @@ class DallasTemperatureSensor : public PollingComponent, public sensor::Sensor,
|
||||
float get_temp_c_();
|
||||
};
|
||||
|
||||
} // namespace dallas_temp
|
||||
} // namespace esphome
|
||||
} // namespace esphome::dallas_temp
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/core/helpers.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace daly_bms {
|
||||
namespace esphome::daly_bms {
|
||||
|
||||
static const char *const TAG = "daly_bms";
|
||||
|
||||
@@ -321,5 +320,4 @@ void DalyBmsComponent::decode_data_(std::vector<uint8_t> data) {
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace daly_bms
|
||||
} // namespace esphome
|
||||
} // namespace esphome::daly_bms
|
||||
|
||||
@@ -15,8 +15,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace esphome {
|
||||
namespace daly_bms {
|
||||
namespace esphome::daly_bms {
|
||||
|
||||
class DalyBmsComponent : public PollingComponent, public uart::UARTDevice {
|
||||
public:
|
||||
@@ -88,5 +87,4 @@ class DalyBmsComponent : public PollingComponent, public uart::UARTDevice {
|
||||
uint8_t next_request_;
|
||||
};
|
||||
|
||||
} // namespace daly_bms
|
||||
} // namespace esphome
|
||||
} // namespace esphome::daly_bms
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
#include "dashboard_import.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace dashboard_import {
|
||||
namespace esphome::dashboard_import {
|
||||
|
||||
static const char *g_package_import_url = ""; // NOLINT
|
||||
|
||||
const char *get_package_import_url() { return g_package_import_url; }
|
||||
void set_package_import_url(const char *url) { g_package_import_url = url; }
|
||||
|
||||
} // namespace dashboard_import
|
||||
} // namespace esphome
|
||||
} // namespace esphome::dashboard_import
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
namespace esphome {
|
||||
namespace dashboard_import {
|
||||
namespace esphome::dashboard_import {
|
||||
|
||||
const char *get_package_import_url();
|
||||
void set_package_import_url(const char *url);
|
||||
|
||||
} // namespace dashboard_import
|
||||
} // namespace esphome
|
||||
} // namespace esphome::dashboard_import
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
#include <cinttypes>
|
||||
#include <climits>
|
||||
|
||||
namespace esphome {
|
||||
namespace debug {
|
||||
namespace esphome::debug {
|
||||
|
||||
static const char *const TAG = "debug";
|
||||
|
||||
@@ -93,5 +92,4 @@ void DebugComponent::update() {
|
||||
|
||||
float DebugComponent::get_setup_priority() const { return setup_priority::LATE; }
|
||||
|
||||
} // namespace debug
|
||||
} // namespace esphome
|
||||
} // namespace esphome::debug
|
||||
|
||||
@@ -13,8 +13,7 @@
|
||||
#include "esphome/components/text_sensor/text_sensor.h"
|
||||
#endif
|
||||
|
||||
namespace esphome {
|
||||
namespace debug {
|
||||
namespace esphome::debug {
|
||||
|
||||
static constexpr size_t DEVICE_INFO_BUFFER_SIZE = 256;
|
||||
static constexpr size_t RESET_REASON_BUFFER_SIZE = 128;
|
||||
@@ -101,5 +100,4 @@ class DebugComponent : public PollingComponent {
|
||||
void update_platform_();
|
||||
};
|
||||
|
||||
} // namespace debug
|
||||
} // namespace esphome
|
||||
} // namespace esphome::debug
|
||||
|
||||
@@ -16,8 +16,7 @@
|
||||
#include <Esp.h>
|
||||
#endif
|
||||
|
||||
namespace esphome {
|
||||
namespace debug {
|
||||
namespace esphome::debug {
|
||||
|
||||
static const char *const TAG = "debug";
|
||||
|
||||
@@ -311,6 +310,6 @@ void DebugComponent::update_platform_() {
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace debug
|
||||
} // namespace esphome
|
||||
} // namespace esphome::debug
|
||||
|
||||
#endif // USE_ESP32
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
#include "esphome/core/application.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace deep_sleep {
|
||||
namespace esphome::deep_sleep {
|
||||
|
||||
static const char *const TAG = "deep_sleep";
|
||||
// 5 seconds for deep sleep to ensure clean disconnect from Home Assistant
|
||||
@@ -81,5 +80,4 @@ void DeepSleepComponent::prevent_deep_sleep() { this->prevent_ = true; }
|
||||
|
||||
void DeepSleepComponent::allow_deep_sleep() { this->prevent_ = false; }
|
||||
|
||||
} // namespace deep_sleep
|
||||
} // namespace esphome
|
||||
} // namespace esphome::deep_sleep
|
||||
|
||||
@@ -15,8 +15,7 @@
|
||||
|
||||
#include <cinttypes>
|
||||
|
||||
namespace esphome {
|
||||
namespace deep_sleep {
|
||||
namespace esphome::deep_sleep {
|
||||
|
||||
#if defined(USE_ESP32) || defined(USE_BK72XX)
|
||||
|
||||
@@ -244,5 +243,4 @@ template<typename... Ts> class AllowDeepSleepAction : public Action<Ts...>, publ
|
||||
void play(const Ts &...x) override { this->parent_->allow_deep_sleep(); }
|
||||
};
|
||||
|
||||
} // namespace deep_sleep
|
||||
} // namespace esphome
|
||||
} // namespace esphome::deep_sleep
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
#include "esphome/core/log.h"
|
||||
#include <esp_idf_version.h>
|
||||
|
||||
namespace esphome {
|
||||
namespace deep_sleep {
|
||||
namespace esphome::deep_sleep {
|
||||
|
||||
// Deep Sleep feature support matrix for ESP32 variants:
|
||||
//
|
||||
@@ -167,6 +166,6 @@ void DeepSleepComponent::deep_sleep_() {
|
||||
|
||||
bool DeepSleepComponent::should_teardown_() { return true; }
|
||||
|
||||
} // namespace deep_sleep
|
||||
} // namespace esphome
|
||||
} // namespace esphome::deep_sleep
|
||||
|
||||
#endif // USE_ESP32
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "delonghi.h"
|
||||
#include "esphome/components/remote_base/remote_base.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace delonghi {
|
||||
namespace esphome::delonghi {
|
||||
|
||||
static const char *const TAG = "delonghi.climate";
|
||||
|
||||
@@ -182,5 +181,4 @@ bool DelonghiClimate::on_receive(remote_base::RemoteReceiveData data) {
|
||||
return this->parse_state_frame_(state_frame);
|
||||
}
|
||||
|
||||
} // namespace delonghi
|
||||
} // namespace esphome
|
||||
} // namespace esphome::delonghi
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
|
||||
#include "esphome/components/climate_ir/climate_ir.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace delonghi {
|
||||
namespace esphome::delonghi {
|
||||
|
||||
// Values for DELONGHI ARC43XXX IR Controllers
|
||||
const uint8_t DELONGHI_ADDRESS = 83;
|
||||
@@ -60,5 +59,4 @@ class DelonghiClimate : public climate_ir::ClimateIR {
|
||||
bool parse_state_frame_(const uint8_t frame[]);
|
||||
};
|
||||
|
||||
} // namespace delonghi
|
||||
} // namespace esphome
|
||||
} // namespace esphome::delonghi
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/components/alarm_control_panel/alarm_control_panel.h"
|
||||
#include "esphome/core/component.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace demo {
|
||||
namespace esphome::demo {
|
||||
|
||||
using namespace alarm_control_panel;
|
||||
|
||||
@@ -62,5 +61,4 @@ class DemoAlarmControlPanel : public AlarmControlPanel, public Component {
|
||||
DemoAlarmControlPanelType type_{};
|
||||
};
|
||||
|
||||
} // namespace demo
|
||||
} // namespace esphome
|
||||
} // namespace esphome::demo
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/core/component.h"
|
||||
#include "esphome/components/binary_sensor/binary_sensor.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace demo {
|
||||
namespace esphome::demo {
|
||||
|
||||
class DemoBinarySensor : public binary_sensor::BinarySensor, public PollingComponent {
|
||||
public:
|
||||
@@ -18,5 +17,4 @@ class DemoBinarySensor : public binary_sensor::BinarySensor, public PollingCompo
|
||||
bool last_state_ = false;
|
||||
};
|
||||
|
||||
} // namespace demo
|
||||
} // namespace esphome
|
||||
} // namespace esphome::demo
|
||||
|
||||
@@ -3,13 +3,11 @@
|
||||
#include "esphome/components/button/button.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace demo {
|
||||
namespace esphome::demo {
|
||||
|
||||
class DemoButton : public button::Button {
|
||||
protected:
|
||||
void press_action() override {}
|
||||
};
|
||||
|
||||
} // namespace demo
|
||||
} // namespace esphome
|
||||
} // namespace esphome::demo
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/core/component.h"
|
||||
#include "esphome/components/climate/climate.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace demo {
|
||||
namespace esphome::demo {
|
||||
|
||||
enum class DemoClimateType {
|
||||
TYPE_1,
|
||||
@@ -158,5 +157,4 @@ class DemoClimate : public climate::Climate, public Component {
|
||||
DemoClimateType type_;
|
||||
};
|
||||
|
||||
} // namespace demo
|
||||
} // namespace esphome
|
||||
} // namespace esphome::demo
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/core/component.h"
|
||||
#include "esphome/components/cover/cover.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace demo {
|
||||
namespace esphome::demo {
|
||||
|
||||
enum class DemoCoverType {
|
||||
TYPE_1,
|
||||
@@ -85,5 +84,4 @@ class DemoCover : public cover::Cover, public Component {
|
||||
DemoCoverType type_;
|
||||
};
|
||||
|
||||
} // namespace demo
|
||||
} // namespace esphome
|
||||
} // namespace esphome::demo
|
||||
|
||||
@@ -7,8 +7,7 @@
|
||||
#include "esphome/components/datetime/date_entity.h"
|
||||
#include "esphome/core/component.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace demo {
|
||||
namespace esphome::demo {
|
||||
|
||||
class DemoDate : public datetime::DateEntity, public Component {
|
||||
public:
|
||||
@@ -28,7 +27,6 @@ class DemoDate : public datetime::DateEntity, public Component {
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace demo
|
||||
} // namespace esphome
|
||||
} // namespace esphome::demo
|
||||
|
||||
#endif
|
||||
|
||||
@@ -7,8 +7,7 @@
|
||||
#include "esphome/components/datetime/datetime_entity.h"
|
||||
#include "esphome/core/component.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace demo {
|
||||
namespace esphome::demo {
|
||||
|
||||
class DemoDateTime : public datetime::DateTimeEntity, public Component {
|
||||
public:
|
||||
@@ -34,7 +33,6 @@ class DemoDateTime : public datetime::DateTimeEntity, public Component {
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace demo
|
||||
} // namespace esphome
|
||||
} // namespace esphome::demo
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/core/component.h"
|
||||
#include "esphome/components/fan/fan.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace demo {
|
||||
namespace esphome::demo {
|
||||
|
||||
enum class DemoFanType {
|
||||
TYPE_1,
|
||||
@@ -66,5 +65,4 @@ class DemoFan : public fan::Fan, public Component {
|
||||
DemoFanType type_;
|
||||
};
|
||||
|
||||
} // namespace demo
|
||||
} // namespace esphome
|
||||
} // namespace esphome::demo
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/core/component.h"
|
||||
#include "esphome/components/light/light_output.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace demo {
|
||||
namespace esphome::demo {
|
||||
|
||||
enum class DemoLightType {
|
||||
// binary
|
||||
@@ -64,5 +63,4 @@ class DemoLight : public light::LightOutput, public Component {
|
||||
DemoLightType type_;
|
||||
};
|
||||
|
||||
} // namespace demo
|
||||
} // namespace esphome
|
||||
} // namespace esphome::demo
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
|
||||
#include "esphome/components/lock/lock.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace demo {
|
||||
namespace esphome::demo {
|
||||
|
||||
class DemoLock : public lock::Lock {
|
||||
protected:
|
||||
@@ -14,5 +13,4 @@ class DemoLock : public lock::Lock {
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace demo
|
||||
} // namespace esphome
|
||||
} // namespace esphome::demo
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/core/component.h"
|
||||
#include "esphome/components/number/number.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace demo {
|
||||
namespace esphome::demo {
|
||||
|
||||
enum class DemoNumberType {
|
||||
TYPE_1,
|
||||
@@ -35,5 +34,4 @@ class DemoNumber : public number::Number, public Component {
|
||||
DemoNumberType type_;
|
||||
};
|
||||
|
||||
} // namespace demo
|
||||
} // namespace esphome
|
||||
} // namespace esphome::demo
|
||||
|
||||
@@ -3,13 +3,11 @@
|
||||
#include "esphome/components/select/select.h"
|
||||
#include "esphome/core/component.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace demo {
|
||||
namespace esphome::demo {
|
||||
|
||||
class DemoSelect : public select::Select, public Component {
|
||||
protected:
|
||||
void control(size_t index) override { this->publish_state(index); }
|
||||
};
|
||||
|
||||
} // namespace demo
|
||||
} // namespace esphome
|
||||
} // namespace esphome::demo
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/core/helpers.h"
|
||||
#include "esphome/components/sensor/sensor.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace demo {
|
||||
namespace esphome::demo {
|
||||
|
||||
class DemoSensor : public sensor::Sensor, public PollingComponent {
|
||||
public:
|
||||
@@ -25,5 +24,4 @@ class DemoSensor : public sensor::Sensor, public PollingComponent {
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace demo
|
||||
} // namespace esphome
|
||||
} // namespace esphome::demo
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/core/helpers.h"
|
||||
#include "esphome/components/switch/switch.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace demo {
|
||||
namespace esphome::demo {
|
||||
|
||||
class DemoSwitch : public switch_::Switch, public Component {
|
||||
public:
|
||||
@@ -18,5 +17,4 @@ class DemoSwitch : public switch_::Switch, public Component {
|
||||
void write_state(bool state) override { this->publish_state(state); }
|
||||
};
|
||||
|
||||
} // namespace demo
|
||||
} // namespace esphome
|
||||
} // namespace esphome::demo
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/components/text/text.h"
|
||||
#include "esphome/core/component.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace demo {
|
||||
namespace esphome::demo {
|
||||
|
||||
class DemoText : public text::Text, public Component {
|
||||
public:
|
||||
@@ -14,5 +13,4 @@ class DemoText : public text::Text, public Component {
|
||||
void control(const std::string &value) override { this->publish_state(value); }
|
||||
};
|
||||
|
||||
} // namespace demo
|
||||
} // namespace esphome
|
||||
} // namespace esphome::demo
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/core/helpers.h"
|
||||
#include "esphome/components/text_sensor/text_sensor.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace demo {
|
||||
namespace esphome::demo {
|
||||
|
||||
class DemoTextSensor : public text_sensor::TextSensor, public PollingComponent {
|
||||
public:
|
||||
@@ -21,5 +20,4 @@ class DemoTextSensor : public text_sensor::TextSensor, public PollingComponent {
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace demo
|
||||
} // namespace esphome
|
||||
} // namespace esphome::demo
|
||||
|
||||
@@ -7,8 +7,7 @@
|
||||
#include "esphome/components/datetime/time_entity.h"
|
||||
#include "esphome/core/component.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace demo {
|
||||
namespace esphome::demo {
|
||||
|
||||
class DemoTime : public datetime::TimeEntity, public Component {
|
||||
public:
|
||||
@@ -28,7 +27,6 @@ class DemoTime : public datetime::TimeEntity, public Component {
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace demo
|
||||
} // namespace esphome
|
||||
} // namespace esphome::demo
|
||||
|
||||
#endif
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
|
||||
#include "esphome/components/valve/valve.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace demo {
|
||||
namespace esphome::demo {
|
||||
|
||||
enum class DemoValveType {
|
||||
TYPE_1,
|
||||
@@ -53,5 +52,4 @@ class DemoValve : public valve::Valve {
|
||||
DemoValveType type_{};
|
||||
};
|
||||
|
||||
} // namespace demo
|
||||
} // namespace esphome
|
||||
} // namespace esphome::demo
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
#include "esphome/core/helpers.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace dfplayer {
|
||||
namespace esphome::dfplayer {
|
||||
|
||||
static const char *const TAG = "dfplayer";
|
||||
|
||||
@@ -283,5 +282,4 @@ void DFPlayer::dump_config() {
|
||||
this->check_uart_settings(9600);
|
||||
}
|
||||
|
||||
} // namespace dfplayer
|
||||
} // namespace esphome
|
||||
} // namespace esphome::dfplayer
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
|
||||
const size_t DFPLAYER_READ_BUFFER_LENGTH = 25; // two messages + some extra
|
||||
|
||||
namespace esphome {
|
||||
namespace dfplayer {
|
||||
namespace esphome::dfplayer {
|
||||
|
||||
enum EqPreset {
|
||||
NORMAL = 0,
|
||||
@@ -171,5 +170,4 @@ template<typename... Ts> class DFPlayerIsPlayingCondition : public Condition<Ts.
|
||||
bool check(const Ts &...x) override { return this->parent_->is_playing(); }
|
||||
};
|
||||
|
||||
} // namespace dfplayer
|
||||
} // namespace esphome
|
||||
} // namespace esphome::dfplayer
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
|
||||
#include "dfrobot_sen0395.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace dfrobot_sen0395 {
|
||||
namespace esphome::dfrobot_sen0395 {
|
||||
|
||||
template<typename... Ts>
|
||||
class DfrobotSen0395ResetAction : public Action<Ts...>, public Parented<DfrobotSen0395Component> {
|
||||
@@ -85,5 +84,4 @@ class DfrobotSen0395SettingsAction : public Action<Ts...>, public Parented<Dfrob
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace dfrobot_sen0395
|
||||
} // namespace esphome
|
||||
} // namespace esphome::dfrobot_sen0395
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
|
||||
#include "dfrobot_sen0395.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace dfrobot_sen0395 {
|
||||
namespace esphome::dfrobot_sen0395 {
|
||||
|
||||
static const char *const TAG = "dfrobot_sen0395.commands";
|
||||
|
||||
@@ -330,5 +329,4 @@ uint8_t SensitivityCommand::on_message(std::string &message) {
|
||||
return 0; // Command not done yet
|
||||
}
|
||||
|
||||
} // namespace dfrobot_sen0395
|
||||
} // namespace esphome
|
||||
} // namespace esphome::dfrobot_sen0395
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
|
||||
#include "esphome/core/helpers.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace dfrobot_sen0395 {
|
||||
namespace esphome::dfrobot_sen0395 {
|
||||
|
||||
class DfrobotSen0395Component;
|
||||
|
||||
@@ -150,5 +149,4 @@ class SensitivityCommand : public Command {
|
||||
uint8_t sensitivity_;
|
||||
};
|
||||
|
||||
} // namespace dfrobot_sen0395
|
||||
} // namespace esphome
|
||||
} // namespace esphome::dfrobot_sen0395
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/core/helpers.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace dfrobot_sen0395 {
|
||||
namespace esphome::dfrobot_sen0395 {
|
||||
|
||||
static const char *const TAG = "dfrobot_sen0395";
|
||||
const char ASCII_CR = 0x0D;
|
||||
@@ -140,5 +139,4 @@ uint8_t CircularCommandQueue::process(DfrobotSen0395Component *parent) {
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace dfrobot_sen0395
|
||||
} // namespace esphome
|
||||
} // namespace esphome::dfrobot_sen0395
|
||||
|
||||
@@ -13,8 +13,7 @@
|
||||
|
||||
#include "commands.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace dfrobot_sen0395 {
|
||||
namespace esphome::dfrobot_sen0395 {
|
||||
|
||||
const uint8_t MMWAVE_READ_BUFFER_LENGTH = 255;
|
||||
|
||||
@@ -121,5 +120,4 @@ class DfrobotSen0395Component : public uart::UARTDevice, public Component {
|
||||
friend class ReadStateCommand;
|
||||
};
|
||||
|
||||
} // namespace dfrobot_sen0395
|
||||
} // namespace esphome
|
||||
} // namespace esphome::dfrobot_sen0395
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "dfrobot_sen0395_switch.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace dfrobot_sen0395 {
|
||||
namespace esphome::dfrobot_sen0395 {
|
||||
|
||||
void Sen0395PowerSwitch::write_state(bool state) { this->parent_->enqueue(make_unique<PowerCommand>(state)); }
|
||||
|
||||
@@ -44,5 +43,4 @@ void Sen0395StartAfterBootSwitch::write_state(bool state) {
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace dfrobot_sen0395
|
||||
} // namespace esphome
|
||||
} // namespace esphome::dfrobot_sen0395
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
|
||||
#include "../dfrobot_sen0395.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace dfrobot_sen0395 {
|
||||
namespace esphome::dfrobot_sen0395 {
|
||||
|
||||
class DfrobotSen0395Switch : public switch_::Switch, public Component, public Parented<DfrobotSen0395Component> {};
|
||||
|
||||
@@ -30,5 +29,4 @@ class Sen0395StartAfterBootSwitch : public DfrobotSen0395Switch {
|
||||
void write_state(bool state) override;
|
||||
};
|
||||
|
||||
} // namespace dfrobot_sen0395
|
||||
} // namespace esphome
|
||||
} // namespace esphome::dfrobot_sen0395
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
#include "dht12.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace dht12 {
|
||||
namespace esphome::dht12 {
|
||||
|
||||
static const char *const TAG = "dht12";
|
||||
|
||||
@@ -65,5 +64,4 @@ bool DHT12Component::read_data_(uint8_t *data) {
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace dht12
|
||||
} // namespace esphome
|
||||
} // namespace esphome::dht12
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/components/sensor/sensor.h"
|
||||
#include "esphome/components/i2c/i2c.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace dht12 {
|
||||
namespace esphome::dht12 {
|
||||
|
||||
class DHT12Component : public PollingComponent, public i2c::I2CDevice {
|
||||
public:
|
||||
@@ -23,5 +22,4 @@ class DHT12Component : public PollingComponent, public i2c::I2CDevice {
|
||||
sensor::Sensor *humidity_sensor_{nullptr};
|
||||
};
|
||||
|
||||
} // namespace dht12
|
||||
} // namespace esphome
|
||||
} // namespace esphome::dht12
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
#include "esphome/core/hal.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace display {
|
||||
namespace esphome::display {
|
||||
static const char *const TAG = "display";
|
||||
|
||||
// COLOR_OFF and COLOR_ON are now inline constexpr in display.h
|
||||
@@ -927,5 +926,4 @@ const LogString *text_align_to_string(TextAlign textalign) {
|
||||
return LOG_STR("UNKNOWN");
|
||||
}
|
||||
}
|
||||
} // namespace display
|
||||
} // namespace esphome
|
||||
} // namespace esphome::display
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
#include "esphome/components/graphical_display_menu/graphical_display_menu.h"
|
||||
#endif
|
||||
|
||||
namespace esphome {
|
||||
namespace display {
|
||||
namespace esphome::display {
|
||||
|
||||
/** TextAlign is used to tell the display class how to position a piece of text. By default
|
||||
* the coordinates you enter for the print*() functions take the upper left corner of the text
|
||||
@@ -871,5 +870,4 @@ class DisplayOnPageChangeTrigger : public Trigger<DisplayPage *, DisplayPage *>
|
||||
|
||||
const LogString *text_align_to_string(TextAlign textalign);
|
||||
|
||||
} // namespace display
|
||||
} // namespace esphome
|
||||
} // namespace esphome::display
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
#include "esphome/core/application.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace display {
|
||||
namespace esphome::display {
|
||||
|
||||
static const char *const TAG = "display";
|
||||
|
||||
@@ -68,5 +67,4 @@ void HOT DisplayBuffer::draw_pixel_at(int x, int y, Color color) {
|
||||
App.feed_wdt();
|
||||
}
|
||||
|
||||
} // namespace display
|
||||
} // namespace esphome
|
||||
} // namespace esphome::display
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
#include "esphome/core/component.h"
|
||||
#include "esphome/core/defines.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace display {
|
||||
namespace esphome::display {
|
||||
|
||||
class DisplayBuffer : public Display {
|
||||
public:
|
||||
@@ -30,5 +29,4 @@ class DisplayBuffer : public Display {
|
||||
uint8_t *buffer_{nullptr};
|
||||
};
|
||||
|
||||
} // namespace display
|
||||
} // namespace esphome
|
||||
} // namespace esphome::display
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#pragma once
|
||||
#include "esphome/core/color.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace display {
|
||||
namespace esphome::display {
|
||||
enum ColorOrder : uint8_t { COLOR_ORDER_RGB = 0, COLOR_ORDER_BGR = 1, COLOR_ORDER_GRB = 2 };
|
||||
enum ColorBitness : uint8_t { COLOR_BITNESS_888 = 0, COLOR_BITNESS_565 = 1, COLOR_BITNESS_332 = 2 };
|
||||
inline static uint8_t esp_scale(uint8_t i, uint8_t scale, uint8_t max_value = 255) { return (max_value * i / scale); }
|
||||
@@ -155,5 +154,4 @@ class ColorUtil {
|
||||
return color;
|
||||
}
|
||||
};
|
||||
} // namespace display
|
||||
} // namespace esphome
|
||||
} // namespace esphome::display
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace display {
|
||||
namespace esphome::display {
|
||||
|
||||
static const char *const TAG = "display";
|
||||
|
||||
@@ -90,5 +89,4 @@ void Rect::info(const std::string &prefix) {
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace display
|
||||
} // namespace esphome
|
||||
} // namespace esphome::display
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
|
||||
#include "esphome/core/helpers.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace display {
|
||||
namespace esphome::display {
|
||||
|
||||
static const int16_t VALUE_NO_SET = 32766;
|
||||
|
||||
@@ -32,5 +31,4 @@ class Rect {
|
||||
void info(const std::string &prefix = "rect info:");
|
||||
};
|
||||
|
||||
} // namespace display
|
||||
} // namespace esphome
|
||||
} // namespace esphome::display
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/core/automation.h"
|
||||
#include "display_menu_base.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace display_menu_base {
|
||||
namespace esphome::display_menu_base {
|
||||
|
||||
template<typename... Ts> class UpAction : public Action<Ts...> {
|
||||
public:
|
||||
@@ -144,5 +143,4 @@ class DisplayMenuOnPrevTrigger : public Trigger<const MenuItem *> {
|
||||
MenuItemCustom *parent_;
|
||||
};
|
||||
|
||||
} // namespace display_menu_base
|
||||
} // namespace esphome
|
||||
} // namespace esphome::display_menu_base
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "display_menu_base.h"
|
||||
#include <algorithm>
|
||||
|
||||
namespace esphome {
|
||||
namespace display_menu_base {
|
||||
namespace esphome::display_menu_base {
|
||||
|
||||
void DisplayMenuComponent::up() {
|
||||
if (this->check_healthy_and_active_()) {
|
||||
@@ -325,5 +324,4 @@ void DisplayMenuComponent::draw_menu() {
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace display_menu_base
|
||||
} // namespace esphome
|
||||
} // namespace esphome::display_menu_base
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
|
||||
#include <forward_list>
|
||||
|
||||
namespace esphome {
|
||||
namespace display_menu_base {
|
||||
namespace esphome::display_menu_base {
|
||||
|
||||
enum MenuMode {
|
||||
MENU_MODE_ROTARY,
|
||||
@@ -78,5 +77,4 @@ class DisplayMenuComponent : public Component {
|
||||
bool root_on_enter_called_{false};
|
||||
};
|
||||
|
||||
} // namespace display_menu_base
|
||||
} // namespace esphome
|
||||
} // namespace esphome::display_menu_base
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
namespace esphome {
|
||||
namespace display_menu_base {
|
||||
namespace esphome::display_menu_base {
|
||||
|
||||
const LogString *menu_item_type_to_string(MenuItemType type) {
|
||||
switch (type) {
|
||||
@@ -201,5 +200,4 @@ void MenuItemCustom::on_next_() { this->on_next_callbacks_.call(); }
|
||||
|
||||
void MenuItemCustom::on_prev_() { this->on_prev_callbacks_.call(); }
|
||||
|
||||
} // namespace display_menu_base
|
||||
} // namespace esphome
|
||||
} // namespace esphome::display_menu_base
|
||||
|
||||
@@ -16,8 +16,7 @@
|
||||
#include <vector>
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace display_menu_base {
|
||||
namespace esphome::display_menu_base {
|
||||
|
||||
enum MenuItemType {
|
||||
MENU_ITEM_LABEL,
|
||||
@@ -187,5 +186,4 @@ class MenuItemCustom : public MenuItemEditable {
|
||||
CallbackManager<void()> on_prev_callbacks_{};
|
||||
};
|
||||
|
||||
} // namespace display_menu_base
|
||||
} // namespace esphome
|
||||
} // namespace esphome::display_menu_base
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
#include "esphome/core/log.h"
|
||||
#include "esphome/core/hal.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace dps310 {
|
||||
namespace esphome::dps310 {
|
||||
|
||||
static const char *const TAG = "dps310";
|
||||
|
||||
@@ -182,5 +181,4 @@ int32_t DPS310Component::twos_complement(int32_t val, uint8_t bits) {
|
||||
return val;
|
||||
}
|
||||
|
||||
} // namespace dps310
|
||||
} // namespace esphome
|
||||
} // namespace esphome::dps310
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/components/sensor/sensor.h"
|
||||
#include "esphome/components/i2c/i2c.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace dps310 {
|
||||
namespace esphome::dps310 {
|
||||
|
||||
static const uint8_t DPS310_REG_PRS_B2 = 0x00; // Highest byte of pressure data
|
||||
static const uint8_t DPS310_REG_TMP_B2 = 0x03; // Highest byte of temperature data
|
||||
@@ -60,5 +59,4 @@ class DPS310Component : public PollingComponent, public i2c::I2CDevice {
|
||||
bool got_pres_, got_temp_, update_in_progress_;
|
||||
};
|
||||
|
||||
} // namespace dps310
|
||||
} // namespace esphome
|
||||
} // namespace esphome::dps310
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
// Datasheet:
|
||||
// - https://datasheets.maximintegrated.com/en/ds/DS1307.pdf
|
||||
|
||||
namespace esphome {
|
||||
namespace ds1307 {
|
||||
namespace esphome::ds1307 {
|
||||
|
||||
static const char *const TAG = "ds1307";
|
||||
|
||||
@@ -99,5 +98,4 @@ bool DS1307Component::write_rtc_() {
|
||||
ds1307_.reg.day, ONOFF(ds1307_.reg.ch), ds1307_.reg.rs, ONOFF(ds1307_.reg.sqwe), ONOFF(ds1307_.reg.out));
|
||||
return true;
|
||||
}
|
||||
} // namespace ds1307
|
||||
} // namespace esphome
|
||||
} // namespace esphome::ds1307
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/components/i2c/i2c.h"
|
||||
#include "esphome/components/time/real_time_clock.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace ds1307 {
|
||||
namespace esphome::ds1307 {
|
||||
|
||||
class DS1307Component : public time::RealTimeClock, public i2c::I2CDevice {
|
||||
public:
|
||||
@@ -65,5 +64,4 @@ template<typename... Ts> class ReadAction : public Action<Ts...>, public Parente
|
||||
public:
|
||||
void play(const Ts &...x) override { this->parent_->read_time(); }
|
||||
};
|
||||
} // namespace ds1307
|
||||
} // namespace esphome
|
||||
} // namespace esphome::ds1307
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "ds2484.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace ds2484 {
|
||||
namespace esphome::ds2484 {
|
||||
static const char *const TAG = "ds2484.onewire";
|
||||
|
||||
void DS2484OneWireBus::setup() {
|
||||
@@ -204,5 +203,4 @@ uint64_t IRAM_ATTR DS2484OneWireBus::search_int() {
|
||||
return address;
|
||||
}
|
||||
|
||||
} // namespace ds2484
|
||||
} // namespace esphome
|
||||
} // namespace esphome::ds2484
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
#include "esphome/components/i2c/i2c.h"
|
||||
#include "esphome/components/one_wire/one_wire.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace ds2484 {
|
||||
namespace esphome::ds2484 {
|
||||
|
||||
class DS2484OneWireBus : public one_wire::OneWireBus, public i2c::I2CDevice, public Component {
|
||||
public:
|
||||
@@ -39,5 +38,4 @@ class DS2484OneWireBus : public one_wire::OneWireBus, public i2c::I2CDevice, pub
|
||||
bool active_pullup_{false};
|
||||
bool strong_pullup_{false};
|
||||
};
|
||||
} // namespace ds2484
|
||||
} // namespace esphome
|
||||
} // namespace esphome::ds2484
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
#include "esphome/core/helpers.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace duty_cycle {
|
||||
namespace esphome::duty_cycle {
|
||||
|
||||
static const char *const TAG = "duty_cycle";
|
||||
|
||||
@@ -56,5 +55,4 @@ void IRAM_ATTR DutyCycleSensorStore::gpio_intr(DutyCycleSensorStore *arg) {
|
||||
arg->last_interrupt = now;
|
||||
}
|
||||
|
||||
} // namespace duty_cycle
|
||||
} // namespace esphome
|
||||
} // namespace esphome::duty_cycle
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/core/hal.h"
|
||||
#include "esphome/components/sensor/sensor.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace duty_cycle {
|
||||
namespace esphome::duty_cycle {
|
||||
|
||||
/// Store data in a class that doesn't use multiple-inheritance (vtables in flash)
|
||||
struct DutyCycleSensorStore {
|
||||
@@ -32,5 +31,4 @@ class DutyCycleSensor : public sensor::Sensor, public PollingComponent {
|
||||
uint32_t last_update_{0};
|
||||
};
|
||||
|
||||
} // namespace duty_cycle
|
||||
} // namespace esphome
|
||||
} // namespace esphome::duty_cycle
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "duty_time_sensor.h"
|
||||
#include "esphome/core/hal.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace duty_time_sensor {
|
||||
namespace esphome::duty_time_sensor {
|
||||
|
||||
static const char *const TAG = "duty_time_sensor";
|
||||
|
||||
@@ -103,5 +102,4 @@ void DutyTimeSensor::dump_config() {
|
||||
LOG_SENSOR(" ", "Last Duty Time Sensor:", this->last_duty_time_sensor_);
|
||||
}
|
||||
|
||||
} // namespace duty_time_sensor
|
||||
} // namespace esphome
|
||||
} // namespace esphome::duty_time_sensor
|
||||
|
||||
@@ -10,8 +10,7 @@
|
||||
#include "esphome/components/binary_sensor/binary_sensor.h"
|
||||
#endif
|
||||
|
||||
namespace esphome {
|
||||
namespace duty_time_sensor {
|
||||
namespace esphome::duty_time_sensor {
|
||||
|
||||
class DutyTimeSensor : public sensor::Sensor, public PollingComponent {
|
||||
public:
|
||||
@@ -71,5 +70,4 @@ template<typename... Ts> class RunningCondition : public Condition<Ts...>, publi
|
||||
bool state_;
|
||||
};
|
||||
|
||||
} // namespace duty_time_sensor
|
||||
} // namespace esphome
|
||||
} // namespace esphome::duty_time_sensor
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
namespace esphome {
|
||||
namespace e131 {
|
||||
namespace esphome::e131 {
|
||||
|
||||
static const char *const TAG = "e131";
|
||||
static const int PORT = 5568;
|
||||
@@ -134,6 +133,6 @@ bool E131Component::process_(int universe, const E131Packet &packet) {
|
||||
return handled;
|
||||
}
|
||||
|
||||
} // namespace e131
|
||||
} // namespace esphome
|
||||
} // namespace esphome::e131
|
||||
|
||||
#endif
|
||||
|
||||
@@ -12,8 +12,7 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
namespace esphome {
|
||||
namespace e131 {
|
||||
namespace esphome::e131 {
|
||||
|
||||
class E131AddressableLightEffect;
|
||||
|
||||
@@ -72,6 +71,6 @@ class E131Component : public esphome::Component {
|
||||
std::vector<UniverseConsumer> universe_consumers_;
|
||||
};
|
||||
|
||||
} // namespace e131
|
||||
} // namespace esphome
|
||||
} // namespace esphome::e131
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#ifdef USE_NETWORK
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace e131 {
|
||||
namespace esphome::e131 {
|
||||
|
||||
static const char *const TAG = "e131_addressable_light_effect";
|
||||
static const int MAX_DATA_SIZE = (sizeof(E131Packet::values) - 1);
|
||||
@@ -91,6 +90,6 @@ bool E131AddressableLightEffect::process_(int universe, const E131Packet &packet
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace e131
|
||||
} // namespace esphome
|
||||
} // namespace esphome::e131
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
#include "esphome/core/component.h"
|
||||
#include "esphome/components/light/addressable_light_effect.h"
|
||||
#ifdef USE_NETWORK
|
||||
namespace esphome {
|
||||
namespace e131 {
|
||||
|
||||
namespace esphome::e131 {
|
||||
|
||||
class E131Component;
|
||||
struct E131Packet;
|
||||
@@ -40,6 +40,6 @@ class E131AddressableLightEffect : public light::AddressableLightEffect {
|
||||
friend class E131Component;
|
||||
};
|
||||
|
||||
} // namespace e131
|
||||
} // namespace esphome
|
||||
} // namespace esphome::e131
|
||||
|
||||
#endif
|
||||
|
||||
@@ -12,8 +12,7 @@
|
||||
#include <lwip/ip4_addr.h>
|
||||
#include <lwip/ip_addr.h>
|
||||
|
||||
namespace esphome {
|
||||
namespace e131 {
|
||||
namespace esphome::e131 {
|
||||
|
||||
static const char *const TAG = "e131";
|
||||
|
||||
@@ -158,6 +157,6 @@ bool E131Component::packet_(const uint8_t *data, size_t len, int &universe, E131
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace e131
|
||||
} // namespace esphome
|
||||
} // namespace esphome::e131
|
||||
|
||||
#endif
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
#include "esphome/core/helpers.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace ee895 {
|
||||
namespace esphome::ee895 {
|
||||
|
||||
static const char *const TAG = "ee895";
|
||||
|
||||
@@ -111,5 +110,4 @@ uint16_t EE895Component::calc_crc16_(const uint8_t buf[], uint8_t len) {
|
||||
uint16_t crc = crc16(&addr, 1);
|
||||
return crc16(buf, len, crc);
|
||||
}
|
||||
} // namespace ee895
|
||||
} // namespace esphome
|
||||
} // namespace esphome::ee895
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/components/sensor/sensor.h"
|
||||
#include "esphome/components/i2c/i2c.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace ee895 {
|
||||
namespace esphome::ee895 {
|
||||
|
||||
/// This class implements support for the ee895 of temperature i2c sensors.
|
||||
class EE895Component : public PollingComponent, public i2c::I2CDevice {
|
||||
@@ -29,5 +28,4 @@ class EE895Component : public PollingComponent, public i2c::I2CDevice {
|
||||
enum ErrorCode { NONE = 0, COMMUNICATION_FAILED, CRC_CHECK_FAILED } error_code_{NONE};
|
||||
};
|
||||
|
||||
} // namespace ee895
|
||||
} // namespace esphome
|
||||
} // namespace esphome::ee895
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace esphome {
|
||||
namespace ektf2232 {
|
||||
namespace esphome::ektf2232 {
|
||||
|
||||
static const char *const TAG = "ektf2232";
|
||||
|
||||
@@ -130,5 +129,4 @@ void EKTF2232Touchscreen::dump_config() {
|
||||
LOG_PIN(" Reset Pin: ", this->reset_pin_);
|
||||
}
|
||||
|
||||
} // namespace ektf2232
|
||||
} // namespace esphome
|
||||
} // namespace esphome::ektf2232
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
#include "esphome/core/component.h"
|
||||
#include "esphome/core/hal.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace ektf2232 {
|
||||
namespace esphome::ektf2232 {
|
||||
|
||||
using namespace touchscreen;
|
||||
|
||||
@@ -31,5 +30,4 @@ class EKTF2232Touchscreen : public Touchscreen, public i2c::I2CDevice {
|
||||
GPIOPin *reset_pin_;
|
||||
};
|
||||
|
||||
} // namespace ektf2232
|
||||
} // namespace esphome
|
||||
} // namespace esphome::ektf2232
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
#include "esphome/core/log.h"
|
||||
#include "emc2101.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace emc2101 {
|
||||
namespace esphome::emc2101 {
|
||||
|
||||
static const char *const TAG = "EMC2101";
|
||||
|
||||
@@ -165,5 +164,4 @@ float Emc2101Component::get_speed() {
|
||||
return tach == 0xFFFF ? 0.0f : 5400000.0f / tach;
|
||||
}
|
||||
|
||||
} // namespace emc2101
|
||||
} // namespace esphome
|
||||
} // namespace esphome::emc2101
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/components/i2c/i2c.h"
|
||||
#include "esphome/core/component.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace emc2101 {
|
||||
namespace esphome::emc2101 {
|
||||
|
||||
/** Enum listing all DAC conversion rates for the EMC2101.
|
||||
*
|
||||
@@ -111,5 +110,4 @@ class Emc2101Component : public Component, public i2c::I2CDevice {
|
||||
Emc2101DACConversionRate dac_conversion_rate_;
|
||||
};
|
||||
|
||||
} // namespace emc2101
|
||||
} // namespace esphome
|
||||
} // namespace esphome::emc2101
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#include "emc2101_output.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace emc2101 {
|
||||
namespace esphome::emc2101 {
|
||||
|
||||
void EMC2101Output::write_state(float state) { this->parent_->set_duty_cycle(state); }
|
||||
|
||||
} // namespace emc2101
|
||||
} // namespace esphome
|
||||
} // namespace esphome::emc2101
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "../emc2101.h"
|
||||
#include "esphome/components/output/float_output.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace emc2101 {
|
||||
namespace esphome::emc2101 {
|
||||
|
||||
/// This class allows to control the EMC2101 output.
|
||||
class EMC2101Output : public output::FloatOutput {
|
||||
@@ -18,5 +17,4 @@ class EMC2101Output : public output::FloatOutput {
|
||||
Emc2101Component *parent_;
|
||||
};
|
||||
|
||||
} // namespace emc2101
|
||||
} // namespace esphome
|
||||
} // namespace esphome::emc2101
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
#include "esphome/core/helpers.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace emc2101 {
|
||||
namespace esphome::emc2101 {
|
||||
|
||||
static const char *const TAG = "EMC2101.sensor";
|
||||
|
||||
@@ -37,5 +36,4 @@ void EMC2101Sensor::update() {
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace emc2101
|
||||
} // namespace esphome
|
||||
} // namespace esphome::emc2101
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/components/sensor/sensor.h"
|
||||
#include "esphome/core/component.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace emc2101 {
|
||||
namespace esphome::emc2101 {
|
||||
|
||||
/// This class exposes the EMC2101 sensors.
|
||||
class EMC2101Sensor : public PollingComponent {
|
||||
@@ -33,5 +32,4 @@ class EMC2101Sensor : public PollingComponent {
|
||||
sensor::Sensor *duty_cycle_sensor_{nullptr};
|
||||
};
|
||||
|
||||
} // namespace emc2101
|
||||
} // namespace esphome
|
||||
} // namespace esphome::emc2101
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "emmeti.h"
|
||||
#include "esphome/components/remote_base/remote_base.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace emmeti {
|
||||
namespace esphome::emmeti {
|
||||
|
||||
static const char *const TAG = "emmeti.climate";
|
||||
|
||||
@@ -308,5 +307,4 @@ bool EmmetiClimate::on_receive(remote_base::RemoteReceiveData data) {
|
||||
return this->parse_state_frame_(curr_state);
|
||||
}
|
||||
|
||||
} // namespace emmeti
|
||||
} // namespace esphome
|
||||
} // namespace esphome::emmeti
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
|
||||
#include "esphome/components/climate_ir/climate_ir.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace emmeti {
|
||||
namespace esphome::emmeti {
|
||||
|
||||
const uint8_t EMMETI_TEMP_MIN = 16; // Celsius
|
||||
const uint8_t EMMETI_TEMP_MAX = 30; // Celsius
|
||||
@@ -105,5 +104,4 @@ class EmmetiClimate : public climate_ir::ClimateIR {
|
||||
uint8_t blades_ = EMMETI_BLADES_STOP;
|
||||
};
|
||||
|
||||
} // namespace emmeti
|
||||
} // namespace esphome
|
||||
} // namespace esphome::emmeti
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/core/hal.h"
|
||||
#include "esphome/core/application.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace endstop {
|
||||
namespace esphome::endstop {
|
||||
|
||||
static const char *const TAG = "endstop.cover";
|
||||
|
||||
@@ -192,5 +191,4 @@ void EndstopCover::recompute_position_() {
|
||||
this->last_recompute_time_ = now;
|
||||
}
|
||||
|
||||
} // namespace endstop
|
||||
} // namespace esphome
|
||||
} // namespace esphome::endstop
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
#include "esphome/components/binary_sensor/binary_sensor.h"
|
||||
#include "esphome/components/cover/cover.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace endstop {
|
||||
namespace esphome::endstop {
|
||||
|
||||
class EndstopCover : public cover::Cover, public Component {
|
||||
public:
|
||||
@@ -53,5 +52,4 @@ class EndstopCover : public cover::Cover, public Component {
|
||||
cover::CoverOperation last_operation_{cover::COVER_OPERATION_OPENING};
|
||||
};
|
||||
|
||||
} // namespace endstop
|
||||
} // namespace esphome
|
||||
} // namespace esphome::endstop
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
#include "esphome/core/log.h"
|
||||
#include "esphome/core/hal.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace ens160_base {
|
||||
namespace esphome::ens160_base {
|
||||
|
||||
static const char *const TAG = "ens160";
|
||||
|
||||
@@ -332,5 +331,4 @@ void ENS160Component::dump_config() {
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace ens160_base
|
||||
} // namespace esphome
|
||||
} // namespace esphome::ens160_base
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/core/component.h"
|
||||
#include "esphome/components/sensor/sensor.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace ens160_base {
|
||||
namespace esphome::ens160_base {
|
||||
|
||||
class ENS160Component : public PollingComponent, public sensor::Sensor {
|
||||
public:
|
||||
@@ -59,5 +58,4 @@ class ENS160Component : public PollingComponent, public sensor::Sensor {
|
||||
sensor::Sensor *temperature_{nullptr};
|
||||
};
|
||||
|
||||
} // namespace ens160_base
|
||||
} // namespace esphome
|
||||
} // namespace esphome::ens160_base
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
#include "esphome/components/i2c/i2c.h"
|
||||
#include "../ens160_base/ens160_base.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace ens160_i2c {
|
||||
namespace esphome::ens160_i2c {
|
||||
|
||||
static const char *const TAG = "ens160_i2c.sensor";
|
||||
|
||||
@@ -28,5 +27,4 @@ void ENS160I2CComponent::dump_config() {
|
||||
LOG_I2C_DEVICE(this);
|
||||
}
|
||||
|
||||
} // namespace ens160_i2c
|
||||
} // namespace esphome
|
||||
} // namespace esphome::ens160_i2c
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/components/ens160_base/ens160_base.h"
|
||||
#include "esphome/components/i2c/i2c.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace ens160_i2c {
|
||||
namespace esphome::ens160_i2c {
|
||||
|
||||
class ENS160I2CComponent : public esphome::ens160_base::ENS160Component, public i2c::I2CDevice {
|
||||
void dump_config() override;
|
||||
@@ -15,5 +14,4 @@ class ENS160I2CComponent : public esphome::ens160_base::ENS160Component, public
|
||||
bool write_bytes(uint8_t a_register, uint8_t *data, size_t len) override;
|
||||
};
|
||||
|
||||
} // namespace ens160_i2c
|
||||
} // namespace esphome
|
||||
} // namespace esphome::ens160_i2c
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "ens160_spi.h"
|
||||
#include <esphome/components/ens160_base/ens160_base.h>
|
||||
|
||||
namespace esphome {
|
||||
namespace ens160_spi {
|
||||
namespace esphome::ens160_spi {
|
||||
|
||||
static const char *const TAG = "ens160_spi.sensor";
|
||||
|
||||
@@ -55,5 +54,4 @@ bool ENS160SPIComponent::write_bytes(uint8_t a_register, uint8_t *data, size_t l
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace ens160_spi
|
||||
} // namespace esphome
|
||||
} // namespace esphome::ens160_spi
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/components/ens160_base/ens160_base.h"
|
||||
#include "esphome/components/spi/spi.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace ens160_spi {
|
||||
namespace esphome::ens160_spi {
|
||||
|
||||
class ENS160SPIComponent : public esphome::ens160_base::ENS160Component,
|
||||
public spi::SPIDevice<spi::BIT_ORDER_MSB_FIRST, spi::CLOCK_POLARITY_LOW,
|
||||
@@ -18,5 +17,4 @@ class ENS160SPIComponent : public esphome::ens160_base::ENS160Component,
|
||||
bool write_bytes(uint8_t a_register, uint8_t *data, size_t len) override;
|
||||
};
|
||||
|
||||
} // namespace ens160_spi
|
||||
} // namespace esphome
|
||||
} // namespace esphome::ens160_spi
|
||||
|
||||
@@ -10,8 +10,7 @@
|
||||
#include "esphome/core/log.h"
|
||||
#include "esphome/core/hal.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace ens210 {
|
||||
namespace esphome::ens210 {
|
||||
|
||||
static const char *const TAG = "ens210";
|
||||
|
||||
@@ -223,5 +222,4 @@ bool ENS210Component::set_low_power_(bool enable) {
|
||||
return result;
|
||||
}
|
||||
|
||||
} // namespace ens210
|
||||
} // namespace esphome
|
||||
} // namespace esphome::ens210
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/components/sensor/sensor.h"
|
||||
#include "esphome/components/i2c/i2c.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace ens210 {
|
||||
namespace esphome::ens210 {
|
||||
|
||||
/// This class implements support for the ENS210 relative humidity and temperature i2c sensor.
|
||||
class ENS210Component : public PollingComponent, public i2c::I2CDevice {
|
||||
@@ -34,5 +33,4 @@ class ENS210Component : public PollingComponent, public i2c::I2CDevice {
|
||||
sensor::Sensor *humidity_sensor_{nullptr};
|
||||
};
|
||||
|
||||
} // namespace ens210
|
||||
} // namespace esphome
|
||||
} // namespace esphome::ens210
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user