mirror of
https://github.com/esphome/esphome.git
synced 2026-06-24 14:37:04 +00: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
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
#include <cinttypes>
|
||||
#include <utility>
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr60bha2 {
|
||||
namespace esphome::seeed_mr60bha2 {
|
||||
|
||||
static const char *const TAG = "seeed_mr60bha2";
|
||||
|
||||
@@ -219,5 +218,4 @@ void MR60BHA2Component::process_frame_(uint16_t frame_id, uint16_t frame_type, c
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace seeed_mr60bha2
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr60bha2
|
||||
|
||||
@@ -13,8 +13,7 @@
|
||||
|
||||
#include <map>
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr60bha2 {
|
||||
namespace esphome::seeed_mr60bha2 {
|
||||
static const uint8_t FRAME_HEADER_BUFFER = 0x01;
|
||||
static const uint16_t BREATH_RATE_TYPE_BUFFER = 0x0A14;
|
||||
static const uint16_t PEOPLE_EXIST_TYPE_BUFFER = 0x0F09;
|
||||
@@ -46,5 +45,4 @@ class MR60BHA2Component : public Component,
|
||||
std::vector<uint8_t> rx_message_;
|
||||
};
|
||||
|
||||
} // namespace seeed_mr60bha2
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr60bha2
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#include "get_radar_parameters_button.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr60fda2 {
|
||||
namespace esphome::seeed_mr60fda2 {
|
||||
|
||||
void GetRadarParametersButton::press_action() { this->parent_->get_radar_parameters(); }
|
||||
|
||||
} // namespace seeed_mr60fda2
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr60fda2
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/components/button/button.h"
|
||||
#include "../seeed_mr60fda2.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr60fda2 {
|
||||
namespace esphome::seeed_mr60fda2 {
|
||||
|
||||
class GetRadarParametersButton : public button::Button, public Parented<MR60FDA2Component> {
|
||||
public:
|
||||
@@ -14,5 +13,4 @@ class GetRadarParametersButton : public button::Button, public Parented<MR60FDA2
|
||||
void press_action() override;
|
||||
};
|
||||
|
||||
} // namespace seeed_mr60fda2
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr60fda2
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#include "reset_radar_button.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr60fda2 {
|
||||
namespace esphome::seeed_mr60fda2 {
|
||||
|
||||
void ResetRadarButton::press_action() { this->parent_->factory_reset(); }
|
||||
|
||||
} // namespace seeed_mr60fda2
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr60fda2
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/components/button/button.h"
|
||||
#include "../seeed_mr60fda2.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr60fda2 {
|
||||
namespace esphome::seeed_mr60fda2 {
|
||||
|
||||
class ResetRadarButton : public button::Button, public Parented<MR60FDA2Component> {
|
||||
public:
|
||||
@@ -14,5 +13,4 @@ class ResetRadarButton : public button::Button, public Parented<MR60FDA2Componen
|
||||
void press_action() override;
|
||||
};
|
||||
|
||||
} // namespace seeed_mr60fda2
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr60fda2
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
#include <cinttypes>
|
||||
#include <utility>
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr60fda2 {
|
||||
namespace esphome::seeed_mr60fda2 {
|
||||
|
||||
static const char *const TAG = "seeed_mr60fda2";
|
||||
|
||||
@@ -393,5 +392,4 @@ void MR60FDA2Component::factory_reset() {
|
||||
this->get_radar_parameters();
|
||||
}
|
||||
|
||||
} // namespace seeed_mr60fda2
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr60fda2
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
|
||||
#include <map>
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr60fda2 {
|
||||
namespace esphome::seeed_mr60fda2 {
|
||||
|
||||
static const uint8_t DATA_BUF_MAX_SIZE = 28;
|
||||
static const uint8_t FRAME_BUF_MAX_SIZE = 37;
|
||||
@@ -97,5 +96,4 @@ class MR60FDA2Component : public Component,
|
||||
void factory_reset();
|
||||
};
|
||||
|
||||
} // namespace seeed_mr60fda2
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr60fda2
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
#include "height_threshold_select.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr60fda2 {
|
||||
namespace esphome::seeed_mr60fda2 {
|
||||
|
||||
void HeightThresholdSelect::control(size_t index) {
|
||||
this->publish_state(index);
|
||||
this->parent_->set_height_threshold(index);
|
||||
}
|
||||
|
||||
} // namespace seeed_mr60fda2
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr60fda2
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/components/select/select.h"
|
||||
#include "../seeed_mr60fda2.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr60fda2 {
|
||||
namespace esphome::seeed_mr60fda2 {
|
||||
|
||||
class HeightThresholdSelect : public select::Select, public Parented<MR60FDA2Component> {
|
||||
public:
|
||||
@@ -14,5 +13,4 @@ class HeightThresholdSelect : public select::Select, public Parented<MR60FDA2Com
|
||||
void control(size_t index) override;
|
||||
};
|
||||
|
||||
} // namespace seeed_mr60fda2
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr60fda2
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
#include "install_height_select.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr60fda2 {
|
||||
namespace esphome::seeed_mr60fda2 {
|
||||
|
||||
void InstallHeightSelect::control(size_t index) {
|
||||
this->publish_state(index);
|
||||
this->parent_->set_install_height(index);
|
||||
}
|
||||
|
||||
} // namespace seeed_mr60fda2
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr60fda2
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/components/select/select.h"
|
||||
#include "../seeed_mr60fda2.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr60fda2 {
|
||||
namespace esphome::seeed_mr60fda2 {
|
||||
|
||||
class InstallHeightSelect : public select::Select, public Parented<MR60FDA2Component> {
|
||||
public:
|
||||
@@ -14,5 +13,4 @@ class InstallHeightSelect : public select::Select, public Parented<MR60FDA2Compo
|
||||
void control(size_t index) override;
|
||||
};
|
||||
|
||||
} // namespace seeed_mr60fda2
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr60fda2
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
#include "sensitivity_select.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr60fda2 {
|
||||
namespace esphome::seeed_mr60fda2 {
|
||||
|
||||
void SensitivitySelect::control(size_t index) {
|
||||
this->publish_state(index);
|
||||
this->parent_->set_sensitivity(index);
|
||||
}
|
||||
|
||||
} // namespace seeed_mr60fda2
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr60fda2
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/components/select/select.h"
|
||||
#include "../seeed_mr60fda2.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace seeed_mr60fda2 {
|
||||
namespace esphome::seeed_mr60fda2 {
|
||||
|
||||
class SensitivitySelect : public select::Select, public Parented<MR60FDA2Component> {
|
||||
public:
|
||||
@@ -14,5 +13,4 @@ class SensitivitySelect : public select::Select, public Parented<MR60FDA2Compone
|
||||
void control(size_t index) override;
|
||||
};
|
||||
|
||||
} // namespace seeed_mr60fda2
|
||||
} // namespace esphome
|
||||
} // namespace esphome::seeed_mr60fda2
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/core/helpers.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace selec_meter {
|
||||
namespace esphome::selec_meter {
|
||||
|
||||
static const char *const TAG = "selec_meter";
|
||||
|
||||
@@ -107,5 +106,4 @@ void SelecMeter::dump_config() {
|
||||
LOG_SENSOR(" ", "Maximum Demand Apparent Power", this->maximum_demand_apparent_power_sensor_);
|
||||
}
|
||||
|
||||
} // namespace selec_meter
|
||||
} // namespace esphome
|
||||
} // namespace esphome::selec_meter
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace esphome {
|
||||
namespace selec_meter {
|
||||
namespace esphome::selec_meter {
|
||||
|
||||
#define SELEC_METER_SENSOR(name) \
|
||||
protected: \
|
||||
@@ -43,5 +42,4 @@ class SelecMeter : public PollingComponent, public modbus::ModbusDevice {
|
||||
void dump_config() override;
|
||||
};
|
||||
|
||||
} // namespace selec_meter
|
||||
} // namespace esphome
|
||||
} // namespace esphome::selec_meter
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
namespace esphome {
|
||||
namespace selec_meter {
|
||||
namespace esphome::selec_meter {
|
||||
|
||||
static const float TWO_DEC_UNIT = 0.01;
|
||||
static const float ONE_DEC_UNIT = 0.1;
|
||||
@@ -28,5 +27,4 @@ static const uint16_t SELEC_MAXIMUM_DEMAND_ACTIVE_POWER = 0x001C;
|
||||
static const uint16_t SELEC_MAXIMUM_DEMAND_REACTIVE_POWER = 0x001E;
|
||||
static const uint16_t SELEC_MAXIMUM_DEMAND_APPARENT_POWER = 0x0020;
|
||||
|
||||
} // namespace selec_meter
|
||||
} // namespace esphome
|
||||
} // namespace esphome::selec_meter
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
#include "esphome/core/log.h"
|
||||
#include "esphome/core/hal.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace sen0321_sensor {
|
||||
namespace esphome::sen0321_sensor {
|
||||
|
||||
static const char *const TAG = "sen0321_sensor.sensor";
|
||||
|
||||
@@ -31,5 +30,4 @@ void Sen0321Sensor::read_data_() {
|
||||
this->publish_state(((uint16_t) (result[0] << 8) + result[1]));
|
||||
}
|
||||
|
||||
} // namespace sen0321_sensor
|
||||
} // namespace esphome
|
||||
} // namespace esphome::sen0321_sensor
|
||||
|
||||
@@ -7,8 +7,7 @@
|
||||
// ref:
|
||||
// https://github.com/DFRobot/DFRobot_OzoneSensor
|
||||
|
||||
namespace esphome {
|
||||
namespace sen0321_sensor {
|
||||
namespace esphome::sen0321_sensor {
|
||||
// Sensor Mode
|
||||
// While passive is supposedly supported, it does not appear to work reliably.
|
||||
static const uint8_t SENSOR_MODE_REGISTER = 0x03;
|
||||
@@ -31,5 +30,4 @@ class Sen0321Sensor : public sensor::Sensor, public PollingComponent, public i2c
|
||||
void read_data_();
|
||||
};
|
||||
|
||||
} // namespace sen0321_sensor
|
||||
} // namespace esphome
|
||||
} // namespace esphome::sen0321_sensor
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "sen21231.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace sen21231_sensor {
|
||||
namespace esphome::sen21231_sensor {
|
||||
|
||||
static const char *const TAG = "sen21231_sensor.sensor";
|
||||
|
||||
@@ -33,5 +32,4 @@ void Sen21231Sensor::read_data_() {
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace sen21231_sensor
|
||||
} // namespace esphome
|
||||
} // namespace esphome::sen21231_sensor
|
||||
|
||||
@@ -7,8 +7,7 @@
|
||||
// ref:
|
||||
// https://github.com/usefulsensors/person_sensor_pico_c/blob/main/person_sensor.h
|
||||
|
||||
namespace esphome {
|
||||
namespace sen21231_sensor {
|
||||
namespace esphome::sen21231_sensor {
|
||||
// The I2C address of the person sensor board.
|
||||
static const uint8_t PERSON_SENSOR_I2C_ADDRESS = 0x62;
|
||||
static const uint8_t PERSON_SENSOR_REG_MODE = 0x01;
|
||||
@@ -73,5 +72,4 @@ class Sen21231Sensor : public sensor::Sensor, public PollingComponent, public i2
|
||||
void read_data_();
|
||||
};
|
||||
|
||||
} // namespace sen21231_sensor
|
||||
} // namespace esphome
|
||||
} // namespace esphome::sen21231_sensor
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/core/automation.h"
|
||||
#include "sen5x.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace sen5x {
|
||||
namespace esphome::sen5x {
|
||||
|
||||
template<typename... Ts> class StartFanAction : public Action<Ts...> {
|
||||
public:
|
||||
@@ -17,5 +16,4 @@ template<typename... Ts> class StartFanAction : public Action<Ts...> {
|
||||
SEN5XComponent *sen5x_;
|
||||
};
|
||||
|
||||
} // namespace sen5x
|
||||
} // namespace esphome
|
||||
} // namespace esphome::sen5x
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
#include "esphome/core/log.h"
|
||||
#include <cinttypes>
|
||||
|
||||
namespace esphome {
|
||||
namespace sen5x {
|
||||
namespace esphome::sen5x {
|
||||
|
||||
static const char *const TAG = "sen5x";
|
||||
|
||||
@@ -423,5 +422,4 @@ bool SEN5XComponent::start_fan_cleaning() {
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace sen5x
|
||||
} // namespace esphome
|
||||
} // namespace esphome::sen5x
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
#include "esphome/core/application.h"
|
||||
#include "esphome/core/preferences.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace sen5x {
|
||||
namespace esphome::sen5x {
|
||||
|
||||
enum ERRORCODE : uint8_t {
|
||||
COMMUNICATION_FAILED,
|
||||
@@ -130,5 +129,4 @@ class SEN5XComponent : public PollingComponent, public sensirion_common::Sensiri
|
||||
ESPPreferenceObject pref_;
|
||||
};
|
||||
|
||||
} // namespace sen5x
|
||||
} // namespace esphome
|
||||
} // namespace esphome::sen5x
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
#include "esphome/core/helpers.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace senseair {
|
||||
namespace esphome::senseair {
|
||||
|
||||
static const char *const TAG = "senseair";
|
||||
static const uint8_t SENSEAIR_REQUEST_LENGTH = 8;
|
||||
@@ -150,5 +149,4 @@ void SenseAirComponent::dump_config() {
|
||||
this->check_uart_settings(9600);
|
||||
}
|
||||
|
||||
} // namespace senseair
|
||||
} // namespace esphome
|
||||
} // namespace esphome::senseair
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
#include "esphome/components/sensor/sensor.h"
|
||||
#include "esphome/components/uart/uart.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace senseair {
|
||||
namespace esphome::senseair {
|
||||
|
||||
enum SenseAirStatus : uint8_t {
|
||||
FATAL_ERROR = 1 << 0,
|
||||
@@ -88,5 +87,4 @@ template<typename... Ts> class SenseAirABCGetPeriodAction : public Action<Ts...>
|
||||
SenseAirComponent *senseair_;
|
||||
};
|
||||
|
||||
} // namespace senseair
|
||||
} // namespace esphome
|
||||
} // namespace esphome::senseair
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/core/log.h"
|
||||
#include <cinttypes>
|
||||
|
||||
namespace esphome {
|
||||
namespace sensirion_common {
|
||||
namespace esphome::sensirion_common {
|
||||
|
||||
static const char *const TAG = "sensirion_i2c";
|
||||
// To avoid memory allocations for small writes a stack buffer is used
|
||||
@@ -79,5 +78,4 @@ bool SensirionI2CDevice::get_register_(uint16_t reg, CommandLen command_len, uin
|
||||
return result;
|
||||
}
|
||||
|
||||
} // namespace sensirion_common
|
||||
} // namespace esphome
|
||||
} // namespace esphome::sensirion_common
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace esphome {
|
||||
namespace sensirion_common {
|
||||
namespace esphome::sensirion_common {
|
||||
|
||||
/**
|
||||
* Implementation of I2C functions for Sensirion sensors
|
||||
@@ -149,5 +148,4 @@ class SensirionI2CDevice : public i2c::I2CDevice {
|
||||
i2c::ErrorCode last_error_;
|
||||
};
|
||||
|
||||
} // namespace sensirion_common
|
||||
} // namespace esphome
|
||||
} // namespace esphome::sensirion_common
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/core/hal.h"
|
||||
#include <cinttypes>
|
||||
|
||||
namespace esphome {
|
||||
namespace servo {
|
||||
namespace esphome::servo {
|
||||
|
||||
static const char *const TAG = "servo";
|
||||
|
||||
@@ -106,5 +105,4 @@ void Servo::save_level_(float v) {
|
||||
this->rtc_.save(&v);
|
||||
}
|
||||
|
||||
} // namespace servo
|
||||
} // namespace esphome
|
||||
} // namespace esphome::servo
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
#include "esphome/core/preferences.h"
|
||||
#include "esphome/components/output/float_output.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace servo {
|
||||
namespace esphome::servo {
|
||||
|
||||
extern uint32_t global_servo_id; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
|
||||
|
||||
@@ -73,5 +72,4 @@ template<typename... Ts> class ServoDetachAction : public Action<Ts...> {
|
||||
Servo *servo_;
|
||||
};
|
||||
|
||||
} // namespace servo
|
||||
} // namespace esphome
|
||||
} // namespace esphome::servo
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "sfa30.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace sfa30 {
|
||||
namespace esphome::sfa30 {
|
||||
|
||||
static const char *const TAG = "sfa30";
|
||||
|
||||
@@ -91,5 +90,4 @@ void SFA30Component::update() {
|
||||
});
|
||||
}
|
||||
|
||||
} // namespace sfa30
|
||||
} // namespace esphome
|
||||
} // namespace esphome::sfa30
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/components/sensor/sensor.h"
|
||||
#include "esphome/components/sensirion_common/i2c_sensirion.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace sfa30 {
|
||||
namespace esphome::sfa30 {
|
||||
|
||||
class SFA30Component : public PollingComponent, public sensirion_common::SensirionI2CDevice {
|
||||
enum ErrorCode { DEVICE_MARKING_READ_FAILED, MEASUREMENT_INIT_FAILED, UNKNOWN };
|
||||
@@ -29,5 +28,4 @@ class SFA30Component : public PollingComponent, public sensirion_common::Sensiri
|
||||
sensor::Sensor *temperature_sensor_{nullptr};
|
||||
};
|
||||
|
||||
} // namespace sfa30
|
||||
} // namespace esphome
|
||||
} // namespace esphome::sfa30
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
|
||||
#include <cinttypes>
|
||||
|
||||
namespace esphome {
|
||||
namespace sgp30 {
|
||||
namespace esphome::sgp30 {
|
||||
|
||||
static const char *const TAG = "sgp30";
|
||||
|
||||
@@ -302,5 +301,4 @@ void SGP30Component::update() {
|
||||
});
|
||||
}
|
||||
|
||||
} // namespace sgp30
|
||||
} // namespace esphome
|
||||
} // namespace esphome::sgp30
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
#include <cinttypes>
|
||||
#include <cmath>
|
||||
|
||||
namespace esphome {
|
||||
namespace sgp30 {
|
||||
namespace esphome::sgp30 {
|
||||
|
||||
struct SGP30Baselines {
|
||||
uint16_t eco2;
|
||||
@@ -67,5 +66,4 @@ class SGP30Component : public PollingComponent, public sensirion_common::Sensiri
|
||||
sensor::Sensor *temperature_sensor_{nullptr};
|
||||
};
|
||||
|
||||
} // namespace sgp30
|
||||
} // namespace esphome
|
||||
} // namespace esphome::sgp30
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/core/hal.h"
|
||||
#include <cinttypes>
|
||||
|
||||
namespace esphome {
|
||||
namespace sgp4x {
|
||||
namespace esphome::sgp4x {
|
||||
|
||||
static const char *const TAG = "sgp4x";
|
||||
|
||||
@@ -290,5 +289,4 @@ void SGP4xComponent::dump_config() {
|
||||
LOG_SENSOR(" ", "NOx", this->nox_sensor_);
|
||||
}
|
||||
|
||||
} // namespace sgp4x
|
||||
} // namespace esphome
|
||||
} // namespace esphome::sgp4x
|
||||
|
||||
@@ -11,8 +11,7 @@
|
||||
#include <VOCGasIndexAlgorithm.h>
|
||||
#include <NOxGasIndexAlgorithm.h>
|
||||
|
||||
namespace esphome {
|
||||
namespace sgp4x {
|
||||
namespace esphome::sgp4x {
|
||||
|
||||
struct SGP4xBaselines {
|
||||
int32_t state0;
|
||||
@@ -134,5 +133,4 @@ class SGP4xComponent : public PollingComponent, public sensor::Sensor, public se
|
||||
uint32_t seconds_since_last_store_;
|
||||
SGP4xBaselines voc_baselines_storage_;
|
||||
};
|
||||
} // namespace sgp4x
|
||||
} // namespace esphome
|
||||
} // namespace esphome::sgp4x
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "sht3xd.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace sht3xd {
|
||||
namespace esphome::sht3xd {
|
||||
|
||||
static const char *const TAG = "sht3xd";
|
||||
|
||||
@@ -82,5 +81,4 @@ void SHT3XDComponent::update() {
|
||||
});
|
||||
}
|
||||
|
||||
} // namespace sht3xd
|
||||
} // namespace esphome
|
||||
} // namespace esphome::sht3xd
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/components/sensor/sensor.h"
|
||||
#include "esphome/components/sensirion_common/i2c_sensirion.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace sht3xd {
|
||||
namespace esphome::sht3xd {
|
||||
|
||||
/// This class implements support for the SHT3x-DIS family of temperature+humidity i2c sensors.
|
||||
class SHT3XDComponent : public PollingComponent, public sensirion_common::SensirionI2CDevice {
|
||||
@@ -25,5 +24,4 @@ class SHT3XDComponent : public PollingComponent, public sensirion_common::Sensir
|
||||
uint32_t serial_number_{0};
|
||||
};
|
||||
|
||||
} // namespace sht3xd
|
||||
} // namespace esphome
|
||||
} // namespace esphome::sht3xd
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
#include "esphome/core/hal.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace sht4x {
|
||||
namespace esphome::sht4x {
|
||||
|
||||
static const char *const TAG = "sht4x";
|
||||
|
||||
@@ -127,5 +126,4 @@ void SHT4XComponent::update() {
|
||||
});
|
||||
}
|
||||
|
||||
} // namespace sht4x
|
||||
} // namespace esphome
|
||||
} // namespace esphome::sht4x
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
|
||||
#include <cinttypes>
|
||||
|
||||
namespace esphome {
|
||||
namespace sht4x {
|
||||
namespace esphome::sht4x {
|
||||
|
||||
enum SHT4XPRECISION { SHT4X_PRECISION_HIGH = 0, SHT4X_PRECISION_MED, SHT4X_PRECISION_LOW };
|
||||
|
||||
@@ -45,5 +44,4 @@ class SHT4XComponent : public PollingComponent, public sensirion_common::Sensiri
|
||||
sensor::Sensor *humidity_sensor_{nullptr};
|
||||
};
|
||||
|
||||
} // namespace sht4x
|
||||
} // namespace esphome
|
||||
} // namespace esphome::sht4x
|
||||
|
||||
@@ -10,8 +10,7 @@
|
||||
#include <Esp.h>
|
||||
#endif
|
||||
|
||||
namespace esphome {
|
||||
namespace shutdown {
|
||||
namespace esphome::shutdown {
|
||||
|
||||
static const char *const TAG = "shutdown.button";
|
||||
|
||||
@@ -29,5 +28,4 @@ void ShutdownButton::press_action() {
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace shutdown
|
||||
} // namespace esphome
|
||||
} // namespace esphome::shutdown
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/core/component.h"
|
||||
#include "esphome/components/button/button.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace shutdown {
|
||||
namespace esphome::shutdown {
|
||||
|
||||
class ShutdownButton : public button::Button, public Component {
|
||||
public:
|
||||
@@ -14,5 +13,4 @@ class ShutdownButton : public button::Button, public Component {
|
||||
void press_action() override;
|
||||
};
|
||||
|
||||
} // namespace shutdown
|
||||
} // namespace esphome
|
||||
} // namespace esphome::shutdown
|
||||
|
||||
@@ -10,8 +10,7 @@
|
||||
#include <Esp.h>
|
||||
#endif
|
||||
|
||||
namespace esphome {
|
||||
namespace shutdown {
|
||||
namespace esphome::shutdown {
|
||||
|
||||
static const char *const TAG = "shutdown.switch";
|
||||
|
||||
@@ -34,5 +33,4 @@ void ShutdownSwitch::write_state(bool state) {
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace shutdown
|
||||
} // namespace esphome
|
||||
} // namespace esphome::shutdown
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/core/component.h"
|
||||
#include "esphome/components/switch/switch.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace shutdown {
|
||||
namespace esphome::shutdown {
|
||||
|
||||
class ShutdownSwitch : public switch_::Switch, public Component {
|
||||
public:
|
||||
@@ -14,5 +13,4 @@ class ShutdownSwitch : public switch_::Switch, public Component {
|
||||
void write_state(bool state) override;
|
||||
};
|
||||
|
||||
} // namespace shutdown
|
||||
} // namespace esphome
|
||||
} // namespace esphome::shutdown
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "sigma_delta_output.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace sigma_delta_output {
|
||||
namespace esphome::sigma_delta_output {
|
||||
|
||||
static const char *const TAG = "output.sigma_delta";
|
||||
|
||||
@@ -53,5 +52,4 @@ void SigmaDeltaOutput::update() {
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace sigma_delta_output
|
||||
} // namespace esphome
|
||||
} // namespace esphome::sigma_delta_output
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/core/hal.h"
|
||||
#include "esphome/components/output/float_output.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace sigma_delta_output {
|
||||
namespace esphome::sigma_delta_output {
|
||||
|
||||
class SigmaDeltaOutput : public PollingComponent, public output::FloatOutput {
|
||||
public:
|
||||
@@ -43,5 +42,4 @@ class SigmaDeltaOutput : public PollingComponent, public output::FloatOutput {
|
||||
float state_{0.};
|
||||
bool value_{false};
|
||||
};
|
||||
} // namespace sigma_delta_output
|
||||
} // namespace esphome
|
||||
} // namespace esphome::sigma_delta_output
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/core/log.h"
|
||||
#include <cstring>
|
||||
|
||||
namespace esphome {
|
||||
namespace sim800l {
|
||||
namespace esphome::sim800l {
|
||||
|
||||
static const char *const TAG = "sim800l";
|
||||
|
||||
@@ -492,5 +491,4 @@ void Sim800LComponent::set_registered_(bool registered) {
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace sim800l
|
||||
} // namespace esphome
|
||||
} // namespace esphome::sim800l
|
||||
|
||||
@@ -13,8 +13,7 @@
|
||||
#include "esphome/components/uart/uart.h"
|
||||
#include "esphome/core/automation.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace sim800l {
|
||||
namespace esphome::sim800l {
|
||||
|
||||
const uint16_t SIM800L_READ_BUFFER_LENGTH = 1024;
|
||||
|
||||
@@ -184,5 +183,4 @@ template<typename... Ts> class Sim800LDisconnectAction : public Action<Ts...> {
|
||||
Sim800LComponent *parent_;
|
||||
};
|
||||
|
||||
} // namespace sim800l
|
||||
} // namespace esphome
|
||||
} // namespace esphome::sim800l
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/core/gpio.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace slow_pwm {
|
||||
namespace esphome::slow_pwm {
|
||||
|
||||
static const char *const TAG = "output.slow_pwm";
|
||||
|
||||
@@ -79,5 +78,4 @@ void SlowPWMOutput::write_state(float state) {
|
||||
this->restart_cycle();
|
||||
}
|
||||
|
||||
} // namespace slow_pwm
|
||||
} // namespace esphome
|
||||
} // namespace esphome::slow_pwm
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/core/hal.h"
|
||||
#include "esphome/components/output/float_output.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace slow_pwm {
|
||||
namespace esphome::slow_pwm {
|
||||
|
||||
class SlowPWMOutput : public output::FloatOutput, public Component {
|
||||
public:
|
||||
@@ -57,5 +56,4 @@ class SlowPWMOutput : public output::FloatOutput, public Component {
|
||||
bool restart_cycle_on_state_change_;
|
||||
};
|
||||
|
||||
} // namespace slow_pwm
|
||||
} // namespace esphome
|
||||
} // namespace esphome::slow_pwm
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user