本帖最后由 kay7758 于 2018-2-2 22:22 编辑
#温度低于多少打开
- alias: auto_qnq_on
initial_state: true
hide_entity: false
trigger:
- platform: numeric_state
entity_id: sensor.temperature
below: 20
condition:
- condition: state
entity_id: switch.sonoff02
state: 'off'
action:
- service: switch.turn_on
entity_id: switch.sonoff02
#温度高于多少关闭
- alias: auto_qnq_off
initial_state: true
hide_entity: false
trigger:
- platform: numeric_state
entity_id: sensor.temperature
above: 25
condition:
- condition: state
entity_id: switch.sonoff02
state: 'on'
action:
- service: switch.turn_off
entity_id: switch.sonoff02
|