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