Oh, but I did have this functionality when I was using Mozilla IoT. These were actually the last 3 items I just moved from it, just yesterday. It worked perfectly there.
Notwithstanding the lighting technology’s capabilities, if the integration doesn’t support it, then that’s that.
So this would be the Zigbee integration for Home Assistant, or the Eaton Halo integration specifically? Sorry, I am still kind of new with Home Assistant. Still much to learn.
Thanks for all the replies too, so far.
No, these were added with a simple Zigbee scan after I removed them from the Mozilla IoT hub. So I guess this is part of the zigbee integration. I was using the Conbee II Zigbee dongle on that system. This one (Home Assistant) uses the Nortek adaptor. Perhaps that is enough of a difference.
Come to think of it I’ve recently been using adaptive lighting. It does just that, changes the brightness depending on the time of day without turning the light on, shade of white light as well. I think this should do what you need.
While I was not able to add on the repository for Adaptive Lighting, I did manage to make it work using a different method. Not sure why I couldn’t add it, but HA would just hang whenever clicking save.
I ended up adding a time range Condition and added one more automation. The “Timer Off” Automation works with both. So what I have now looks like this:
alias: Livingroom OH Lights On w/Motion 8p-6a
description: ''
trigger:
- platform: state
entity_id: binary_sensor.samjin_motion_fc5a0901_ias_zone
to: 'on'
condition:
- condition: time
after: '20:00:00'
before: '06:00:00'
action:
- service: timer.start
data:
duration: '0'
target:
entity_id: timer.livingroom_oh_lights
- type: turn_on
device_id: 5154699e4983d6bd9a98522c6aef43c9
entity_id: light.eaton_halo_rl5601_37608d03_level_light_color_on_off
domain: light
brightness_pct: 10
- type: turn_on
device_id: 0cf482cf00011ae198081000086298d5
entity_id: light.eaton_halo_rl5601_dd07af02_level_light_color_on_off
domain: light
brightness_pct: 10
- type: turn_on
device_id: 3e565a5466a62a602173a221ec97ead5
entity_id: light.eaton_halo_rl5601_6439a603_level_light_color_on_off
domain: light
brightness_pct: 10
mode: single
This Condition sets the brightness to 10% between these hours. Then I added one more. I am just posting the difference between the two:
condition: time
after: '06:00:00'
before: '20:00:00'
with a brightness of 75%
What’s the purpose of starting a timer with zero duration?
It’s actually calling an external timer created in configuration.yaml, which is 3 minutes. It only shows up in the code as:
entity_id: timer.livingroom_oh_lights
but it does work.
When you call the timer.start
service with a duration
value, that value overrides the timer’s default duration.
I don’t know why you called it an “external timer”. It doesn’t matter if it is defined in configuration.yaml or via the UI, both ways create the same kind (and only kind) of timer.
I just noticed the check box. I de-selected it. Just need to test it now.
I called it an “external timer” because I am still really new at Home Assistant. Thanks for the valuable information. The test is running now and the lights should shut down in about one minute.
Edit: And it worked. Apparently the check box is ignored if the value is left at 0?
Is the 3-minute timer just for testing purposes? Meaning it’s there only to turn the lights off after 3 minutes, for testing, but that’s not what will be used in the final version?
It is designed to stay on for 3 minutes AFTER the motion stops. As long as there is movement, they should stay on forever as it constantly resets with motion. I just started with 3 minutes, and will probably adjust accordingly after living with it for a few days. You know, just to get a feel for it.
There’s an entirely different way to do that in Home Assistant that doesn’t involve using a timer
entity.
FWIW, although I have an automation that does what you are attempting to create (motion-activated light that operates only at certain times of the day and whose brightness is based on a schedule … and can be temporarily bypassed by the end-user via the wall-switch), you might be better served by exploring some of the existing Blueprints designed for this purpose.
Very nice link. I had read a mention about the Blueprints but had not yet investigated anything about them. I will give this a good hard look this evening and get some ideas from it for sure. Thank you very much for this! Every little tidbit helps when one is a beginner.
I have used Mozilla IoT for about 1.5 years, and had basically run into its limitations. That was when I bought another RPi4 and put HA on it, and have been slowly moving things over from it. Well yesterday afternoon, somewhere a power transformer caught fire and my lights all started flickering about 5 times per second. Well, you know what happens whenever you flick on and off Zigbee lights that quickly. Yes, they reset. They ALL reset. So I basically started from scratch with Zigbee. So I just decided to move it all over at once at that point.
I also suggest you consider looking at the Light Group integration (not to be confused with the Group integration). It would let you create a virtual light consisting of the four Eaton Halo lights. Set the virtual light to on
at 10% brightness and all four Halo lights will follow suit. It simplifies your automation because now it only needs to act on one (virtual) light. If you ever add a fifth light to the Light Group, the automation doesn’t need to be updated.
Very interesting indeed! I was wondering how that was done. I had created a Group for them but then later found out it could not be integrated in Automations. It doesn’t show up anywhere.
Checking the link, it looks like I did it the right way. From my configuration.yaml file I have:
- platform: group
name: Livingroom OH Lights Gp
entities:
- light.eaton_halo_rl5601_dd07af02_level_light_color_on_off
- light.eaton_halo_rl5601_6439a603_level_light_color_on_off
- light.eaton_halo_rl5601_37608d03_level_light_color_on_off
Groups can be used in automations. Don’t judge what can or cannot be done based on what the Automation Editor does (it has limitations).
The group you created is a traditional group (not a Light Group) so the only thing you can do with it is turn its members on or off (you can’t use it to set a member’s brightness, color, etc).