Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 96121

Switch off/on heating when window is open/closed

$
0
0

@Lorant wrote:

Hi

I’ve a sensor who detect if the window is opened, and in that case will ask a Shelly relay to switch off heating, then switch on when window is closed.

I’ve done two automations, I’m interested to know if that can be achieved with only one ?

Automations

  trigger:
  - entity_id: binary_sensor.door_window_sensor_1
    for: '10'
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - device_id: 257e0468e7004d109ae999e65d60b
    domain: switch
    entity_id: switch.shellyPM
    type: turn_off

And

  - entity_id: binary_sensor.door_window_sensor_1
    for: '10'
    from: 'on'
    platform: state
    to: 'off'
  condition: []
  action:
  - device_id: 257e0468e7004d109ae999e65d60b
    domain: switch
    entity_id: switch.shellyPM
    type: turn_on

Thanks

Posts: 9

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 96121

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>