As far as I understood, the state of the PIR should not be published when the device reboots.
But it does.
I am asking because I am using the motion_activated_light blueprint and this does not check if the state is on or off, it just turns the light on if the PIR sensor changes state - and it is a little bit annoying that the lights are turned on every time I change some code or install an update…
Best regards and thanks in advance,
Otto
Anyway, I would just drop that blueprint (which isn’t that thought through) and create my own automation, which checks if the light is off, before turning it on.
trigger:
- platform: state
entity_id:
- binary_sensor.bedroom_sensor_motion_sensor
to: "on"
condition:
- condition: state
entity_id: light.bedroom_light
state: "off"
action:
- service: light.turn_on
target:
entity_id: light.bedroom_light
data: {}
This way you also have more control over things and can set several parameters when turning on the light. If you have a light sensor you can use its level as another condition, so the light only turns on when it’s dark.
If you still have the problem and find it highly annoying, you could add a switch which would have to be on for the motion sensor to publish its state.