Edimax
此 edimax
开关 integration集成将 Home Assistant 与您的设备、服务等连接和集成。 [Learn more] 允许您控制您的 Edimax
要在您的安装中使用 Edimax 开关,请将以下内容添加到您的 configuration.yaml
configuration.yaml 文件是 Home Assistant 的主要配置文件。它列出了要加载的集成及其特定配置。在某些情况下,需要直接在 configuration.yaml 文件中手动编辑配置。大多数集成可以在 UI 中配置。 [Learn more] 文件中。
在更改了configuration.yaml
configuration.yaml 文件是 Home Assistant 的主要配置文件。它列出了要加载的集成及其特定配置。在某些情况下,需要直接在 configuration.yaml 文件中手动编辑配置。大多数集成可以在 UI 中配置。 [Learn more] 文件后,重启 Home Assistant 以应用更改。 该集成现在显示在集成页面的 设置 > 设备与服务 下。其实体在集成卡片上以及实体标签上列出。
# 示例 configuration.yaml 条目
switch:
- platform: edimax
host: 192.168.1.32
功耗传感器
从 固件版本 2
template:
- sensor:
- name: Edimax 当前功耗
unit_of_measurement: "W"
state: "{{ state_attr('switch.edimax_smart_plug', 'current_power_w') | default(0, true) }}"
- name: Edimax 累计每日功耗
unit_of_measurement: "kWh"
state: "{{ state_attr('switch.edimax_smart_plug', 'today_energy_kwh') | default(0, true) }}"
请注意,如果智能插头关闭,这些状态将报告字符串 None
。通过在模板中使用 replace()
,这些传感器将报告纯数字值。