mirror of
https://github.com/esphome/esphome.git
synced 2026-02-21 08:55:36 -07:00
Merge branch 'template_final' into integration
This commit is contained in:
@@ -49,7 +49,7 @@ struct SensorInfo {
|
||||
uint8_t store_index;
|
||||
};
|
||||
|
||||
class TemplateAlarmControlPanel : public alarm_control_panel::AlarmControlPanel, public Component {
|
||||
class TemplateAlarmControlPanel final : public alarm_control_panel::AlarmControlPanel, public Component {
|
||||
public:
|
||||
TemplateAlarmControlPanel();
|
||||
void dump_config() override;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
namespace esphome {
|
||||
namespace template_ {
|
||||
|
||||
class TemplateBinarySensor : public Component, public binary_sensor::BinarySensor {
|
||||
class TemplateBinarySensor final : public Component, public binary_sensor::BinarySensor {
|
||||
public:
|
||||
template<typename F> void set_template(F &&f) { this->f_.set(std::forward<F>(f)); }
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
namespace esphome {
|
||||
namespace template_ {
|
||||
|
||||
class TemplateButton : public button::Button {
|
||||
class TemplateButton final : public button::Button {
|
||||
public:
|
||||
// Implements the abstract `press_action` but the `on_press` trigger already handles the press.
|
||||
void press_action() override{};
|
||||
|
||||
@@ -14,7 +14,7 @@ enum TemplateCoverRestoreMode {
|
||||
COVER_RESTORE_AND_CALL,
|
||||
};
|
||||
|
||||
class TemplateCover : public cover::Cover, public Component {
|
||||
class TemplateCover final : public cover::Cover, public Component {
|
||||
public:
|
||||
TemplateCover();
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
namespace esphome {
|
||||
namespace template_ {
|
||||
|
||||
class TemplateDate : public datetime::DateEntity, public PollingComponent {
|
||||
class TemplateDate final : public datetime::DateEntity, public PollingComponent {
|
||||
public:
|
||||
template<typename F> void set_template(F &&f) { this->f_.set(std::forward<F>(f)); }
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
namespace esphome {
|
||||
namespace template_ {
|
||||
|
||||
class TemplateDateTime : public datetime::DateTimeEntity, public PollingComponent {
|
||||
class TemplateDateTime final : public datetime::DateTimeEntity, public PollingComponent {
|
||||
public:
|
||||
template<typename F> void set_template(F &&f) { this->f_.set(std::forward<F>(f)); }
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
namespace esphome {
|
||||
namespace template_ {
|
||||
|
||||
class TemplateTime : public datetime::TimeEntity, public PollingComponent {
|
||||
class TemplateTime final : public datetime::TimeEntity, public PollingComponent {
|
||||
public:
|
||||
template<typename F> void set_template(F &&f) { this->f_.set(std::forward<F>(f)); }
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
namespace esphome {
|
||||
namespace template_ {
|
||||
|
||||
class TemplateEvent : public Component, public event::Event {};
|
||||
class TemplateEvent final : public Component, public event::Event {};
|
||||
|
||||
} // namespace template_
|
||||
} // namespace esphome
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
namespace esphome {
|
||||
namespace template_ {
|
||||
|
||||
class TemplateFan : public Component, public fan::Fan {
|
||||
class TemplateFan final : public Component, public fan::Fan {
|
||||
public:
|
||||
TemplateFan() {}
|
||||
void setup() override;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
namespace esphome {
|
||||
namespace template_ {
|
||||
|
||||
class TemplateLock : public lock::Lock, public Component {
|
||||
class TemplateLock final : public lock::Lock, public Component {
|
||||
public:
|
||||
TemplateLock();
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
namespace esphome {
|
||||
namespace template_ {
|
||||
|
||||
class TemplateNumber : public number::Number, public PollingComponent {
|
||||
class TemplateNumber final : public number::Number, public PollingComponent {
|
||||
public:
|
||||
template<typename F> void set_template(F &&f) { this->f_.set(std::forward<F>(f)); }
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
namespace esphome {
|
||||
namespace template_ {
|
||||
|
||||
class TemplateBinaryOutput : public output::BinaryOutput {
|
||||
class TemplateBinaryOutput final : public output::BinaryOutput {
|
||||
public:
|
||||
Trigger<bool> *get_trigger() const { return trigger_; }
|
||||
|
||||
@@ -17,7 +17,7 @@ class TemplateBinaryOutput : public output::BinaryOutput {
|
||||
Trigger<bool> *trigger_ = new Trigger<bool>();
|
||||
};
|
||||
|
||||
class TemplateFloatOutput : public output::FloatOutput {
|
||||
class TemplateFloatOutput final : public output::FloatOutput {
|
||||
public:
|
||||
Trigger<float> *get_trigger() const { return trigger_; }
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
namespace esphome {
|
||||
namespace template_ {
|
||||
|
||||
class TemplateSelect : public select::Select, public PollingComponent {
|
||||
class TemplateSelect final : public select::Select, public PollingComponent {
|
||||
public:
|
||||
template<typename F> void set_template(F &&f) { this->f_.set(std::forward<F>(f)); }
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
namespace esphome {
|
||||
namespace template_ {
|
||||
|
||||
class TemplateSensor : public sensor::Sensor, public PollingComponent {
|
||||
class TemplateSensor final : public sensor::Sensor, public PollingComponent {
|
||||
public:
|
||||
template<typename F> void set_template(F &&f) { this->f_.set(std::forward<F>(f)); }
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
namespace esphome {
|
||||
namespace template_ {
|
||||
|
||||
class TemplateSwitch : public switch_::Switch, public Component {
|
||||
class TemplateSwitch final : public switch_::Switch, public Component {
|
||||
public:
|
||||
TemplateSwitch();
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ template<uint8_t SZ> class TextSaver : public TemplateTextSaverBase {
|
||||
}
|
||||
};
|
||||
|
||||
class TemplateText : public text::Text, public PollingComponent {
|
||||
class TemplateText final : public text::Text, public PollingComponent {
|
||||
public:
|
||||
template<typename F> void set_template(F &&f) { this->f_.set(std::forward<F>(f)); }
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
namespace esphome {
|
||||
namespace template_ {
|
||||
|
||||
class TemplateTextSensor : public text_sensor::TextSensor, public PollingComponent {
|
||||
class TemplateTextSensor final : public text_sensor::TextSensor, public PollingComponent {
|
||||
public:
|
||||
template<typename F> void set_template(F &&f) { this->f_.set(std::forward<F>(f)); }
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ enum TemplateValveRestoreMode {
|
||||
VALVE_RESTORE_AND_CALL,
|
||||
};
|
||||
|
||||
class TemplateValve : public valve::Valve, public Component {
|
||||
class TemplateValve final : public valve::Valve, public Component {
|
||||
public:
|
||||
TemplateValve();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user