本帖最后由 fung1006 于 2020-7-30 12:50 编辑
floorplan的最基本配置:
floorplan 底图 (关灯状态)
在上面堆叠各房间或灯光点亮时照亮范围 (off 时显示透明图)
最后在上面铺设按钮图示(以state_filter 控制按钮开关颜色)
堆叠图示要按顺序,图示要放底图之上
elements:
- entity: light.xxx
state_image:
'off': /local/floorplan/img/transparent.png
'on': /local/floorplan/img/living_room.png
style:
left: 50%
top: 50%
width: 100%
type: image
- entity: light.xxx
state_filter:
'off': opacity(40%) saturate(0%)
'on': opacity(100%)
state_image:
'off': /local/floorplan/img/ico_bulb.png
'on': /local/floorplan/img/ico_bulb.png
style:
left: 75%
top: 13%
width: 7%
tap_action:
action: toggle
type: image
image: local/floorplan/img/floorplan.png
type: picture-elements
|