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

Advice needed for global variable to affect an automation

$
0
0

New to hass (1 week) got all devices connected, reporting etc. Templates and interface. Time to automate. I want to switch on lights (fibaro zwave) based on motion (evl3 and DSC) which should be fairly easy. Issue is switching light off (at switch) and pir not putting it back on. I think i need 1 automation/script to create some sort of global boolean variable that is set to false when light state changes to off, then a 5sec or so timer that changes it back to true. The pir script/automation then needs to check state of that variable when triggered and if it is false then switch on otherwise do nothing. If this is answered elsewhere then sorry and a link would be lovely. Just want 5 seconds to leave room after switching light off without pir overriding human. Any tips about how this is best done would be appreciated.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 106083

Trending Articles



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