refactor device value rendering (to Web, Console or MQTT) to base class #632

This commit is contained in:
proddy
2020-12-13 22:52:34 +01:00
parent f72e549850
commit ffa313ebe4
60 changed files with 2579 additions and 3367 deletions

View File

@@ -37,6 +37,8 @@ class Shower {
void start();
void loop();
void send_mqtt_stat(bool state);
bool shower_alert() const {
return shower_alert_;
}
@@ -65,11 +67,10 @@ class Shower {
void publish_values();
void shower_alert_start();
void shower_alert_stop();
void send_mqtt_stat(bool state);
bool shower_timer_; // true if we want to report back on shower times
bool shower_alert_; // true if we want the alert of cold water
bool ha_config_ = false; // for HA MQTT Discovery
bool shower_timer_; // true if we want to report back on shower times
bool shower_alert_; // true if we want the alert of cold water
bool ha_configdone_ = false; // for HA MQTT Discovery
bool shower_on_;
uint32_t timer_start_; // ms
uint32_t timer_pause_; // ms