I have a xiaomi door sensor. What I want to do is to visualize the door open and close by changing the pictures in picture-elements of Lovelace UI. Here’s the code but it’s not working as expected. Can anybody help?
- entity: binary_sensor.door_window_sensor_xxxxxxxxxxx
state-image:
'off': /local/maindoor_close.png
'on': /local/maindoor_open.png
style:
left: 7.5%
top: 45%
tap_action:
action: none
type: image