本帖最后由 hwhtj 于 2022-3-8 14:35 编辑
我有一个美的洗衣机、一个美的电热水器
目前洗衣机按照https://bbs.hassbian.com/thread-15224-1-1.html这个帖子的方法接入HA,
configuration.yaml内容如下:
# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
# Text to speech
tts:
- platform: google_translate
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
sensor: !include sensors.yaml
homeassistant:
packages: !include_dir_named packages
sonoff:
username: '+86186XXXXXXXX'
password: XXXXXXXX
reload: always
sensors.yaml文件内容如下:
- platform: template
sensors:
washer_cloud:
friendly_name: 在线
icon_template: 'mdi:cloud'
value_template: >
{{ states.binary_sensor.sonoff_ab70003c98.attributes.cloud | replace('"','') }}
washer_status:
friendly_name: 运行状态
icon_template: 'mdi:list-status'
value_template: >
{{ states.binary_sensor.sonoff_ab70003c98.attributes.running_status | replace('"','') }}
washer_program:
friendly_name: 洗衣程序
value_template: >
{{ states.binary_sensor.sonoff_ab70003c98.attributes.program | replace('"','') }}
washer_progress:
friendly_name: 洗衣进度
icon_template: 'mdi:progress-check'
value_template: >
{{ states.binary_sensor.sonoff_ab70003c98.attributes.progress | replace('"','') }}
washer_water_level:
friendly_name: 水位
value_template: >
{{ states.binary_sensor.sonoff_ab70003c98.attributes.water_level | replace('"','') }}
washer_temperature:
friendly_name: 水温
unit_of_measurement: "°C"
value_template: >
{{ states.binary_sensor.sonoff_ab70003c98.attributes.temperature | replace('"','') }}
请问:
我想按照同样的方法把美的电热水器也接入ha,应该如何修改configuration.yaml和sensors.yaml文件?
美的电热水器的相关信息如下图
|