Reset heater timer when relay turns off
This commit is contained in:
+11
-10
@@ -8,13 +8,14 @@ esphome:
|
||||
packages:
|
||||
device_base: !include templates/mystrom.yaml
|
||||
|
||||
sensor:
|
||||
- platform: duty_time
|
||||
id: row_heating_time
|
||||
name: Row heating time
|
||||
lambda: "return id(mystrom_relay).state;"
|
||||
on_value_range:
|
||||
above: 18000 # 5h
|
||||
then:
|
||||
- switch.turn_off: mystrom_relay
|
||||
- sensor.duty_time.reset: row_heating_time
|
||||
|
||||
interval:
|
||||
- interval: 1min
|
||||
then:
|
||||
- if:
|
||||
condition:
|
||||
sensor.in_range:
|
||||
id: continuous_on_time
|
||||
above: 18000 # 5h
|
||||
then:
|
||||
- switch.turn_off: mystrom_relay
|
||||
|
||||
@@ -118,6 +118,11 @@ sensor:
|
||||
then:
|
||||
- switch.turn_off: mystrom_relay
|
||||
|
||||
- platform: duty_time
|
||||
id: continuous_on_time
|
||||
name: Continuous on time
|
||||
lambda: "return id(mystrom_relay).state;"
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
name: None # Main entity for the device.
|
||||
@@ -125,3 +130,5 @@ switch:
|
||||
id: mystrom_relay
|
||||
restore_mode: RESTORE_DEFAULT_ON
|
||||
device_class: outlet
|
||||
on_turn_off:
|
||||
- sensor.duty_time.reset: continuous_on_time
|
||||
|
||||
Reference in New Issue
Block a user