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

 找回密码
 立即注册
查看: 5858|回复: 2

[求助] 多个实体显示功率

[复制链接]

74

主题

607

帖子

3511

积分

论坛元老

Rank: 8Rank: 8

积分
3511
金钱
2904
HASS币
0
发表于 2020-3-29 21:41:05 | 显示全部楼层 |阅读模式
  - platform: template
    sensors:
      load_power:
        friendly_name: "手机充电功耗"
        unit_of_measurement: 'W'
        value_template: "{{ state_attr('switch.plug_158d00010', 'load_power') }}"
那是单个实体,请教下多个实体如何写?

回复

使用道具 举报

73

主题

1167

帖子

6761

积分

论坛元老

Rank: 8Rank: 8

积分
6761
金钱
5589
HASS币
30
发表于 2020-3-30 07:04:32 | 显示全部楼层

  - platform: template
    sensors:
      load_power:
        friendly_name: "手机1充电功耗"
        unit_of_measurement: 'W'
        value_template: "{{ state_attr('switch.plug_158d00010', 'load_power') }}"
      load_powe1r:
        friendly_name: "手机2充电功耗"
        unit_of_measurement: 'W'
        value_template: "{{ state_attr('switch.plug_158d00010', 'load_power') }}"
回复

使用道具 举报

74

主题

607

帖子

3511

积分

论坛元老

Rank: 8Rank: 8

积分
3511
金钱
2904
HASS币
0
 楼主| 发表于 2020-3-30 19:05:31 | 显示全部楼层
xuyang 发表于 2020-3-30 07:04
- platform: template
    sensors:
      load_power:

感谢。。。。。
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2025-2-26 00:07 , Processed in 0.417637 second(s), 24 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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