找回密码
 立即注册
查看: 2475|回复: 6

[经验分享] 一行显示多个实体

[复制链接]

80

主题

308

回帖

1680

积分

金牌会员

积分
1680
金钱
1292
HASS币
0
发表于 2022-7-14 19:10:35 | 显示全部楼层 |阅读模式
本帖最后由 ciasdmxhxjjpd@c 于 2022-7-14 21:20 编辑

RT,

项目地址:https://github.com/benct/lovelace-multiple-entity-row

效果:
捕获.PNG

lovelace代码:

type: entities
entities:
  - entity: switch.smartplug_switcher
    type: custom:multiple-entity-row
    name: sw
    state_header: switcher
    toggle: true
    state_color: true
    entities:
      - entity: sensor.hlw8012_power
        name: power
      - entity: sensor.monthly_hlw8012_energy
        name: energy
      - entity: light.light_blue
        name: light
        state_color: true
        icon: mdi:lightbulb-outline
        tap_action:
          action: toggle
  - type: section
  - entity: sensor.n1_temp
    type: custom:multiple-entity-row
    icon: mdi:router-network
    name: n1
    state_header: cpu
    state_color: true
    entities:
      - entity: sensor.n1_memory_free
        name: memory
      - entity: sensor.disk_use_percent_config
        name: disk
      - entity: sensor.yearly_br_lan_gb
        name: traffic
  - type: section
  - entity: sensor.pon_temp
    type: custom:multiple-entity-row
    name: ont
    icon: mdi:router-wireless
    state_header: temp
    state_color: true
    entities:
      - entity: sensor.wan_ip
        name: myip
      - entity: sensor.optical_rx_power
        name: RX
  - type: section
  - entity: sensor.lightsail_delay
    type: custom:multiple-entity-row
    name: aws
    state_header: delay
    icon: mdi:aws
    state_color: true
    entities:
      - entity: sensor.vps_ip
        name: ip
      - entity: sensor.lightsail_network_traffic
        name: traffic


评分

参与人数 2金钱 +20 收起 理由
sirakawa + 10 感谢楼主分享!
jjcs + 10 论坛有你更精彩!

查看全部评分

回复

使用道具 举报

6

主题

351

回帖

1363

积分

金牌会员

积分
1363
金钱
1006
HASS币
0
发表于 2022-7-14 20:36:40 | 显示全部楼层
沙发!!!!
回复

使用道具 举报

42

主题

492

回帖

3122

积分

论坛元老

积分
3122
金钱
2588
HASS币
10
发表于 2022-7-15 12:57:14 | 显示全部楼层
这个好,感谢分享
回复

使用道具 举报

zmg 手机认证

5

主题

157

回帖

4309

积分

论坛元老

积分
4309
金钱
4142
HASS币
30
发表于 2022-7-15 14:16:16 | 显示全部楼层
这个实用
回复

使用道具 举报

33

主题

2165

回帖

5883

积分

论坛元老

积分
5883
金钱
3685
HASS币
60
QQ
发表于 2022-7-15 23:16:52 | 显示全部楼层
谢谢分享。
我不生产技术,我只是技术的搬运工。
回复

使用道具 举报

0

主题

19

回帖

356

积分

中级会员

积分
356
金钱
337
HASS币
0
发表于 2022-7-18 10:19:30 | 显示全部楼层
阔以噢,有点意思~
回复

使用道具 举报

0

主题

229

回帖

2000

积分

金牌会员

积分
2000
金钱
1771
HASS币
0
QQ
发表于 2022-7-21 09:23:27 | 显示全部楼层
多谢分享
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian ( 晋ICP备17001384号-1 )

GMT+8, 2025-5-17 12:55 , Processed in 0.088397 second(s), 27 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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