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

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

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

[复制链接]

69

主题

582

帖子

3224

积分

论坛元老

Rank: 8Rank: 8

积分
3224
金钱
2642
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') }}"
那是单个实体,请教下多个实体如何写?

回复

使用道具 举报

71

主题

1146

帖子

6321

积分

论坛元老

Rank: 8Rank: 8

积分
6321
金钱
5170
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') }}"
回复

使用道具 举报

69

主题

582

帖子

3224

积分

论坛元老

Rank: 8Rank: 8

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

感谢。。。。。
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-4-26 11:04 , Processed in 0.095653 second(s), 24 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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