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

 找回密码
 立即注册
查看: 227|回复: 1

[UI界面] picture-elements做户型图,不同entity,图片无法显示

[复制链接]

3

主题

17

帖子

117

积分

注册会员

Rank: 2

积分
117
金钱
100
HASS币
0
发表于 2025-1-14 23:52:22 | 显示全部楼层 |阅读模式
各位大佬:
    我在使用picture-elements做户型图的时候,发现在使用部分entity的时候(如group、单独的light) 对应的图片就没法显示,而如果全部使用yeelink的entity就都没有问题,请问这个是什么原因呢?
无法显示:

                               
登录/注册后可看大图


代码如下:

type: picture-elements
image: /local/home/1楼-灯暗.png
elements:
  - type: image
    entity: light.yeelink_cn_77698248_ceiling1_s_2
    tap_action:
      action: none
    style:
      pointer-events: none
      top: 50%
      left: 50%
      width: 100%
      mix_blend_mode: lighten
    state_image:
      "off": /local/home/透明.png
      "on": /local/home/1楼-优优灯亮.png
  - type: image
    entity: light.yeelink_cn_77698248_ceiling1_s_2
    tap_action:
      action: toggle
    state_image:
      "off": /local/home/1楼-优优灯开关.png
      "on": /local/home/1楼-优优灯开关.png
    style:
      top: 33%
      left: 34%
      width: 15%
      opacity: 0
  - type: image
    entity: light.yeelink_cn_434434838_ceil26_s_2
    tap_action:
      action: none
    style:
      pointer-events: none
      top: 50%
      left: 50%
      width: 100%
      mix_blend_mode: lighten
    state_image:
      "off": /local/home/透明.png
      "on": /local/home/1楼-淼淼卧室灯亮.png
  - type: image
    entity: light.yeelink_cn_434434838_ceil26_s_2
    tap_action:
      action: toggle
    state_image:
      "off": /local/home/1楼-淼淼卧室开关.png
      "on": /local/home/1楼-淼淼卧室开关.png
    style:
      top: 67%
      left: 26%
      width: 20%
      opacity: 0
  - type: image
    entity: light.mijia_cn_group_1739107792541065216_group3_s_2
    tap_action:
      action: none
    style:
      pointer-events: none
      top: 50%
      left: 50%
      width: 100%
      mix_blend_mode: lighten
    state_image:
      "off": /local/home/透明.png
      "on": /local/home/1楼-楼梯灯亮.png
  - type: image
    entity: light.mijia_cn_group_1739107792541065216_group3_s_2
    tap_action:
      action: toggle
    state_image:
      "off": /local/home/1楼-楼梯开关.png
      "on": /local/home/1楼-楼梯开关.png
    style:
      top: 73%
      left: 42%
      width: 8%
      opacity: 0
  - type: image
    entity: light.lemesh_cn_1086483262_wy0c08_s_2
    tap_action:
      action: none
    style:
      pointer-events: none
      top: 50%
      left: 50%
      width: 100%
      mix_blend_mode: lighten
    state_image:
      "off": /local/home/透明.png
      "on": /local/home/1楼-过道灯亮.png
  - type: image
    entity: light.lemesh_cn_1086483262_wy0c08_s_2
    tap_action:
      action: toggle
    state_image:
      "off": /local/home/1楼-过道开关.png
      "on": /local/home/1楼-过道开关.png
    style:
      top: 57%
      left: 42%
      width: 8%
      opacity: 0
  - type: image
    entity: light.lemesh_cn_1086482689_wy0c08_s_2
    tap_action:
      action: none
    style:
      pointer-events: none
      top: 50%
      left: 50%
      width: 100%
      mix_blend_mode: lighten
    state_image:
      "off": /local/home/透明.png
      "on": /local/home/1楼-洗漱台灯亮.png
  - type: image
    entity: light.lemesh_cn_1086482689_wy0c08_s_2
    tap_action:
      action: toggle
    state_image:
      "off": /local/home/1楼-洗漱台开关.png
      "on": /local/home/1楼-洗漱台开关.png
    style:
      top: 67%
      left: 52%
      width: 9%
      opacity: 0
  - type: image
    entity: light.yeelink_cn_132015988_ceiling1_s_2
    tap_action:
      action: none
    style:
      pointer-events: none
      top: 50%
      left: 50%
      width: 100%
      mix_blend_mode: lighten
    state_image:
      "off": /local/home/透明.png
      "on": /local/home/1楼-卫生间灯亮.png
  - type: image
    entity: light.yeelink_cn_132015988_ceiling1_s_2
    tap_action:
      action: toggle
    state_image:
      "off": /local/home/1楼-卫生间开关.png
      "on": /local/home/1楼-卫生间开关.png
    style:
      top: 74%
      left: 61%
      width: 6%
      opacity: 0
  - type: image
    entity: light.mijia_cn_group_1718087611656065029_group3_s_2
    tap_action:
      action: none
    style:
      pointer-events: none
      top: 50%
      left: 50%
      width: 100%
      mix_blend_mode: lighten
    state_image:
      "off": /local/home/透明.png
      "on": /local/home/1楼-厨房灯亮.png
  - type: image
    entity: light.mijia_cn_group_1718087611656065029_group3_s_2
    tap_action:
      action: toggle
    state_image:
      "off": /local/home/1楼-厨房开关.png
      "on": /local/home/1楼-厨房开关.png
    style:
      top: 77%
      left: 68%
      width: 11%
      opacity: 0
  - type: image
    entity: light.mijia_cn_group_1718178013381812224_group3_s_2
    tap_action:
      action: none
    style:
      pointer-events: none
      top: 50%
      left: 50%
      width: 100%
      mix_blend_mode: lighten
    state_image:
      "off": /local/home/透明.png
      "on": /local/home/1楼-玄关灯亮.png
  - type: image
    entity: light.mijia_cn_group_1718178013381812224_group3_s_2
    tap_action:
      action: toggle
    state_image:
      "off": /local/home/1楼-玄关开关.png
      "on": /local/home/1楼-玄关开关.png
    style:
      top: 52%
      left: 75%
      width: 17%
      opacity: 0
  - type: image
    entity: switch.lemesh_cn_1085659178_sw0a02_on_p_2_1
    tap_action:
      action: none
    style:
      pointer-events: none
      top: 50%
      left: 50%
      width: 100%
      mix_blend_mode: lighten
    state_image:
      "off": /local/home/透明.png
      "on": /local/home/1楼-餐厅灯亮.png
  - type: image
    entity: switch.lemesh_cn_1085659178_sw0a02_on_p_2_1
    tap_action:
      action: toggle
    state_image:
      "off": /local/home/1楼-餐厅开关.png
      "on": /local/home/1楼-餐厅开关.png
    style:
      top: 20%
      left: 63%
      width: 15%
      opacity: 0
  - type: image
    entity: light.mijia_cn_group_1817566646303870976_group3_s_2
    tap_action:
      action: none
    style:
      pointer-events: none
      top: 50%
      left: 50%
      width: 100%
      mix_blend_mode: lighten
    state_image:
      "off": /local/home/透明.png
      "on": /local/home/1楼-客厅灯亮.png
  - type: image
    entity: light.mijia_cn_group_1817566646303870976_group3_s_2
    tap_action:
      action: toggle
    state_image:
      "off": /local/home/1楼-客厅开关.png
      "on": /local/home/1楼-客厅开关.png
    style:
      top: 44%
      left: 56%
      width: 33%
      opacity: 0
grid_options:
  columns: 18
  rows: 7


回复

使用道具 举报

1

主题

12

帖子

133

积分

注册会员

Rank: 2

积分
133
金钱
121
HASS币
0
发表于 2025-1-20 21:20:18 | 显示全部楼层
我也有這個問題,推一個希望大神幫忙解答下
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2025-2-2 15:02 , Processed in 0.048252 second(s), 23 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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