mirror of
https://github.com/esphome/esphome.git
synced 2026-09-27 13:16:08 +08: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/helpers.h"
|
||||||
#include "esphome/core/log.h"
|
#include "esphome/core/log.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::dac7678 {
|
||||||
namespace dac7678 {
|
|
||||||
|
|
||||||
static const char *const TAG = "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);
|
this->parent_->set_channel_value_(this->channel_, input);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace dac7678
|
} // namespace esphome::dac7678
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -5,8 +5,7 @@
|
|||||||
#include "esphome/components/output/float_output.h"
|
#include "esphome/components/output/float_output.h"
|
||||||
#include "esphome/components/i2c/i2c.h"
|
#include "esphome/components/i2c/i2c.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::dac7678 {
|
||||||
namespace dac7678 {
|
|
||||||
|
|
||||||
class DAC7678Output;
|
class DAC7678Output;
|
||||||
|
|
||||||
@@ -51,5 +50,4 @@ class DAC7678Output : public Component, public i2c::I2CDevice {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace dac7678
|
} // namespace esphome::dac7678
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
#include "daikin.h"
|
#include "daikin.h"
|
||||||
#include "esphome/components/remote_base/remote_base.h"
|
#include "esphome/components/remote_base/remote_base.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::daikin {
|
||||||
namespace daikin {
|
|
||||||
|
|
||||||
static const char *const TAG = "daikin.climate";
|
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);
|
return this->parse_state_frame_(state_frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace daikin
|
} // namespace esphome::daikin
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -2,8 +2,7 @@
|
|||||||
|
|
||||||
#include "esphome/components/climate_ir/climate_ir.h"
|
#include "esphome/components/climate_ir/climate_ir.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::daikin {
|
||||||
namespace daikin {
|
|
||||||
|
|
||||||
// Values for Daikin ARC43XXX IR Controllers
|
// Values for Daikin ARC43XXX IR Controllers
|
||||||
// Temperature
|
// Temperature
|
||||||
@@ -60,5 +59,4 @@ class DaikinClimate : public climate_ir::ClimateIR {
|
|||||||
bool parse_state_frame_(const uint8_t frame[]);
|
bool parse_state_frame_(const uint8_t frame[]);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace daikin
|
} // namespace esphome::daikin
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -5,8 +5,7 @@
|
|||||||
#include "esphome/components/remote_base/remote_base.h"
|
#include "esphome/components/remote_base/remote_base.h"
|
||||||
#include "esphome/core/log.h"
|
#include "esphome/core/log.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::daikin_arc {
|
||||||
namespace daikin_arc {
|
|
||||||
|
|
||||||
static const char *const TAG = "daikin.climate";
|
static const char *const TAG = "daikin.climate";
|
||||||
|
|
||||||
@@ -492,5 +491,4 @@ void DaikinArcClimate::control(const climate::ClimateCall &call) {
|
|||||||
climate_ir::ClimateIR::control(call);
|
climate_ir::ClimateIR::control(call);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace daikin_arc
|
} // namespace esphome::daikin_arc
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -2,8 +2,7 @@
|
|||||||
|
|
||||||
#include "esphome/components/climate_ir/climate_ir.h"
|
#include "esphome/components/climate_ir/climate_ir.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::daikin_arc {
|
||||||
namespace daikin_arc {
|
|
||||||
|
|
||||||
// Values for Daikin ARC43XXX IR Controllers
|
// Values for Daikin ARC43XXX IR Controllers
|
||||||
// Temperature
|
// Temperature
|
||||||
@@ -73,5 +72,4 @@ class DaikinArcClimate : public climate_ir::ClimateIR {
|
|||||||
uint8_t last_humidity_{0x66};
|
uint8_t last_humidity_{0x66};
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace daikin_arc
|
} // namespace esphome::daikin_arc
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
#include "daikin_brc.h"
|
#include "daikin_brc.h"
|
||||||
#include "esphome/components/remote_base/remote_base.h"
|
#include "esphome/components/remote_base/remote_base.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::daikin_brc {
|
||||||
namespace daikin_brc {
|
|
||||||
|
|
||||||
static const char *const TAG = "daikin_brc.climate";
|
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);
|
return this->parse_state_frame_(state_frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace daikin_brc
|
} // namespace esphome::daikin_brc
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -2,8 +2,7 @@
|
|||||||
|
|
||||||
#include "esphome/components/climate_ir/climate_ir.h"
|
#include "esphome/components/climate_ir/climate_ir.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::daikin_brc {
|
||||||
namespace daikin_brc {
|
|
||||||
|
|
||||||
// Values for Daikin BRC4CXXX IR Controllers
|
// Values for Daikin BRC4CXXX IR Controllers
|
||||||
// Temperature
|
// Temperature
|
||||||
@@ -78,5 +77,4 @@ class DaikinBrcClimate : public climate_ir::ClimateIR {
|
|||||||
bool fahrenheit_{false};
|
bool fahrenheit_{false};
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace daikin_brc
|
} // namespace esphome::daikin_brc
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
#include "dallas_temp.h"
|
#include "dallas_temp.h"
|
||||||
#include "esphome/core/log.h"
|
#include "esphome/core/log.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::dallas_temp {
|
||||||
namespace dallas_temp {
|
|
||||||
|
|
||||||
static const char *const TAG = "dallas.temp.sensor";
|
static const char *const TAG = "dallas.temp.sensor";
|
||||||
|
|
||||||
@@ -159,5 +158,4 @@ float DallasTemperatureSensor::get_temp_c_() {
|
|||||||
return temp / 16.0f;
|
return temp / 16.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace dallas_temp
|
} // namespace esphome::dallas_temp
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -4,8 +4,7 @@
|
|||||||
#include "esphome/components/sensor/sensor.h"
|
#include "esphome/components/sensor/sensor.h"
|
||||||
#include "esphome/components/one_wire/one_wire.h"
|
#include "esphome/components/one_wire/one_wire.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::dallas_temp {
|
||||||
namespace dallas_temp {
|
|
||||||
|
|
||||||
class DallasTemperatureSensor : public PollingComponent, public sensor::Sensor, public one_wire::OneWireDevice {
|
class DallasTemperatureSensor : public PollingComponent, public sensor::Sensor, public one_wire::OneWireDevice {
|
||||||
public:
|
public:
|
||||||
@@ -27,5 +26,4 @@ class DallasTemperatureSensor : public PollingComponent, public sensor::Sensor,
|
|||||||
float get_temp_c_();
|
float get_temp_c_();
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace dallas_temp
|
} // namespace esphome::dallas_temp
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -4,8 +4,7 @@
|
|||||||
#include "esphome/core/helpers.h"
|
#include "esphome/core/helpers.h"
|
||||||
#include "esphome/core/log.h"
|
#include "esphome/core/log.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::daly_bms {
|
||||||
namespace daly_bms {
|
|
||||||
|
|
||||||
static const char *const TAG = "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::daly_bms
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -15,8 +15,7 @@
|
|||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::daly_bms {
|
||||||
namespace daly_bms {
|
|
||||||
|
|
||||||
class DalyBmsComponent : public PollingComponent, public uart::UARTDevice {
|
class DalyBmsComponent : public PollingComponent, public uart::UARTDevice {
|
||||||
public:
|
public:
|
||||||
@@ -88,5 +87,4 @@ class DalyBmsComponent : public PollingComponent, public uart::UARTDevice {
|
|||||||
uint8_t next_request_;
|
uint8_t next_request_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace daly_bms
|
} // namespace esphome::daly_bms
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
#include "dashboard_import.h"
|
#include "dashboard_import.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::dashboard_import {
|
||||||
namespace dashboard_import {
|
|
||||||
|
|
||||||
static const char *g_package_import_url = ""; // NOLINT
|
static const char *g_package_import_url = ""; // NOLINT
|
||||||
|
|
||||||
const char *get_package_import_url() { return g_package_import_url; }
|
const char *get_package_import_url() { return g_package_import_url; }
|
||||||
void set_package_import_url(const char *url) { g_package_import_url = url; }
|
void set_package_import_url(const char *url) { g_package_import_url = url; }
|
||||||
|
|
||||||
} // namespace dashboard_import
|
} // namespace esphome::dashboard_import
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::dashboard_import {
|
||||||
namespace dashboard_import {
|
|
||||||
|
|
||||||
const char *get_package_import_url();
|
const char *get_package_import_url();
|
||||||
void set_package_import_url(const char *url);
|
void set_package_import_url(const char *url);
|
||||||
|
|
||||||
} // namespace dashboard_import
|
} // namespace esphome::dashboard_import
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -9,8 +9,7 @@
|
|||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
#include <climits>
|
#include <climits>
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::debug {
|
||||||
namespace debug {
|
|
||||||
|
|
||||||
static const char *const TAG = "debug";
|
static const char *const TAG = "debug";
|
||||||
|
|
||||||
@@ -93,5 +92,4 @@ void DebugComponent::update() {
|
|||||||
|
|
||||||
float DebugComponent::get_setup_priority() const { return setup_priority::LATE; }
|
float DebugComponent::get_setup_priority() const { return setup_priority::LATE; }
|
||||||
|
|
||||||
} // namespace debug
|
} // namespace esphome::debug
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -13,8 +13,7 @@
|
|||||||
#include "esphome/components/text_sensor/text_sensor.h"
|
#include "esphome/components/text_sensor/text_sensor.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::debug {
|
||||||
namespace debug {
|
|
||||||
|
|
||||||
static constexpr size_t DEVICE_INFO_BUFFER_SIZE = 256;
|
static constexpr size_t DEVICE_INFO_BUFFER_SIZE = 256;
|
||||||
static constexpr size_t RESET_REASON_BUFFER_SIZE = 128;
|
static constexpr size_t RESET_REASON_BUFFER_SIZE = 128;
|
||||||
@@ -101,5 +100,4 @@ class DebugComponent : public PollingComponent {
|
|||||||
void update_platform_();
|
void update_platform_();
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace debug
|
} // namespace esphome::debug
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -16,8 +16,7 @@
|
|||||||
#include <Esp.h>
|
#include <Esp.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::debug {
|
||||||
namespace debug {
|
|
||||||
|
|
||||||
static const char *const TAG = "debug";
|
static const char *const TAG = "debug";
|
||||||
|
|
||||||
@@ -311,6 +310,6 @@ void DebugComponent::update_platform_() {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace debug
|
} // namespace esphome::debug
|
||||||
} // namespace esphome
|
|
||||||
#endif // USE_ESP32
|
#endif // USE_ESP32
|
||||||
|
|||||||
@@ -2,8 +2,7 @@
|
|||||||
#include "esphome/core/application.h"
|
#include "esphome/core/application.h"
|
||||||
#include "esphome/core/log.h"
|
#include "esphome/core/log.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::deep_sleep {
|
||||||
namespace deep_sleep {
|
|
||||||
|
|
||||||
static const char *const TAG = "deep_sleep";
|
static const char *const TAG = "deep_sleep";
|
||||||
// 5 seconds for deep sleep to ensure clean disconnect from Home Assistant
|
// 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; }
|
void DeepSleepComponent::allow_deep_sleep() { this->prevent_ = false; }
|
||||||
|
|
||||||
} // namespace deep_sleep
|
} // namespace esphome::deep_sleep
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -15,8 +15,7 @@
|
|||||||
|
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::deep_sleep {
|
||||||
namespace deep_sleep {
|
|
||||||
|
|
||||||
#if defined(USE_ESP32) || defined(USE_BK72XX)
|
#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(); }
|
void play(const Ts &...x) override { this->parent_->allow_deep_sleep(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace deep_sleep
|
} // namespace esphome::deep_sleep
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -5,8 +5,7 @@
|
|||||||
#include "esphome/core/log.h"
|
#include "esphome/core/log.h"
|
||||||
#include <esp_idf_version.h>
|
#include <esp_idf_version.h>
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::deep_sleep {
|
||||||
namespace deep_sleep {
|
|
||||||
|
|
||||||
// Deep Sleep feature support matrix for ESP32 variants:
|
// Deep Sleep feature support matrix for ESP32 variants:
|
||||||
//
|
//
|
||||||
@@ -167,6 +166,6 @@ void DeepSleepComponent::deep_sleep_() {
|
|||||||
|
|
||||||
bool DeepSleepComponent::should_teardown_() { return true; }
|
bool DeepSleepComponent::should_teardown_() { return true; }
|
||||||
|
|
||||||
} // namespace deep_sleep
|
} // namespace esphome::deep_sleep
|
||||||
} // namespace esphome
|
|
||||||
#endif // USE_ESP32
|
#endif // USE_ESP32
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
#include "delonghi.h"
|
#include "delonghi.h"
|
||||||
#include "esphome/components/remote_base/remote_base.h"
|
#include "esphome/components/remote_base/remote_base.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::delonghi {
|
||||||
namespace delonghi {
|
|
||||||
|
|
||||||
static const char *const TAG = "delonghi.climate";
|
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);
|
return this->parse_state_frame_(state_frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace delonghi
|
} // namespace esphome::delonghi
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -2,8 +2,7 @@
|
|||||||
|
|
||||||
#include "esphome/components/climate_ir/climate_ir.h"
|
#include "esphome/components/climate_ir/climate_ir.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::delonghi {
|
||||||
namespace delonghi {
|
|
||||||
|
|
||||||
// Values for DELONGHI ARC43XXX IR Controllers
|
// Values for DELONGHI ARC43XXX IR Controllers
|
||||||
const uint8_t DELONGHI_ADDRESS = 83;
|
const uint8_t DELONGHI_ADDRESS = 83;
|
||||||
@@ -60,5 +59,4 @@ class DelonghiClimate : public climate_ir::ClimateIR {
|
|||||||
bool parse_state_frame_(const uint8_t frame[]);
|
bool parse_state_frame_(const uint8_t frame[]);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace delonghi
|
} // namespace esphome::delonghi
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -3,8 +3,7 @@
|
|||||||
#include "esphome/components/alarm_control_panel/alarm_control_panel.h"
|
#include "esphome/components/alarm_control_panel/alarm_control_panel.h"
|
||||||
#include "esphome/core/component.h"
|
#include "esphome/core/component.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::demo {
|
||||||
namespace demo {
|
|
||||||
|
|
||||||
using namespace alarm_control_panel;
|
using namespace alarm_control_panel;
|
||||||
|
|
||||||
@@ -62,5 +61,4 @@ class DemoAlarmControlPanel : public AlarmControlPanel, public Component {
|
|||||||
DemoAlarmControlPanelType type_{};
|
DemoAlarmControlPanelType type_{};
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace demo
|
} // namespace esphome::demo
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -3,8 +3,7 @@
|
|||||||
#include "esphome/core/component.h"
|
#include "esphome/core/component.h"
|
||||||
#include "esphome/components/binary_sensor/binary_sensor.h"
|
#include "esphome/components/binary_sensor/binary_sensor.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::demo {
|
||||||
namespace demo {
|
|
||||||
|
|
||||||
class DemoBinarySensor : public binary_sensor::BinarySensor, public PollingComponent {
|
class DemoBinarySensor : public binary_sensor::BinarySensor, public PollingComponent {
|
||||||
public:
|
public:
|
||||||
@@ -18,5 +17,4 @@ class DemoBinarySensor : public binary_sensor::BinarySensor, public PollingCompo
|
|||||||
bool last_state_ = false;
|
bool last_state_ = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace demo
|
} // namespace esphome::demo
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -3,13 +3,11 @@
|
|||||||
#include "esphome/components/button/button.h"
|
#include "esphome/components/button/button.h"
|
||||||
#include "esphome/core/log.h"
|
#include "esphome/core/log.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::demo {
|
||||||
namespace demo {
|
|
||||||
|
|
||||||
class DemoButton : public button::Button {
|
class DemoButton : public button::Button {
|
||||||
protected:
|
protected:
|
||||||
void press_action() override {}
|
void press_action() override {}
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace demo
|
} // namespace esphome::demo
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -3,8 +3,7 @@
|
|||||||
#include "esphome/core/component.h"
|
#include "esphome/core/component.h"
|
||||||
#include "esphome/components/climate/climate.h"
|
#include "esphome/components/climate/climate.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::demo {
|
||||||
namespace demo {
|
|
||||||
|
|
||||||
enum class DemoClimateType {
|
enum class DemoClimateType {
|
||||||
TYPE_1,
|
TYPE_1,
|
||||||
@@ -158,5 +157,4 @@ class DemoClimate : public climate::Climate, public Component {
|
|||||||
DemoClimateType type_;
|
DemoClimateType type_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace demo
|
} // namespace esphome::demo
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -3,8 +3,7 @@
|
|||||||
#include "esphome/core/component.h"
|
#include "esphome/core/component.h"
|
||||||
#include "esphome/components/cover/cover.h"
|
#include "esphome/components/cover/cover.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::demo {
|
||||||
namespace demo {
|
|
||||||
|
|
||||||
enum class DemoCoverType {
|
enum class DemoCoverType {
|
||||||
TYPE_1,
|
TYPE_1,
|
||||||
@@ -85,5 +84,4 @@ class DemoCover : public cover::Cover, public Component {
|
|||||||
DemoCoverType type_;
|
DemoCoverType type_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace demo
|
} // namespace esphome::demo
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -7,8 +7,7 @@
|
|||||||
#include "esphome/components/datetime/date_entity.h"
|
#include "esphome/components/datetime/date_entity.h"
|
||||||
#include "esphome/core/component.h"
|
#include "esphome/core/component.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::demo {
|
||||||
namespace demo {
|
|
||||||
|
|
||||||
class DemoDate : public datetime::DateEntity, public Component {
|
class DemoDate : public datetime::DateEntity, public Component {
|
||||||
public:
|
public:
|
||||||
@@ -28,7 +27,6 @@ class DemoDate : public datetime::DateEntity, public Component {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace demo
|
} // namespace esphome::demo
|
||||||
} // namespace esphome
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -7,8 +7,7 @@
|
|||||||
#include "esphome/components/datetime/datetime_entity.h"
|
#include "esphome/components/datetime/datetime_entity.h"
|
||||||
#include "esphome/core/component.h"
|
#include "esphome/core/component.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::demo {
|
||||||
namespace demo {
|
|
||||||
|
|
||||||
class DemoDateTime : public datetime::DateTimeEntity, public Component {
|
class DemoDateTime : public datetime::DateTimeEntity, public Component {
|
||||||
public:
|
public:
|
||||||
@@ -34,7 +33,6 @@ class DemoDateTime : public datetime::DateTimeEntity, public Component {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace demo
|
} // namespace esphome::demo
|
||||||
} // namespace esphome
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -3,8 +3,7 @@
|
|||||||
#include "esphome/core/component.h"
|
#include "esphome/core/component.h"
|
||||||
#include "esphome/components/fan/fan.h"
|
#include "esphome/components/fan/fan.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::demo {
|
||||||
namespace demo {
|
|
||||||
|
|
||||||
enum class DemoFanType {
|
enum class DemoFanType {
|
||||||
TYPE_1,
|
TYPE_1,
|
||||||
@@ -66,5 +65,4 @@ class DemoFan : public fan::Fan, public Component {
|
|||||||
DemoFanType type_;
|
DemoFanType type_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace demo
|
} // namespace esphome::demo
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -3,8 +3,7 @@
|
|||||||
#include "esphome/core/component.h"
|
#include "esphome/core/component.h"
|
||||||
#include "esphome/components/light/light_output.h"
|
#include "esphome/components/light/light_output.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::demo {
|
||||||
namespace demo {
|
|
||||||
|
|
||||||
enum class DemoLightType {
|
enum class DemoLightType {
|
||||||
// binary
|
// binary
|
||||||
@@ -64,5 +63,4 @@ class DemoLight : public light::LightOutput, public Component {
|
|||||||
DemoLightType type_;
|
DemoLightType type_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace demo
|
} // namespace esphome::demo
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -2,8 +2,7 @@
|
|||||||
|
|
||||||
#include "esphome/components/lock/lock.h"
|
#include "esphome/components/lock/lock.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::demo {
|
||||||
namespace demo {
|
|
||||||
|
|
||||||
class DemoLock : public lock::Lock {
|
class DemoLock : public lock::Lock {
|
||||||
protected:
|
protected:
|
||||||
@@ -14,5 +13,4 @@ class DemoLock : public lock::Lock {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace demo
|
} // namespace esphome::demo
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -3,8 +3,7 @@
|
|||||||
#include "esphome/core/component.h"
|
#include "esphome/core/component.h"
|
||||||
#include "esphome/components/number/number.h"
|
#include "esphome/components/number/number.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::demo {
|
||||||
namespace demo {
|
|
||||||
|
|
||||||
enum class DemoNumberType {
|
enum class DemoNumberType {
|
||||||
TYPE_1,
|
TYPE_1,
|
||||||
@@ -35,5 +34,4 @@ class DemoNumber : public number::Number, public Component {
|
|||||||
DemoNumberType type_;
|
DemoNumberType type_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace demo
|
} // namespace esphome::demo
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -3,13 +3,11 @@
|
|||||||
#include "esphome/components/select/select.h"
|
#include "esphome/components/select/select.h"
|
||||||
#include "esphome/core/component.h"
|
#include "esphome/core/component.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::demo {
|
||||||
namespace demo {
|
|
||||||
|
|
||||||
class DemoSelect : public select::Select, public Component {
|
class DemoSelect : public select::Select, public Component {
|
||||||
protected:
|
protected:
|
||||||
void control(size_t index) override { this->publish_state(index); }
|
void control(size_t index) override { this->publish_state(index); }
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace demo
|
} // namespace esphome::demo
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -4,8 +4,7 @@
|
|||||||
#include "esphome/core/helpers.h"
|
#include "esphome/core/helpers.h"
|
||||||
#include "esphome/components/sensor/sensor.h"
|
#include "esphome/components/sensor/sensor.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::demo {
|
||||||
namespace demo {
|
|
||||||
|
|
||||||
class DemoSensor : public sensor::Sensor, public PollingComponent {
|
class DemoSensor : public sensor::Sensor, public PollingComponent {
|
||||||
public:
|
public:
|
||||||
@@ -25,5 +24,4 @@ class DemoSensor : public sensor::Sensor, public PollingComponent {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace demo
|
} // namespace esphome::demo
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -4,8 +4,7 @@
|
|||||||
#include "esphome/core/helpers.h"
|
#include "esphome/core/helpers.h"
|
||||||
#include "esphome/components/switch/switch.h"
|
#include "esphome/components/switch/switch.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::demo {
|
||||||
namespace demo {
|
|
||||||
|
|
||||||
class DemoSwitch : public switch_::Switch, public Component {
|
class DemoSwitch : public switch_::Switch, public Component {
|
||||||
public:
|
public:
|
||||||
@@ -18,5 +17,4 @@ class DemoSwitch : public switch_::Switch, public Component {
|
|||||||
void write_state(bool state) override { this->publish_state(state); }
|
void write_state(bool state) override { this->publish_state(state); }
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace demo
|
} // namespace esphome::demo
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -3,8 +3,7 @@
|
|||||||
#include "esphome/components/text/text.h"
|
#include "esphome/components/text/text.h"
|
||||||
#include "esphome/core/component.h"
|
#include "esphome/core/component.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::demo {
|
||||||
namespace demo {
|
|
||||||
|
|
||||||
class DemoText : public text::Text, public Component {
|
class DemoText : public text::Text, public Component {
|
||||||
public:
|
public:
|
||||||
@@ -14,5 +13,4 @@ class DemoText : public text::Text, public Component {
|
|||||||
void control(const std::string &value) override { this->publish_state(value); }
|
void control(const std::string &value) override { this->publish_state(value); }
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace demo
|
} // namespace esphome::demo
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -4,8 +4,7 @@
|
|||||||
#include "esphome/core/helpers.h"
|
#include "esphome/core/helpers.h"
|
||||||
#include "esphome/components/text_sensor/text_sensor.h"
|
#include "esphome/components/text_sensor/text_sensor.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::demo {
|
||||||
namespace demo {
|
|
||||||
|
|
||||||
class DemoTextSensor : public text_sensor::TextSensor, public PollingComponent {
|
class DemoTextSensor : public text_sensor::TextSensor, public PollingComponent {
|
||||||
public:
|
public:
|
||||||
@@ -21,5 +20,4 @@ class DemoTextSensor : public text_sensor::TextSensor, public PollingComponent {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace demo
|
} // namespace esphome::demo
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -7,8 +7,7 @@
|
|||||||
#include "esphome/components/datetime/time_entity.h"
|
#include "esphome/components/datetime/time_entity.h"
|
||||||
#include "esphome/core/component.h"
|
#include "esphome/core/component.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::demo {
|
||||||
namespace demo {
|
|
||||||
|
|
||||||
class DemoTime : public datetime::TimeEntity, public Component {
|
class DemoTime : public datetime::TimeEntity, public Component {
|
||||||
public:
|
public:
|
||||||
@@ -28,7 +27,6 @@ class DemoTime : public datetime::TimeEntity, public Component {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace demo
|
} // namespace esphome::demo
|
||||||
} // namespace esphome
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -2,8 +2,7 @@
|
|||||||
|
|
||||||
#include "esphome/components/valve/valve.h"
|
#include "esphome/components/valve/valve.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::demo {
|
||||||
namespace demo {
|
|
||||||
|
|
||||||
enum class DemoValveType {
|
enum class DemoValveType {
|
||||||
TYPE_1,
|
TYPE_1,
|
||||||
@@ -53,5 +52,4 @@ class DemoValve : public valve::Valve {
|
|||||||
DemoValveType type_{};
|
DemoValveType type_{};
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace demo
|
} // namespace esphome::demo
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -2,8 +2,7 @@
|
|||||||
#include "esphome/core/helpers.h"
|
#include "esphome/core/helpers.h"
|
||||||
#include "esphome/core/log.h"
|
#include "esphome/core/log.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::dfplayer {
|
||||||
namespace dfplayer {
|
|
||||||
|
|
||||||
static const char *const TAG = "dfplayer";
|
static const char *const TAG = "dfplayer";
|
||||||
|
|
||||||
@@ -283,5 +282,4 @@ void DFPlayer::dump_config() {
|
|||||||
this->check_uart_settings(9600);
|
this->check_uart_settings(9600);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace dfplayer
|
} // namespace esphome::dfplayer
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -6,8 +6,7 @@
|
|||||||
|
|
||||||
const size_t DFPLAYER_READ_BUFFER_LENGTH = 25; // two messages + some extra
|
const size_t DFPLAYER_READ_BUFFER_LENGTH = 25; // two messages + some extra
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::dfplayer {
|
||||||
namespace dfplayer {
|
|
||||||
|
|
||||||
enum EqPreset {
|
enum EqPreset {
|
||||||
NORMAL = 0,
|
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(); }
|
bool check(const Ts &...x) override { return this->parent_->is_playing(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace dfplayer
|
} // namespace esphome::dfplayer
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -5,8 +5,7 @@
|
|||||||
|
|
||||||
#include "dfrobot_sen0395.h"
|
#include "dfrobot_sen0395.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::dfrobot_sen0395 {
|
||||||
namespace dfrobot_sen0395 {
|
|
||||||
|
|
||||||
template<typename... Ts>
|
template<typename... Ts>
|
||||||
class DfrobotSen0395ResetAction : public Action<Ts...>, public Parented<DfrobotSen0395Component> {
|
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::dfrobot_sen0395
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -6,8 +6,7 @@
|
|||||||
|
|
||||||
#include "dfrobot_sen0395.h"
|
#include "dfrobot_sen0395.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::dfrobot_sen0395 {
|
||||||
namespace dfrobot_sen0395 {
|
|
||||||
|
|
||||||
static const char *const TAG = "dfrobot_sen0395.commands";
|
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
|
return 0; // Command not done yet
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace dfrobot_sen0395
|
} // namespace esphome::dfrobot_sen0395
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -5,8 +5,7 @@
|
|||||||
|
|
||||||
#include "esphome/core/helpers.h"
|
#include "esphome/core/helpers.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::dfrobot_sen0395 {
|
||||||
namespace dfrobot_sen0395 {
|
|
||||||
|
|
||||||
class DfrobotSen0395Component;
|
class DfrobotSen0395Component;
|
||||||
|
|
||||||
@@ -150,5 +149,4 @@ class SensitivityCommand : public Command {
|
|||||||
uint8_t sensitivity_;
|
uint8_t sensitivity_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace dfrobot_sen0395
|
} // namespace esphome::dfrobot_sen0395
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -3,8 +3,7 @@
|
|||||||
#include "esphome/core/helpers.h"
|
#include "esphome/core/helpers.h"
|
||||||
#include "esphome/core/log.h"
|
#include "esphome/core/log.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::dfrobot_sen0395 {
|
||||||
namespace dfrobot_sen0395 {
|
|
||||||
|
|
||||||
static const char *const TAG = "dfrobot_sen0395";
|
static const char *const TAG = "dfrobot_sen0395";
|
||||||
const char ASCII_CR = 0x0D;
|
const char ASCII_CR = 0x0D;
|
||||||
@@ -140,5 +139,4 @@ uint8_t CircularCommandQueue::process(DfrobotSen0395Component *parent) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace dfrobot_sen0395
|
} // namespace esphome::dfrobot_sen0395
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -13,8 +13,7 @@
|
|||||||
|
|
||||||
#include "commands.h"
|
#include "commands.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::dfrobot_sen0395 {
|
||||||
namespace dfrobot_sen0395 {
|
|
||||||
|
|
||||||
const uint8_t MMWAVE_READ_BUFFER_LENGTH = 255;
|
const uint8_t MMWAVE_READ_BUFFER_LENGTH = 255;
|
||||||
|
|
||||||
@@ -121,5 +120,4 @@ class DfrobotSen0395Component : public uart::UARTDevice, public Component {
|
|||||||
friend class ReadStateCommand;
|
friend class ReadStateCommand;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace dfrobot_sen0395
|
} // namespace esphome::dfrobot_sen0395
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
#include "dfrobot_sen0395_switch.h"
|
#include "dfrobot_sen0395_switch.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::dfrobot_sen0395 {
|
||||||
namespace dfrobot_sen0395 {
|
|
||||||
|
|
||||||
void Sen0395PowerSwitch::write_state(bool state) { this->parent_->enqueue(make_unique<PowerCommand>(state)); }
|
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::dfrobot_sen0395
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -5,8 +5,7 @@
|
|||||||
|
|
||||||
#include "../dfrobot_sen0395.h"
|
#include "../dfrobot_sen0395.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::dfrobot_sen0395 {
|
||||||
namespace dfrobot_sen0395 {
|
|
||||||
|
|
||||||
class DfrobotSen0395Switch : public switch_::Switch, public Component, public Parented<DfrobotSen0395Component> {};
|
class DfrobotSen0395Switch : public switch_::Switch, public Component, public Parented<DfrobotSen0395Component> {};
|
||||||
|
|
||||||
@@ -30,5 +29,4 @@ class Sen0395StartAfterBootSwitch : public DfrobotSen0395Switch {
|
|||||||
void write_state(bool state) override;
|
void write_state(bool state) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace dfrobot_sen0395
|
} // namespace esphome::dfrobot_sen0395
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
@@ -5,8 +5,7 @@
|
|||||||
#include "dht12.h"
|
#include "dht12.h"
|
||||||
#include "esphome/core/log.h"
|
#include "esphome/core/log.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome::dht12 {
|
||||||
namespace dht12 {
|
|
||||||
|
|
||||||
static const char *const TAG = "dht12";
|
static const char *const TAG = "dht12";
|
||||||
|
|
||||||
@@ -65,5 +64,4 @@ bool DHT12Component::read_data_(uint8_t *data) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace dht12
|
} // namespace esphome::dht12
|
||||||
} // namespace esphome
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user