🪄 Manual Light Control With Auto OFF

This is awesome! It would be great if this worked with ceiling fans as well.

Is your ceiling fan a switch?

Blacky :smiley:

It looks like the entity is of type “fan”.

On a separate note, I am testing your blueprint on a light. It works fine except when I disconnected the occupancy sensor from the network. When I manually turn the light on, it immediately shuts off. I will add that for testing I had set the timer to 1s.

@youghta

Okay, maybe I should update it so a switch can be anything (any domain other than a light).

Your best to use the bypass for manual control.

Blacky :smiley:

Can this be time based so from 5pm to 10 pm lights stay on for 10 min and 10:01 pm until next day 4:59 PM lights stay on for 5 min.

Since I only have a door binary sensor that is Open or closed I changed these settings to accommodate resting the helper timer when the door is re-opened. I have Kasa motion sensors and they dont allow for HA to see motion status.

420 - alias: Ceck if the timer is idle
conditions:
- condition: state
entity_id: !input timer_helper
state: Closed

449 - alias: Ceck if the timer is idle
conditions:
- condition: state
entity_id: !input timer_helper
state: Closed

Thanks. Im a bit confused by the response to the second item since the point of your blueprint is to allow for manual control with auto off. What I’m seeing is that when the proximity sensor is offline, the blueprint shuts the light off. I would hope that it would do the opposite and not shut the light off and only return to normal operation when the sensor is back online.

@kobejo34

Currently there is only one time delay. You may be asking that when you open and close the door you would like it ON for 10 min or 5 min depending on time. If this is the case then have a look at my sensor light blueprint and you can use night lights with a different time delay.

Blacky :smiley:

@youghta

The triggers must go from ON to OFF or OFF to ON.

Blacky :smiley:

@benkly

Just a quick note. If you don’t use the timer then delay will be used and in the top post it gives you examples on how it handles a HA restart.

Day/time is not to be confused with delay or timer. It is not the same. Day/time is exactly that… set day/time. Delay or timer is not exact day/time. This blueprint can be triggered at any point and when it turns OFF is not a exact day/time.

FYI: Below are 2 examples for day/time v timer. There are many ways to handle this in your automation code it just depends on what option you choose. No way is wright or wrong.

Day/time = If you have X running for 3 hours and 20 sec before it is about to turn OFF you restart HA. At that point you are using a day/time trigger to turn it OFF. HA takes 30 sec to restart and your time/day trigger has been missed. It will not turn X OFF.

Timer = If you have X running for 3 hours and 20 sec before it is about to turn OFF you restart HA. HA takes 30 sec to restart and your timer resumes after the 30 sec and start the 20 sec left on the timer and turns X OFF. Yes it ran for an extra 30 sec but it is OFF.

Again you can make anything work it just depends on your code and what you would like to do. You could make day/time work in the above scenario but you will need the code to handle that. This blueprint needs delay or timer as it is not a fixed day/time. It triggered from the time you turn the light or switch ON.

Hope this gives you a better understanding.

Blacky :smiley: