Automation, script or scene

Hello - I am getting prepared to create my first “automation” that will perform the follow sequence of actions:

  1. Trigger from button
  2. Turn off a number of different lights and switches
  3. Turn on different switches or exclude if status is already on
  4. Lower volume on Sonos speakers
  5. Turn off TV and AV equipment
    6 start timer for x minutes
  6. After timer expires turn off switches from #3 above.

This is going to be my bedtime action so the system will turn off most of the devices in our home while delaying others to allow for time to head to bed.

I am looking for best practices to cleanly create this and similar automations. Any guidance or examples would be greatly appreciated.

If u need a trigger → then you need to make an automation.
The rest of the points are automation actions.

That’s it. Scene will not be enough, as you want time delays. You can just delay within the automation or create Timer helpers and split the automation into multiple ones to handle the timers. Your choice.

If you happen to do same stuff within multiple automations → that’s where scripts help (u can reuse a script from multiple automations).

Start simple, with one automation, experiment, u’ll see for yourself what suits you best.

Thank you @DvdNwk for the advice and quick reply. Still learning here….

I’m going to slightly disagree with @DvdNwk

Whether you should start with an automation or a script depends on what you mean by “Trigger from button”. If you mean a dashboard button, a script would be more appropriate since you can call it directly in the dashboard card action. If you mean a physical button device, then stick with the automation.

1 Like

Ah, yeah, no disagreement → just different interpretation of the requirements, sure :smiley:

Thank you @Didgeridrew and appreciate your guidance. You are correct, I am looking to start the actions using a button on the dashboard. I am migrating from HomeSeer and the button in that system would trigger the actions.