Fix dishwasher remote-control reminder OR logic and timestamp
This commit is contained in:
@@ -99,17 +99,31 @@
|
|||||||
condition:
|
condition:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ now().hour >= 19 and now().hour <= 21 }}"
|
value_template: "{{ now().hour >= 19 and now().hour <= 21 }}"
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ is_state('sensor.dishwasher_status_2', 'Off') }}"
|
||||||
|
- condition: or
|
||||||
|
conditions:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: binary_sensor.dishwasher_fjernbetjening
|
entity_id: binary_sensor.dishwasher_fjernbetjening
|
||||||
state: "off"
|
state: "off"
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ is_state('sensor.dishwasher_status_2', 'Off') }}"
|
value_template: "{{ not is_state('binary_sensor.dishwasher_dor', 'off') }}"
|
||||||
- condition: state
|
|
||||||
entity_id: binary_sensor.dishwasher_dor
|
|
||||||
state: "off"
|
|
||||||
|
|
||||||
action:
|
action:
|
||||||
|
- variables:
|
||||||
|
reminder_time: "{{ now().strftime('%d-%m %H:%M') }}"
|
||||||
|
remote_off: "{{ is_state('binary_sensor.dishwasher_fjernbetjening', 'off') }}"
|
||||||
|
door_not_closed: "{{ not is_state('binary_sensor.dishwasher_dor', 'off') }}"
|
||||||
|
issue_text: >
|
||||||
|
{% set issues = [] %}
|
||||||
|
{% if remote_off %}
|
||||||
|
{% set issues = issues + ['remote control er ikke slået til'] %}
|
||||||
|
{% endif %}
|
||||||
|
{% if door_not_closed %}
|
||||||
|
{% set issues = issues + ['døren er ikke lukket'] %}
|
||||||
|
{% endif %}
|
||||||
|
{{ issues | join(' og ') }}
|
||||||
- service: notify.mobile_app_claus_iphone_15pro
|
- service: notify.mobile_app_claus_iphone_15pro
|
||||||
data:
|
data:
|
||||||
title: "Slå fjernbetjening til på opvaskemaskinen"
|
title: "Slå fjernbetjening til på opvaskemaskinen"
|
||||||
message: "Opvaskemaskinen er planlagt til natkørsel, men remote control er ikke slået til endnu."
|
message: "[{{ reminder_time }}] Opvaskemaskinen er planlagt til natkørsel, men {{ issue_text }}."
|
||||||
Reference in New Issue
Block a user