mirror of
https://github.com/esphome/esphome.git
synced 2026-08-18 03:59: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/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
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user