I’ve set up the following automation and it works great, once.
- id: '1530737791865'
alias: Murp's floor
trigger:
platform: state
entity_id: binary_sensor.motion_sensor
to: 'on'
condition: and
conditions:
- condition: time
after: '22:00:00'
before: '07:00:00'
- condition: state
entity_id: light.murps_lamp_1
state: 'off'
action:
service: homeassistant.turn_on
entity_id: light.f0fe6b1b0888
I have a ceiling light and a LED floor light. When the sensor detects movement and its between 10pm and 7AM, the ceiling lights are off, the LED on the floor will turn on.
When I turn of the LED light via homekit, the automation won’t seem to activate the rules again.
Does anyone have an idea why this is and how to solve this?
So, i’m not sure if this is because of pasting or what, but your spacing is wonky. When creating yaml, only use spaces or only use tabs. The majority of people only use spaces as tabs can be missleading depending on the placement of the tab. I use 2 spaces for each indent layer.
So this automation will only fire if your light is off and the time is between 10pm and 7am.
You don’t need to call out ‘and’ with a list of conditions. Conditions by default will assume that listed conditions are anded together. Triggers are opposite, they assume the triggers are or’d together.
Make sure your spacing is always correct.
If this automation is not triggering a second time, look towards your motion sensor and verify that there is an event being created that would trigger the change.