Writing an automation to execute only once?

I would like to send a message to an Echo when my child turns on the computer…something like “good morning, did you brush your teeth”. I can detect when the computer turns on or comes out of sleep by seeing if it’s connected to the wifi network…so triggering isn’t a problem…but I’d like to deliver that message only once, not every time he turns on the computer during the day.

Is there an easy way to do this?

You could use a Time condition if he typically only turns it on before a certain time.

Alternately you’d have to create an input boolean. This would need to be reset to zero every night (in a separate automation triggered by time of day), added as a condition to the automation to announce only if it was zero, and as part of the automation itself have it set to 1 when it runs.

Do you have an existing Template Binary Sensor, or something similar, that indicates when the computer is on?

I’d do it very simply:

  1. Have the automation turn itself off
  2. Have another automation turn it on at, say, midnight
1 Like

Thanks…found service automation .turn_off. Exactly what I want to do.

Also, you could define an array of things to say, use a random number to mix it up a bit just to keep it interesting