-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom turn_on & turn_off services #86
Comments
Not used it myself, as of yet, but the |
This is what I do to avoid that transition and prime the light with the right colour temp and brightness when turning the lights on using motion sensors. I get no jump in temp or brightness as a result. service: light.turn_on The adaptive light switch needs to be on for the variables colour temp and brightness to be populated. |
I'll have to test this out. My initial reading of it was that it would operate just like the component normally does (e.g. turn on light, then adapt), but on demand. |
I always keep AL on so this should work. Thanks! I'll give it a go! |
Sorry, should have highlighted the
Behaviour of lights (in general) does seem to vary per brand/model, though. It's good to have finer control in those situations—igiannakas' use of a data template looks perfect for such. You might also look towards a Template Light, for complete handling of functionality. A little overkill for what I'm doing ... sidesteps much of the convenience afforded by automation and the Adaptive Lighting integration; though—if you've an exact requirement of how entities should behave—it's probably a good fit. |
When I trigger the Is there an easy way to suppress the the |
For testing purposes I removed the following call in line 917 in switch.py
Without this the Does this function call do anything else than the initial_transition? If it's only for the initial_transition than a checkbox in the UI could be added and the function could be called depending on the checkbox. |
I've had success with my ikea lights by setting the initial transition to zero.
…On Mar 23, 2021, 17:26 -0400, Slinky-Wrangle-Punch ***@***.***>, wrote:
For testing purposes I removed the following call in line 917 in switch.py
await self._update_attrs_and_maybe_adapt_lights(
lights=[entity_id],
transition=self._initial_transition,
force=True,
context=self.create_context("light_event"),
)
Without this the adaptive_lighting.apply with turn_on_lights works like a charm and just the two service calls for brightness and color are issued.
Does this function call do anything else than the initial_transition? If it's only for the initial_transition than a checkbox in the UI could be added and the function could be called depending on the checkbox.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
I am also this issue, had a hope zigbee2mqtt will speed things up (compared to Tradfri and Hue), but it's not that much. It would be great to have a service that preloads |
I'm currently in the process of doing version 2. This will be added/fixed. Keep this ticket open until you can verify that it's properly working in the upcoming version 2. |
This is currently done/waiting-for-review. I wanted this too so I spent a half hour making it :) |
The problem described by @Slinky-Wrangle-Punch here #86 (comment) is no longer present. Right now AL will wait for transitions that have been set (thanks to @th3w1zard1! 🎉) Therefore, I think the request has an existing solution (use |
Not sure how feasible this would be, but it'd be great if AL had custom turn_on/_off services that could be called, which would then package the appropriate brightness and color temp into a light.turn_on command and send that to home assistant. I use a lot of motion sensors so if someone hasn't been in the room since it's been light out, there's often a pop of light when motion is triggered b/c the light is turned on first to it's previous state and then quickly adjusted by AL. I know some have their light.turn_on commands packaged with a brightness of 1, but having AL handle the initial turn_on command seems more elegant. Thanks for all your work! Because of your component (and motion sensors) I never have to manually turn on/off or adjust lights anymore!
The text was updated successfully, but these errors were encountered: