mqtt:
switch:
- name: "dc1_fish_2"
state_topic: "dc1/dc1_fish/stat/power2"
command_topic: "dc1/dc1_fish/cmnd/power2"
payload_on: "on"
payload_off: "off"
availability_topic: "dc1/dc1_fish/tele/availability"
payload_available: "online"
payload_not_available: "offline"
- name: "dc1_fish_3"
state_topic: "dc1/dc1_fish/stat/power3"
command_topic: "dc1/dc1_fish/cmnd/power3"
payload_on: "on"
payload_off: "off"
availability_topic: "dc1/dc1_fish/tele/availability"
payload_available: "online"
payload_not_available: "offline"
- name: "dc1_fish_4"
state_topic: "dc1/dc1_fish/stat/power4"
command_topic: "dc1/dc1_fish/cmnd/power4"
payload_on: "on"
payload_off: "off"
availability_topic: "dc1/dc1_fish/tele/availability"
payload_available: "online"
payload_not_available: "offline"
sensor:
- name: "dc1_fish_power"
state_topic: "dc1/dc1_fish/tele/energy"
value_template: "{{value_json.power}}"
unit_of_measurement: "W"
- name: "dc1_fish_total"
state_topic: "dc1/dc1_fish/tele/energy"
value_template: "{{value_json.total}}"
unit_of_measurement: "kWh"
device_class: energy
state_class: measurement
#last_reset_topic: "dc1/dc1_fish/tele/energy"
#last_reset_value_template: "{{value_json.starttime}}"
homeassistant:
customize:
sensor.dc1_fish_power:
friendly_name: fish实时功率
sensor.dc1_fish_total:
friendly_name: fish总用电量
b帮忙看看 我还是没搞定啊
|