type: picture-elements
image: local/myhouse/myhome_dark.png
elements:
- type: image
entity: switch.tasmota_2
tap_action:
action: none
state_image:
'on': /local/myhouse/myhome_餐厅_on.png
'off': /local/myhouse/myhome_transparent.png
unavailable: /local/myhouse/myhome_transparent.png
style:
top: 50%
left: 50%
width: 100%
hold_action:
action: none
- type: image
entity: switch.tasmota_2
tap_action:
action: toggle
state_image:
'on': /local/myhouse/myhome_transparent.png
'off': /local/myhouse/myhome_transparent.png
style:
top: 65%
left: 45%
width: 24.5%
opacity: 0%
hold_action:
action: none
- type: image
entity: switch.tasmota_3
tap_action:
action: none
state_image:
'on': /local/myhouse/myhome_厨房_on.png
'off': /local/myhouse/myhome_transparent.png
unavailable: /local/myhouse/myhome_transparent.png
style:
top: 50%
left: 50%
width: 100%
hold_action:
action: none
- type: image
entity: switch.tasmota_3
tap_action:
action: toggle
state_image:
'on': /local/myhouse/myhome_transparent.png
'off': /local/myhouse/myhome_transparent.png
style:
top: 63.5%
left: 83%
width: 17%
opacity: 0%
hold_action:
action: none
这个是我的yaml,我遇到的问题是一个实体的时候没问题,写上第二个的时候就把第一个覆盖了。在tasmota里面开关,可以看到变化,但是无法在卡片里控制。求教一下,我应该改哪里??实在是不会了。
|