mirror of
https://github.com/esphome/esphome.git
synced 2026-07-10 08:55:36 +00:00
[ld2420] Mark configurable classes as final (#17130)
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
namespace esphome::ld2420 {
|
||||
|
||||
class LD2420BinarySensor : public LD2420Listener, public Component, binary_sensor::BinarySensor {
|
||||
class LD2420BinarySensor final : public LD2420Listener, public Component, public binary_sensor::BinarySensor {
|
||||
public:
|
||||
void dump_config() override;
|
||||
void set_presence_sensor(binary_sensor::BinarySensor *bsensor) { this->presence_bsensor_ = bsensor; };
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
namespace esphome::ld2420 {
|
||||
|
||||
class LD2420ApplyConfigButton : public button::Button, public Parented<LD2420Component> {
|
||||
class LD2420ApplyConfigButton final : public button::Button, public Parented<LD2420Component> {
|
||||
public:
|
||||
LD2420ApplyConfigButton() = default;
|
||||
|
||||
@@ -13,7 +13,7 @@ class LD2420ApplyConfigButton : public button::Button, public Parented<LD2420Com
|
||||
void press_action() override;
|
||||
};
|
||||
|
||||
class LD2420RevertConfigButton : public button::Button, public Parented<LD2420Component> {
|
||||
class LD2420RevertConfigButton final : public button::Button, public Parented<LD2420Component> {
|
||||
public:
|
||||
LD2420RevertConfigButton() = default;
|
||||
|
||||
@@ -21,7 +21,7 @@ class LD2420RevertConfigButton : public button::Button, public Parented<LD2420Co
|
||||
void press_action() override;
|
||||
};
|
||||
|
||||
class LD2420RestartModuleButton : public button::Button, public Parented<LD2420Component> {
|
||||
class LD2420RestartModuleButton final : public button::Button, public Parented<LD2420Component> {
|
||||
public:
|
||||
LD2420RestartModuleButton() = default;
|
||||
|
||||
@@ -29,7 +29,7 @@ class LD2420RestartModuleButton : public button::Button, public Parented<LD2420C
|
||||
void press_action() override;
|
||||
};
|
||||
|
||||
class LD2420FactoryResetButton : public button::Button, public Parented<LD2420Component> {
|
||||
class LD2420FactoryResetButton final : public button::Button, public Parented<LD2420Component> {
|
||||
public:
|
||||
LD2420FactoryResetButton() = default;
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ class LD2420Listener {
|
||||
virtual void on_fw_version(std::string &fw){};
|
||||
};
|
||||
|
||||
class LD2420Component : public Component, public uart::UARTDevice {
|
||||
class LD2420Component final : public Component, public uart::UARTDevice {
|
||||
public:
|
||||
struct CmdFrameT {
|
||||
uint32_t header{0};
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
namespace esphome::ld2420 {
|
||||
|
||||
class LD2420TimeoutNumber : public number::Number, public Parented<LD2420Component> {
|
||||
class LD2420TimeoutNumber final : public number::Number, public Parented<LD2420Component> {
|
||||
public:
|
||||
LD2420TimeoutNumber() = default;
|
||||
|
||||
@@ -13,7 +13,7 @@ class LD2420TimeoutNumber : public number::Number, public Parented<LD2420Compone
|
||||
void control(float timeout) override;
|
||||
};
|
||||
|
||||
class LD2420MinDistanceNumber : public number::Number, public Parented<LD2420Component> {
|
||||
class LD2420MinDistanceNumber final : public number::Number, public Parented<LD2420Component> {
|
||||
public:
|
||||
LD2420MinDistanceNumber() = default;
|
||||
|
||||
@@ -21,7 +21,7 @@ class LD2420MinDistanceNumber : public number::Number, public Parented<LD2420Com
|
||||
void control(float min_gate) override;
|
||||
};
|
||||
|
||||
class LD2420MaxDistanceNumber : public number::Number, public Parented<LD2420Component> {
|
||||
class LD2420MaxDistanceNumber final : public number::Number, public Parented<LD2420Component> {
|
||||
public:
|
||||
LD2420MaxDistanceNumber() = default;
|
||||
|
||||
@@ -29,7 +29,7 @@ class LD2420MaxDistanceNumber : public number::Number, public Parented<LD2420Com
|
||||
void control(float max_gate) override;
|
||||
};
|
||||
|
||||
class LD2420GateSelectNumber : public number::Number, public Parented<LD2420Component> {
|
||||
class LD2420GateSelectNumber final : public number::Number, public Parented<LD2420Component> {
|
||||
public:
|
||||
LD2420GateSelectNumber() = default;
|
||||
|
||||
@@ -37,7 +37,7 @@ class LD2420GateSelectNumber : public number::Number, public Parented<LD2420Comp
|
||||
void control(float gate_select) override;
|
||||
};
|
||||
|
||||
class LD2420MoveSensFactorNumber : public number::Number, public Parented<LD2420Component> {
|
||||
class LD2420MoveSensFactorNumber final : public number::Number, public Parented<LD2420Component> {
|
||||
public:
|
||||
LD2420MoveSensFactorNumber() = default;
|
||||
|
||||
@@ -45,7 +45,7 @@ class LD2420MoveSensFactorNumber : public number::Number, public Parented<LD2420
|
||||
void control(float move_factor) override;
|
||||
};
|
||||
|
||||
class LD2420StillSensFactorNumber : public number::Number, public Parented<LD2420Component> {
|
||||
class LD2420StillSensFactorNumber final : public number::Number, public Parented<LD2420Component> {
|
||||
public:
|
||||
LD2420StillSensFactorNumber() = default;
|
||||
|
||||
@@ -53,7 +53,7 @@ class LD2420StillSensFactorNumber : public number::Number, public Parented<LD242
|
||||
void control(float still_factor) override;
|
||||
};
|
||||
|
||||
class LD2420StillThresholdNumbers : public number::Number, public Parented<LD2420Component> {
|
||||
class LD2420StillThresholdNumbers final : public number::Number, public Parented<LD2420Component> {
|
||||
public:
|
||||
LD2420StillThresholdNumbers() = default;
|
||||
LD2420StillThresholdNumbers(uint8_t gate);
|
||||
@@ -63,7 +63,7 @@ class LD2420StillThresholdNumbers : public number::Number, public Parented<LD242
|
||||
void control(float still_threshold) override;
|
||||
};
|
||||
|
||||
class LD2420MoveThresholdNumbers : public number::Number, public Parented<LD2420Component> {
|
||||
class LD2420MoveThresholdNumbers final : public number::Number, public Parented<LD2420Component> {
|
||||
public:
|
||||
LD2420MoveThresholdNumbers() = default;
|
||||
LD2420MoveThresholdNumbers(uint8_t gate);
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
namespace esphome::ld2420 {
|
||||
|
||||
class LD2420Select : public Component, public select::Select, public Parented<LD2420Component> {
|
||||
class LD2420Select final : public Component, public select::Select, public Parented<LD2420Component> {
|
||||
public:
|
||||
LD2420Select() = default;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
namespace esphome::ld2420 {
|
||||
|
||||
class LD2420Sensor : public LD2420Listener, public Component, sensor::Sensor {
|
||||
class LD2420Sensor final : public LD2420Listener, public Component, public sensor::Sensor {
|
||||
public:
|
||||
void dump_config() override;
|
||||
void set_distance_sensor(sensor::Sensor *sensor) { this->distance_sensor_ = sensor; }
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
namespace esphome::ld2420 {
|
||||
|
||||
class LD2420TextSensor : public LD2420Listener, public Component, text_sensor::TextSensor {
|
||||
class LD2420TextSensor final : public LD2420Listener, public Component, public text_sensor::TextSensor {
|
||||
public:
|
||||
void dump_config() override;
|
||||
void set_fw_version_text_sensor(text_sensor::TextSensor *tsensor) { this->fw_version_text_sensor_ = tsensor; };
|
||||
|
||||
Reference in New Issue
Block a user