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

Goodnight routine - script or automation?

$
0
0

@Juggler wrote:

I am in the process of writing a “goodnight” routine. My question is: should this be a script or routine?

The pseudo-code for my routine is the following:

if alarm.zone1 open {
  send notification
  cancel routine
}

if either garage door open {
  close garage doors
  wait 20s
  if either garage door still open {
    send notification
    cancel routine
  }
}

# rest is simple, turning off lights, setting thermostat etc...

Based on the above, I have broken the 2 sub-routines down and am coding them individually as scripts. Should they both be called from an automation that is triggered?

cheers,
J.

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95541

Trending Articles



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