#Question about light automation

1 messages · Page 1 of 1 (latest)

grave dome
#

Hello, I have recently created a Home Assistant and I have no experience in this topic at all. Maybe someone can help me. I have an Aqara FP 2 sensor and a Shelly installed in the wall. When I am in my apartment, I want the light to turn on at 6 a.m. from Monday to Friday. How can I implement this? Best regards, Carsten.

final lichen
#

Then you spilt it into trigger, condition and action:
When do you (maybe) want it to happen? = trigger => At 6:00
What needs to be true for it to happen? = condition => You're home aka occupancy sensor is in detected state
What need to happen? = action => Turn on the light

Now just selecting that for an automation you have:

description: ""
mode: single
triggers:
  - trigger: time
    at: "06:00:00"
conditions:
  - condition: state
    entity_id: binary_sensor.you_sensor
    state: "on"
actions:
  - action: light.turn_on
    metadata: {}
    data: {}
    target:
      entity_id: light.you_light

Do note, this does only exactly what you asked! So there is nothing to turn off the light or what to do if you enter the house @ 6:05. For that, you will have to also describe what you want. And then make an automation for it (or update this one to include it).

grave dome
#

First of all, thank you very much for your quick reply! How would you have solved this? Do you have any suggestions for improvement, for example, what happens if I arrive home at 6:05?

final lichen
#

Like I said, start with just writing down what you want to happen in that case. Don´t start with "how do I write an automation", start with "what do I want to happen". The better you write down what you want to happen in all possible scenario's, the easier it is to make that into an automation (or multiple).

spring iris