Hi All,
I have a washing machine, connected through “Home connect”, the device contains an entity “sensor.washing_machine_operation_state” providing me with the operating state being either DelayedStart, Finished, Run, Ready.
I would like to use this state as a frontend formatting condition but i have a problem, the string (do i use the right term?) I use doesn’t update with the entity. So the first time I called the state it was DelayedStart, how it has changed on the entity but i still get DelayedStart from my string.
As you may notice, my thermology isn’t up there and it made looking for a solution very difficult.
this is what I’m trying to do, but as said, it doesn’t update. Could anyone help me out?
custom_fields:
i: |
[[[
if ((states['sensor.washing_machine_operation_state'].state) == 'DelayedStart') return '<ha-icon icon="mdi:clock-outline" style="width: 38%; height: 38%; color: green;">';
if ((states['sensor.washing_machine_operation_state'].state) == 'Finished') return '';
if ((states['sensor.washing_machine_operation_state'].state) == 'Run') return (states['sensor.washmachine_remaining_minutes'].state) + 'min';
if ((states['sensor.washing_machine_operation_state'].state) == 'Ready') return '';
else return "";
]]]
Thanks in advance
Edit: I Tried taking it out of the template and put it right in to the card but that didn’t work