- id: '1579331301647'
alias: xxx
trigger:
- below: '60'
entity_id: weather.jia
platform: numeric_state
value_template: '{{ state_attr(''weather.jia'', ''humidity'') }}'
- above: '65'
entity_id: weather.jia
platform: numeric_state
value_template: '{{ state_attr(''weather.jia'', ''humidity'') }}'
condition: []
action:
- service_template: "light.turn_{% if state_attr('weather.jia', 'humidity') < 60 %}on{% if state_attr('weather.jia', 'humidity') > 65 %}off{% else %}off{% endif %}"
entity_id: switch.room_miio
|