I have been trying to make what would appear to be a simple task happen for over a year with my system. My last attempt failed after trying to create a virtual bulb…wasted a whole afternoon and got nowhere.
I want to have a random HS color value assigned at a specific time of day that I can reference when turning on particular color bulbs.
I currently have an automation that sets all the color bulbs at sunset but if I change the scene in a room I cant get that same daily assigned color back via an automation - it randomly makes a new one?
I am very challenged when it comes to coding and have found the HA very challenging. I mostly rely on blueprints for my system. I wish I could write a simple motion light but even that IO need blue prints. Any help or pointers would be greatly appreciated
Current code
if:
- condition: sun
before: sunrise
after: sunset
then:
- service: light.turn_on
data:
hs_color:
- "{{ (range(1, 360)|random) }}"
- "{{ (range(90, 100)|random) }}"
target:
entity_id:
- light.kitchen_aquarium_led
- light.kitchen_color_lights