Hi everybody and thanks for your attention.
I got an issue I cannot find a solution
When my dishwasher has a consumption lower than 2W it means it has finished the cycle and send me a notification. Here below sensors and automations files
sensors.yaml
sensors:
lavastoviglie_current_power:
friendly_name: 'Lavastoviglie'
value_template: '{{ states.switch.lavastoviglie.attributes.current_power_w }}'
unit_of_measurement: 'W'
automations.yaml
alias: 'Lavastoviglie standby'
trigger:
- entity_id: sensor.lavastoviglie_current_power
platform: numeric_state
below: 2
condition:
condition: and
conditions:
- condition: state
entity_id: 'switch.lavastoviglie'
state: 'on'
action:
- service: notify.notify
data:
message: ciclo finito
title: Lavastoviglie
As above IT WORKS
But now I also want to show the word STANDBY when the washing cycle is finished instead of just an empty circle.
In order to do that I’ve modified the sensors file as below
sensors.yaml
sensors:
lavastoviglie_current_power:
friendly_name: 'Lavastoviglie'
value_template: >-
{% if states.switch.lavastoviglie.attributes.current_power_w | float < 2 %}
STANDBY
{% else %}
{{ states.switch.lavastoviglie.attributes.current_power_w }}
{% endif %}
unit_of_measurement: 'W'
PROBLEM:
The value or the word STANDBY is showed correctly, but I do not receive any notification as before.
I’m sure I’m doing something wrong.
Thank you