ad-automoli icon indicating copy to clipboard operation
ad-automoli copied to clipboard

Option to set times when automoli does not control the light

Open Ramblurr opened this issue 2 years ago • 3 comments

🙄 Is your feature request related to a problem? Please describe.

Bedtime for our child is a complicated and delicate time. During this half-hour/hour window we want to keep manual control of the lights regardless of the motion sensor or other automoli settings.

😍 Describe the solution you'd like

I'd like the option to specify a daytime in the automoli config that prevents automoli from changing the lights during that period.

🖼️ Example/See here!

  daytimes:
    - { name: normal, starttime: "06:00", light: scene.child_room_bright }
    - { name: bedtime, starttime: "19:00", ignore: True } # proposed syntax, could also be `light: ignore`
    - { name: nightlight, starttime: "22:00", light: scene.child_room_nightlight, delay: 30 }

In this example from 06:00 until 19:00 automoli controls the light via the motion sensor as normal. From 19:00 until 22:00 automoli will do nothing. From 22:00 - 06:00 automoli will continue as usual.

Ramblurr avatar Jun 11 '22 18:06 Ramblurr

Actually, reviewing the docs some more, I think I can achieve this using the disable_switch_entities option, an input boolean, and an automation in HA that toggles the boolean depending on the time

Ramblurr avatar Jun 11 '22 18:06 Ramblurr

You can also acheive the same without using a disable_switch_entities simply by setting light to 0 during that time period.

From the docs:

      # This rule has the lights set to 0, so they will no turn on during this time period
    - { starttime: "23:30", name: more_night, light: 0 }

dimatx avatar Jun 20 '22 15:06 dimatx

Using the light 0 option, would cause detected movement to turn off the lights right? Or would it just do nothing?

Ramblurr avatar Jun 20 '22 15:06 Ramblurr

Using the light 0 option would turn off a manually turned on light after the delay. The disable_switch_entities option should be the way to go.

evildad avatar Apr 24 '23 13:04 evildad

Used disable_switch_entities thanks.

Ramblurr avatar May 05 '23 13:05 Ramblurr