mirror of
https://github.com/esphome/esphome.git
synced 2026-05-10 05:37:55 +08:00
[clang-tidy] Concatenate nested namespaces (5/7: components s) (#16302)
This commit is contained in:
@@ -3,8 +3,7 @@
|
||||
#include "esphome/core/log.h"
|
||||
#include "esphome/core/application.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace safe_mode {
|
||||
namespace esphome::safe_mode {
|
||||
|
||||
static const char *const TAG = "safe_mode.button";
|
||||
|
||||
@@ -23,5 +22,4 @@ void SafeModeButton::press_action() {
|
||||
|
||||
void SafeModeButton::dump_config() { LOG_BUTTON("", "Safe Mode Button", this); }
|
||||
|
||||
} // namespace safe_mode
|
||||
} // namespace esphome
|
||||
} // namespace esphome::safe_mode
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/components/safe_mode/safe_mode.h"
|
||||
#include "esphome/core/component.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace safe_mode {
|
||||
namespace esphome::safe_mode {
|
||||
|
||||
class SafeModeButton final : public button::Button, public Component {
|
||||
public:
|
||||
@@ -17,5 +16,4 @@ class SafeModeButton final : public button::Button, public Component {
|
||||
void press_action() override;
|
||||
};
|
||||
|
||||
} // namespace safe_mode
|
||||
} // namespace esphome
|
||||
} // namespace esphome::safe_mode
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/core/hal.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace safe_mode {
|
||||
namespace esphome::safe_mode {
|
||||
|
||||
static const char *const TAG = "safe_mode.switch";
|
||||
|
||||
@@ -28,5 +27,4 @@ void SafeModeSwitch::write_state(bool state) {
|
||||
|
||||
void SafeModeSwitch::dump_config() { LOG_SWITCH("", "Safe Mode Switch", this); }
|
||||
|
||||
} // namespace safe_mode
|
||||
} // namespace esphome
|
||||
} // namespace esphome::safe_mode
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/components/switch/switch.h"
|
||||
#include "esphome/core/component.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace safe_mode {
|
||||
namespace esphome::safe_mode {
|
||||
|
||||
class SafeModeSwitch : public switch_::Switch, public Component {
|
||||
public:
|
||||
@@ -17,5 +16,4 @@ class SafeModeSwitch : public switch_::Switch, public Component {
|
||||
void write_state(bool state) override;
|
||||
};
|
||||
|
||||
} // namespace safe_mode
|
||||
} // namespace esphome
|
||||
} // namespace esphome::safe_mode
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/core/automation.h"
|
||||
#include "scd30.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace scd30 {
|
||||
namespace esphome::scd30 {
|
||||
|
||||
template<typename... Ts> class ForceRecalibrationWithReference : public Action<Ts...>, public Parented<SCD30Component> {
|
||||
public:
|
||||
@@ -19,5 +18,4 @@ template<typename... Ts> class ForceRecalibrationWithReference : public Action<T
|
||||
TEMPLATABLE_VALUE(uint16_t, value)
|
||||
};
|
||||
|
||||
} // namespace scd30
|
||||
} // namespace esphome
|
||||
} // namespace esphome::scd30
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
#include <Wire.h>
|
||||
#endif
|
||||
|
||||
namespace esphome {
|
||||
namespace scd30 {
|
||||
namespace esphome::scd30 {
|
||||
|
||||
static const char *const TAG = "scd30";
|
||||
|
||||
@@ -230,5 +229,4 @@ uint16_t SCD30Component::get_forced_calibration_reference() {
|
||||
return forced_calibration_reference;
|
||||
}
|
||||
|
||||
} // namespace scd30
|
||||
} // namespace esphome
|
||||
} // namespace esphome::scd30
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/components/sensor/sensor.h"
|
||||
#include "esphome/components/sensirion_common/i2c_sensirion.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace scd30 {
|
||||
namespace esphome::scd30 {
|
||||
|
||||
/// This class implements support for the Sensirion scd30 i2c GAS (VOC and CO2eq) sensors.
|
||||
class SCD30Component : public Component, public sensirion_common::SensirionI2CDevice {
|
||||
@@ -48,5 +47,4 @@ class SCD30Component : public Component, public sensirion_common::SensirionI2CDe
|
||||
sensor::Sensor *temperature_sensor_{nullptr};
|
||||
};
|
||||
|
||||
} // namespace scd30
|
||||
} // namespace esphome
|
||||
} // namespace esphome::scd30
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/core/automation.h"
|
||||
#include "scd4x.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace scd4x {
|
||||
namespace esphome::scd4x {
|
||||
|
||||
template<typename... Ts> class PerformForcedCalibrationAction : public Action<Ts...>, public Parented<SCD4XComponent> {
|
||||
public:
|
||||
@@ -24,5 +23,4 @@ template<typename... Ts> class FactoryResetAction : public Action<Ts...>, public
|
||||
void play(const Ts &...x) override { this->parent_->factory_reset(); }
|
||||
};
|
||||
|
||||
} // namespace scd4x
|
||||
} // namespace esphome
|
||||
} // namespace esphome::scd4x
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
#include "esphome/core/hal.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace scd4x {
|
||||
namespace esphome::scd4x {
|
||||
|
||||
static const char *const TAG = "scd4x";
|
||||
|
||||
@@ -324,5 +323,4 @@ bool SCD4XComponent::start_measurement_() {
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace scd4x
|
||||
} // namespace esphome
|
||||
} // namespace esphome::scd4x
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
#include "esphome/components/sensor/sensor.h"
|
||||
#include "esphome/components/sensirion_common/i2c_sensirion.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace scd4x {
|
||||
namespace esphome::scd4x {
|
||||
|
||||
enum ErrorCode : uint8_t {
|
||||
COMMUNICATION_FAILED,
|
||||
@@ -59,5 +58,4 @@ class SCD4XComponent : public PollingComponent, public sensirion_common::Sensiri
|
||||
MeasurementMode measurement_mode_{PERIODIC};
|
||||
};
|
||||
|
||||
} // namespace scd4x
|
||||
} // namespace esphome
|
||||
} // namespace esphome::scd4x
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "script.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace script {
|
||||
namespace esphome::script {
|
||||
|
||||
static const char *const TAG = "script";
|
||||
|
||||
@@ -16,5 +15,4 @@ void ScriptLogger::esp_log_(int level, int line, const char *format, const char
|
||||
}
|
||||
#endif
|
||||
|
||||
} // namespace script
|
||||
} // namespace esphome
|
||||
} // namespace esphome::script
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
#include "esphome/core/component.h"
|
||||
#include "esphome/core/helpers.h"
|
||||
#include "esphome/core/log.h"
|
||||
namespace esphome {
|
||||
namespace script {
|
||||
|
||||
namespace esphome::script {
|
||||
|
||||
class ScriptLogger {
|
||||
protected:
|
||||
@@ -338,5 +338,4 @@ template<class C, typename... Ts> class ScriptWaitAction : public Action<Ts...>,
|
||||
std::list<std::tuple<Ts...>> param_queue_;
|
||||
};
|
||||
|
||||
} // namespace script
|
||||
} // namespace esphome
|
||||
} // namespace esphome::script
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/core/helpers.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace sdm_meter {
|
||||
namespace esphome::sdm_meter {
|
||||
|
||||
static const char *const TAG = "sdm_meter";
|
||||
|
||||
@@ -110,5 +109,4 @@ void SDMMeter::dump_config() {
|
||||
LOG_SENSOR(" ", "Export Reactive Energy", this->export_reactive_energy_sensor_);
|
||||
}
|
||||
|
||||
} // namespace sdm_meter
|
||||
} // namespace esphome
|
||||
} // namespace esphome::sdm_meter
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace esphome {
|
||||
namespace sdm_meter {
|
||||
namespace esphome::sdm_meter {
|
||||
|
||||
class SDMMeter : public PollingComponent, public modbus::ModbusDevice {
|
||||
public:
|
||||
@@ -79,5 +78,4 @@ class SDMMeter : public PollingComponent, public modbus::ModbusDevice {
|
||||
sensor::Sensor *export_reactive_energy_sensor_{nullptr};
|
||||
};
|
||||
|
||||
} // namespace sdm_meter
|
||||
} // namespace esphome
|
||||
} // namespace esphome::sdm_meter
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
namespace esphome {
|
||||
namespace sdm_meter {
|
||||
namespace esphome::sdm_meter {
|
||||
|
||||
/* PHASE STATUS REGISTERS */
|
||||
static const uint16_t SDM_PHASE_1_VOLTAGE = 0x0000;
|
||||
@@ -110,5 +109,4 @@ static const uint16_t SDM_CURRENT_RESETTABLE_EXPORT_ENERGY = 0x0186;
|
||||
static const uint16_t SDM_IMPORT_POWER = 0x0500;
|
||||
static const uint16_t SDM_EXPORT_POWER = 0x0502;
|
||||
|
||||
} // namespace sdm_meter
|
||||
} // namespace esphome
|
||||
} // namespace esphome::sdm_meter
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/core/helpers.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace sdp3x {
|
||||
namespace esphome::sdp3x {
|
||||
|
||||
static const char *const TAG = "sdp3x.sensor";
|
||||
static const uint16_t SDP3X_SOFT_RESET = 0x0006;
|
||||
@@ -114,5 +113,4 @@ void SDP3XComponent::read_pressure_() {
|
||||
this->status_clear_warning();
|
||||
}
|
||||
|
||||
} // namespace sdp3x
|
||||
} // namespace esphome
|
||||
} // namespace esphome::sdp3x
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/components/sensor/sensor.h"
|
||||
#include "esphome/components/sensirion_common/i2c_sensirion.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace sdp3x {
|
||||
namespace esphome::sdp3x {
|
||||
|
||||
enum MeasurementMode { MASS_FLOW_AVG, DP_AVG };
|
||||
|
||||
@@ -25,5 +24,4 @@ class SDP3XComponent : public PollingComponent, public sensirion_common::Sensiri
|
||||
MeasurementMode measurement_mode_;
|
||||
};
|
||||
|
||||
} // namespace sdp3x
|
||||
} // namespace esphome
|
||||
} // namespace esphome::sdp3x
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
#include "esphome/core/log.h"
|
||||
#include "esphome/core/application.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace sds011 {
|
||||
namespace esphome::sds011 {
|
||||
|
||||
static const char *const TAG = "sds011";
|
||||
|
||||
@@ -184,5 +183,4 @@ void SDS011Component::set_update_interval_min(uint8_t update_interval_min) {
|
||||
this->update_interval_min_ = update_interval_min;
|
||||
}
|
||||
|
||||
} // namespace sds011
|
||||
} // namespace esphome
|
||||
} // namespace esphome::sds011
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
#include "esphome/components/sensor/sensor.h"
|
||||
#include "esphome/components/uart/uart.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace sds011 {
|
||||
namespace esphome::sds011 {
|
||||
|
||||
class SDS011Component : public Component, public uart::UARTDevice {
|
||||
public:
|
||||
@@ -44,5 +43,4 @@ class SDS011Component : public Component, public uart::UARTDevice {
|
||||
bool rx_mode_only_;
|
||||
};
|
||||
|
||||
} // namespace sds011
|
||||
} // namespace esphome
|
||||
} // namespace esphome::sds011
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#include "custom_mode_end_button.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr24hpc1 {
|
||||
namespace esphome::seeed_mr24hpc1 {
|
||||
|
||||
void CustomSetEndButton::press_action() { this->parent_->set_custom_end_mode(); }
|
||||
|
||||
} // namespace seeed_mr24hpc1
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr24hpc1
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/components/button/button.h"
|
||||
#include "../seeed_mr24hpc1.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr24hpc1 {
|
||||
namespace esphome::seeed_mr24hpc1 {
|
||||
|
||||
class CustomSetEndButton : public button::Button, public Parented<MR24HPC1Component> {
|
||||
public:
|
||||
@@ -14,5 +13,4 @@ class CustomSetEndButton : public button::Button, public Parented<MR24HPC1Compon
|
||||
void press_action() override;
|
||||
};
|
||||
|
||||
} // namespace seeed_mr24hpc1
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr24hpc1
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#include "restart_button.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr24hpc1 {
|
||||
namespace esphome::seeed_mr24hpc1 {
|
||||
|
||||
void RestartButton::press_action() { this->parent_->set_restart(); }
|
||||
|
||||
} // namespace seeed_mr24hpc1
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr24hpc1
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/components/button/button.h"
|
||||
#include "../seeed_mr24hpc1.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr24hpc1 {
|
||||
namespace esphome::seeed_mr24hpc1 {
|
||||
|
||||
class RestartButton : public button::Button, public Parented<MR24HPC1Component> {
|
||||
public:
|
||||
@@ -14,5 +13,4 @@ class RestartButton : public button::Button, public Parented<MR24HPC1Component>
|
||||
void press_action() override;
|
||||
};
|
||||
|
||||
} // namespace seeed_mr24hpc1
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr24hpc1
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
#include "custom_mode_number.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr24hpc1 {
|
||||
namespace esphome::seeed_mr24hpc1 {
|
||||
|
||||
void CustomModeNumber::control(float value) {
|
||||
this->publish_state(value);
|
||||
this->parent_->set_custom_mode(value);
|
||||
}
|
||||
|
||||
} // namespace seeed_mr24hpc1
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr24hpc1
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/components/number/number.h"
|
||||
#include "../seeed_mr24hpc1.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr24hpc1 {
|
||||
namespace esphome::seeed_mr24hpc1 {
|
||||
|
||||
class CustomModeNumber : public number::Number, public Parented<MR24HPC1Component> {
|
||||
public:
|
||||
@@ -14,5 +13,4 @@ class CustomModeNumber : public number::Number, public Parented<MR24HPC1Componen
|
||||
void control(float value) override;
|
||||
};
|
||||
|
||||
} // namespace seeed_mr24hpc1
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr24hpc1
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#include "custom_unman_time_number.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr24hpc1 {
|
||||
namespace esphome::seeed_mr24hpc1 {
|
||||
|
||||
void CustomUnmanTimeNumber::control(float value) { this->parent_->set_custom_unman_time(value); }
|
||||
|
||||
} // namespace seeed_mr24hpc1
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr24hpc1
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/components/number/number.h"
|
||||
#include "../seeed_mr24hpc1.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr24hpc1 {
|
||||
namespace esphome::seeed_mr24hpc1 {
|
||||
|
||||
class CustomUnmanTimeNumber : public number::Number, public Parented<MR24HPC1Component> {
|
||||
public:
|
||||
@@ -14,5 +13,4 @@ class CustomUnmanTimeNumber : public number::Number, public Parented<MR24HPC1Com
|
||||
void control(float value) override;
|
||||
};
|
||||
|
||||
} // namespace seeed_mr24hpc1
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr24hpc1
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#include "existence_threshold_number.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr24hpc1 {
|
||||
namespace esphome::seeed_mr24hpc1 {
|
||||
|
||||
void ExistenceThresholdNumber::control(float value) { this->parent_->set_existence_threshold(value); }
|
||||
|
||||
} // namespace seeed_mr24hpc1
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr24hpc1
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/components/number/number.h"
|
||||
#include "../seeed_mr24hpc1.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr24hpc1 {
|
||||
namespace esphome::seeed_mr24hpc1 {
|
||||
|
||||
class ExistenceThresholdNumber : public number::Number, public Parented<MR24HPC1Component> {
|
||||
public:
|
||||
@@ -14,5 +13,4 @@ class ExistenceThresholdNumber : public number::Number, public Parented<MR24HPC1
|
||||
void control(float value) override;
|
||||
};
|
||||
|
||||
} // namespace seeed_mr24hpc1
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr24hpc1
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#include "motion_threshold_number.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr24hpc1 {
|
||||
namespace esphome::seeed_mr24hpc1 {
|
||||
|
||||
void MotionThresholdNumber::control(float value) { this->parent_->set_motion_threshold(value); }
|
||||
|
||||
} // namespace seeed_mr24hpc1
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr24hpc1
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/components/number/number.h"
|
||||
#include "../seeed_mr24hpc1.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr24hpc1 {
|
||||
namespace esphome::seeed_mr24hpc1 {
|
||||
|
||||
class MotionThresholdNumber : public number::Number, public Parented<MR24HPC1Component> {
|
||||
public:
|
||||
@@ -14,5 +13,4 @@ class MotionThresholdNumber : public number::Number, public Parented<MR24HPC1Com
|
||||
void control(float value) override;
|
||||
};
|
||||
|
||||
} // namespace seeed_mr24hpc1
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr24hpc1
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#include "motion_trigger_time_number.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr24hpc1 {
|
||||
namespace esphome::seeed_mr24hpc1 {
|
||||
|
||||
void MotionTriggerTimeNumber::control(float value) { this->parent_->set_motion_trigger_time(value); }
|
||||
|
||||
} // namespace seeed_mr24hpc1
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr24hpc1
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/components/number/number.h"
|
||||
#include "../seeed_mr24hpc1.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr24hpc1 {
|
||||
namespace esphome::seeed_mr24hpc1 {
|
||||
|
||||
class MotionTriggerTimeNumber : public number::Number, public Parented<MR24HPC1Component> {
|
||||
public:
|
||||
@@ -14,5 +13,4 @@ class MotionTriggerTimeNumber : public number::Number, public Parented<MR24HPC1C
|
||||
void control(float value) override;
|
||||
};
|
||||
|
||||
} // namespace seeed_mr24hpc1
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr24hpc1
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#include "motiontorest_time_number.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr24hpc1 {
|
||||
namespace esphome::seeed_mr24hpc1 {
|
||||
|
||||
void MotionToRestTimeNumber::control(float value) { this->parent_->set_motion_to_rest_time(value); }
|
||||
|
||||
} // namespace seeed_mr24hpc1
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr24hpc1
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/components/number/number.h"
|
||||
#include "../seeed_mr24hpc1.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr24hpc1 {
|
||||
namespace esphome::seeed_mr24hpc1 {
|
||||
|
||||
class MotionToRestTimeNumber : public number::Number, public Parented<MR24HPC1Component> {
|
||||
public:
|
||||
@@ -14,5 +13,4 @@ class MotionToRestTimeNumber : public number::Number, public Parented<MR24HPC1Co
|
||||
void control(float value) override;
|
||||
};
|
||||
|
||||
} // namespace seeed_mr24hpc1
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr24hpc1
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#include "sensitivity_number.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr24hpc1 {
|
||||
namespace esphome::seeed_mr24hpc1 {
|
||||
|
||||
void SensitivityNumber::control(float value) { this->parent_->set_sensitivity(value); }
|
||||
|
||||
} // namespace seeed_mr24hpc1
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr24hpc1
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/components/number/number.h"
|
||||
#include "../seeed_mr24hpc1.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr24hpc1 {
|
||||
namespace esphome::seeed_mr24hpc1 {
|
||||
|
||||
class SensitivityNumber : public number::Number, public Parented<MR24HPC1Component> {
|
||||
public:
|
||||
@@ -14,5 +13,4 @@ class SensitivityNumber : public number::Number, public Parented<MR24HPC1Compone
|
||||
void control(float value) override;
|
||||
};
|
||||
|
||||
} // namespace seeed_mr24hpc1
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr24hpc1
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
|
||||
#include <utility>
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr24hpc1 {
|
||||
namespace esphome::seeed_mr24hpc1 {
|
||||
|
||||
static const char *const TAG = "seeed_mr24hpc1";
|
||||
|
||||
@@ -1002,5 +1001,4 @@ void MR24HPC1Component::set_custom_unman_time(uint16_t value) {
|
||||
this->get_custom_unman_time();
|
||||
}
|
||||
|
||||
} // namespace seeed_mr24hpc1
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr24hpc1
|
||||
|
||||
@@ -30,8 +30,7 @@
|
||||
|
||||
#include <map>
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr24hpc1 {
|
||||
namespace esphome::seeed_mr24hpc1 {
|
||||
|
||||
enum FrameState {
|
||||
FRAME_IDLE,
|
||||
@@ -213,5 +212,4 @@ class MR24HPC1Component : public Component,
|
||||
void set_custom_unman_time(uint16_t value);
|
||||
};
|
||||
|
||||
} // namespace seeed_mr24hpc1
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr24hpc1
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr24hpc1 {
|
||||
namespace esphome::seeed_mr24hpc1 {
|
||||
|
||||
static const uint8_t FRAME_BUF_MAX_SIZE = 128;
|
||||
static const uint8_t PRODUCT_BUF_MAX_SIZE = 32;
|
||||
@@ -169,5 +168,4 @@ static const uint8_t GET_KEEP_AWAY[] = {
|
||||
FRAME_TAIL1_VALUE, FRAME_TAIL2_VALUE,
|
||||
};
|
||||
|
||||
} // namespace seeed_mr24hpc1
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr24hpc1
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
#include "existence_boundary_select.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr24hpc1 {
|
||||
namespace esphome::seeed_mr24hpc1 {
|
||||
|
||||
void ExistenceBoundarySelect::control(size_t index) {
|
||||
this->publish_state(index);
|
||||
this->parent_->set_existence_boundary(index);
|
||||
}
|
||||
|
||||
} // namespace seeed_mr24hpc1
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr24hpc1
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/components/select/select.h"
|
||||
#include "../seeed_mr24hpc1.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr24hpc1 {
|
||||
namespace esphome::seeed_mr24hpc1 {
|
||||
|
||||
class ExistenceBoundarySelect : public select::Select, public Parented<MR24HPC1Component> {
|
||||
public:
|
||||
@@ -14,5 +13,4 @@ class ExistenceBoundarySelect : public select::Select, public Parented<MR24HPC1C
|
||||
void control(size_t index) override;
|
||||
};
|
||||
|
||||
} // namespace seeed_mr24hpc1
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr24hpc1
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
#include "motion_boundary_select.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr24hpc1 {
|
||||
namespace esphome::seeed_mr24hpc1 {
|
||||
|
||||
void MotionBoundarySelect::control(size_t index) {
|
||||
this->publish_state(index);
|
||||
this->parent_->set_motion_boundary(index);
|
||||
}
|
||||
|
||||
} // namespace seeed_mr24hpc1
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr24hpc1
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/components/select/select.h"
|
||||
#include "../seeed_mr24hpc1.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr24hpc1 {
|
||||
namespace esphome::seeed_mr24hpc1 {
|
||||
|
||||
class MotionBoundarySelect : public select::Select, public Parented<MR24HPC1Component> {
|
||||
public:
|
||||
@@ -14,5 +13,4 @@ class MotionBoundarySelect : public select::Select, public Parented<MR24HPC1Comp
|
||||
void control(size_t index) override;
|
||||
};
|
||||
|
||||
} // namespace seeed_mr24hpc1
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr24hpc1
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
#include "scene_mode_select.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr24hpc1 {
|
||||
namespace esphome::seeed_mr24hpc1 {
|
||||
|
||||
void SceneModeSelect::control(size_t index) {
|
||||
this->publish_state(index);
|
||||
this->parent_->set_scene_mode(index);
|
||||
}
|
||||
|
||||
} // namespace seeed_mr24hpc1
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr24hpc1
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/components/select/select.h"
|
||||
#include "../seeed_mr24hpc1.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr24hpc1 {
|
||||
namespace esphome::seeed_mr24hpc1 {
|
||||
|
||||
class SceneModeSelect : public select::Select, public Parented<MR24HPC1Component> {
|
||||
public:
|
||||
@@ -14,5 +13,4 @@ class SceneModeSelect : public select::Select, public Parented<MR24HPC1Component
|
||||
void control(size_t index) override;
|
||||
};
|
||||
|
||||
} // namespace seeed_mr24hpc1
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr24hpc1
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
#include "unman_time_select.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr24hpc1 {
|
||||
namespace esphome::seeed_mr24hpc1 {
|
||||
|
||||
void UnmanTimeSelect::control(size_t index) {
|
||||
this->publish_state(index);
|
||||
this->parent_->set_unman_time(index);
|
||||
}
|
||||
|
||||
} // namespace seeed_mr24hpc1
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr24hpc1
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/components/select/select.h"
|
||||
#include "../seeed_mr24hpc1.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr24hpc1 {
|
||||
namespace esphome::seeed_mr24hpc1 {
|
||||
|
||||
class UnmanTimeSelect : public select::Select, public Parented<MR24HPC1Component> {
|
||||
public:
|
||||
@@ -14,5 +13,4 @@ class UnmanTimeSelect : public select::Select, public Parented<MR24HPC1Component
|
||||
void control(size_t index) override;
|
||||
};
|
||||
|
||||
} // namespace seeed_mr24hpc1
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr24hpc1
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
#include "underlyFuc_switch.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr24hpc1 {
|
||||
namespace esphome::seeed_mr24hpc1 {
|
||||
|
||||
void UnderlyOpenFunctionSwitch::write_state(bool state) {
|
||||
this->publish_state(state);
|
||||
this->parent_->set_underlying_open_function(state);
|
||||
}
|
||||
|
||||
} // namespace seeed_mr24hpc1
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr24hpc1
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/components/switch/switch.h"
|
||||
#include "../seeed_mr24hpc1.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr24hpc1 {
|
||||
namespace esphome::seeed_mr24hpc1 {
|
||||
|
||||
class UnderlyOpenFunctionSwitch : public switch_::Switch, public Parented<MR24HPC1Component> {
|
||||
public:
|
||||
@@ -14,5 +13,4 @@ class UnderlyOpenFunctionSwitch : public switch_::Switch, public Parented<MR24HP
|
||||
void write_state(bool state) override;
|
||||
};
|
||||
|
||||
} // namespace seeed_mr24hpc1
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr24hpc1
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user