Tunable White - Preset Tuning Selection from Script/Automation? #207
-
I'm tackling my first HomeAssistant automation since i've started my setup this month: Tunable white lightbulbs on a time-based automation. I've had success at toggling On/Off my two first Wiz lightbulbs with light groups and a basic automation. Woo-hoo! Problem: I have not determined how to set tuned white color schemes in automations or scripts. FYI, cross-posted to reddit.com/homeassistant/ I have successfully added light switches to my lovelace interface, and when i click on the entity name, it brings up a pop-up with additional controls for brightness, color temperature, and effect. The Effect selection allows me to use preset color temp/ brightness settings. Very handy. Further, the pre-populated list matches the options available in the Wiz proprietary mobil app. I would like to use the same preset options available under the effect option. I have scoured the Wiz_Light GitHub repository, looking for any mention of any of the preset names i find under the drop down. I haven't found mention of "cozy", "night light", or any other preset. After looking through the custom_components/wiz_light/light.py file, I see reference to inherited features from base HomeAssistant light components. Perhaps these presets are found somewhere inside HomeAssistant code? I've searched there too, and can't figure it out. Regardless of where the presets reside, I'm trying to simply turn on the light, and tune the white color according to a preset thats already available from a dropdown list in homeassistant. I've tried something as simply as:
Apparently my attempt to throw a name at "effect" in the data: field isn't sufficient. It could be a simple error. Regardless, I've learned a lot so far on this first project!! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Answer! A friendly redditor assisted me by directing me to the Home Assistant Developer - States tab, and recommending i look at the listed attributes of a given entity. Per the screenshot below my long-desired "list of presets" is there for the entity. Further, it looks like I was very close in my original code (case sensitive attributes). Anyway, I've included a screenshot of the developer State tab, for others to take a peek at. Final functional script:
Thanks for a awesome project supporting the Wiz family! |
Beta Was this translation helpful? Give feedback.
Answer!
A friendly redditor assisted me by directing me to the Home Assistant Developer - States tab, and recommending i look at the listed attributes of a given entity. Per the screenshot below my long-desired "list of presets" is there for the entity. Further, it looks like I was very close in my original code (case sensitive attributes).
Anyway, I've included a screenshot of the developer State tab, for others to take a peek at.
Final functional script: