|
发表于 2021-1-5 16:59:12
|
显示全部楼层
本帖最后由 hzx1987227 于 2021-1-5 17:00 编辑
sensor:
- platform: xiaomi_miot_raw
name: letsleep
host: 192.168*
token: *
default_properties_getter: 'get_properties'
sensor_property: 'power'
default_properties:
- did: power
siid: 2
piid: 1
- did: mode
siid: 2
piid: 3
- did: curr_temp
siid: 2
piid: 6
- did: target_temp
siid: 2
piid: 5
sensor_property: power
scan_interval: 10
- platform: template
sensors:
letsleep_target_temp:
friendly_name: '当前水温'
unit_of_measurement: '°C'
device_class: temperature
value_template: '{{ states.sensor.letsleep.attributes["curr_temp"] | int }}'
letsleep_curr_temp:
friendly_name: '目标水温'
unit_of_measurement: '°C'
device_class: temperature
value_template: '{{ states.sensor.letsleep.attributes["target_temp"] | int }}'
switch:
- platform: xiaomi_miot_raw
name: 水暖
host: 192.168.*
token: *****
turn_on_command: 'set_properties'
turn_on_parameters: '{"siid":2,"piid":1,"value":true}'
turn_off_command: 'set_properties'
turn_off_parameters: '{"siid":2,"piid":1,"value":false}'
state_property:
siid: 2
piid: 1
state_property_getter: 'get_properties'
state_on_value: True
state_off_value: False
- platform: xiaomi_miot_raw
name: 水暖烘被模式
host: 192.168*
token: **
turn_on_command: 'set_properties'
turn_on_parameters: '{"siid":2,"piid":3,"value":2}'
turn_off_command: 'set_properties'
turn_off_parameters: '{"siid":2,"piid":3,"value":0}'
state_property:
siid: 2
piid: 3
state_property_getter: 'get_properties'
state_on_value: 2
state_off_value: 0
关闭烘被模式就会切换到自定义模式,你只需要在米家app设置好自定义的温度就能用了(至少我够用了)
调温我没接入,因为没需求,你可以自己拓展一下。
|
|