Hi all,
using the door sensor I would need to know, that the door was opened during the day even for few seconds.
The idea is, that if someone opens the door during the day, it will be shown on the dashboard as the RED TEXT " Door was opened". This information has to stay there until I personally check it.
Then, if possible, if I can click on the icon and reset the status, so the door sensor will be shown in GREEN TEXT door are closed.
I am using these if states for other conditions, but I just need that the information ,that the door was opened will stay there and not return to it´s closed state as someone closes the door.
Entity status
{% if is_state('binary_sensor.senzor_okno_maly_pokoj_iaszone', 'on') %} Door open {% else %} Door closed {% endif %}
Icon color
{% if is_state('binary_sensor.senzor_okno_maly_pokoj_iaszone', 'on') %} red {% else %} green {% endif %}
To set it back to off, you have to send an event named reset_door_monitor using the following service call (in a script or button or whatever way you want to reset it).
- event: reset_door_monitor
Note
Initially, this entity’s state will be unknown. Just open the door and it will report a proper state.
Hello Taras,
thanks very much for your fast reply.
Unfortunately there is something wrong on my side and it´s not working properly (even if I open the door).
Please see the screenshots from template and config yaml.
Where have you put the example? If you have put it into a file called templates.yaml then you should remove the first line from the example, the one containing the key word template:
Well it´s working fine now, shows me, that the door was open and the info stays there.
But I am unable to reset the event.
It´s not showimg me the option the the developer tools (service calls):
PLEASE use code tags to post your code. Screenshots greatly reduce the number of people willing to look at your problem.
Since I can’t read from your images, I’ll simply tell you how I did this for an outside door that should hardly ever be used. If the door is opened I set a helper entity, and the dashboard shows the state of that entity- not the door.