#370 More fine tuning to make sure it doesn't continuously restart the Juicebox.
This commit is contained in:
parent
ab65d38ac0
commit
53eba23cd7
|
@ -6,7 +6,6 @@
|
||||||
homeassistant:
|
homeassistant:
|
||||||
customize_glob:
|
customize_glob:
|
||||||
"*.carlojuice*":
|
"*.carlojuice*":
|
||||||
|
|
||||||
homebridge_hidden: True
|
homebridge_hidden: True
|
||||||
hidden: False
|
hidden: False
|
||||||
#-------------------------------------------
|
#-------------------------------------------
|
||||||
|
@ -55,6 +54,17 @@ automation:
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: sensor.carlojuice_charging_status
|
entity_id: sensor.carlojuice_charging_status
|
||||||
to: 'disconnect'
|
to: 'disconnect'
|
||||||
|
for:
|
||||||
|
minutes: 5
|
||||||
|
|
||||||
|
condition:
|
||||||
|
- condition: template
|
||||||
|
value_template: >
|
||||||
|
{%- if states.automation.juicebox_selfheal.attributes.last_triggered -%}
|
||||||
|
{{ (as_timestamp(now()) - as_timestamp(states.automation.juicebox_selfheal.attributes.last_triggered)) > 40000 }}
|
||||||
|
{%- else -%}
|
||||||
|
true
|
||||||
|
{%- endif -%}
|
||||||
|
|
||||||
action:
|
action:
|
||||||
- service: homeassistant.turn_on
|
- service: homeassistant.turn_on
|
||||||
|
|
Loading…
Reference in New Issue