I try to show on a floor plan the movement - change image depending from motion sensor:
- enitity: sensor.motion_steps
image: 'http://dshgmbh.ru/uploads/walking-man_black 200x300.png'
state_filter:
'off': brightness(80%) saturate(0.2)
'on': brightness(130%) saturate(1.5)
state_image:
'off': 'http://dshgmbh.ru/uploads/Walking_man_green 200x300.png'
'on': 'http://dshgmbh.ru/uploads/Walking_man_yellow 200x300.png'
style:
left: 55%
padding: 10px
top: 54%
width: 7%
type: image
This sensor works in another widget:
entities:
- entity: binary_sensor.motion_sensor_158d0002b43093
- entity: sensor.motion_steps
- entity: binary_sensor.door_window_sensor_158d0002b825ef
icon: 'mdi:door'
- entity: sensor.kitchen_wall_button
title: Датчики Xiaomi
type: entities
but on the floor plan doesn’t works,
here is my configuration.yaml with that sensor:
motion_steps:
friendly_name: "Движение на лестнице"
value_template: >
{% if is_state('binary_sensor.motion_sensor_158d0002b43093', 'on') %}
on
{% elif %}
off
{% endif %}
It’s seems that ‘on’ state are good but ‘off’ state doesn’t recognize or wrong (undefined). Anywhere picture won’t to change.