『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
查看: 349|回复: 0

[UI界面] 关于picture-elements的一个求助。。。。。。。。。。。。。。

[复制链接]

9

主题

118

帖子

541

积分

高级会员

Rank: 4

积分
541
金钱
423
HASS币
0
发表于 2024-8-14 21:14:38 | 显示全部楼层 |阅读模式
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里面开关,可以看到变化,但是无法在卡片里控制。求教一下,我应该改哪里??实在是不会了。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-24 07:48 , Processed in 0.316221 second(s), 23 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表