claytonjn / hass-circadian_lighting

Circadian Lighting custom component for Home Assistant
Apache License 2.0
756 stars 89 forks source link

Hue bridge scene updates #195

Open BenoitAnastay opened 2 years ago

BenoitAnastay commented 2 years ago

This is updating scenes on the hue bridge, avoiding you the pain to create rest commands for each scenes you want to update.

This is an update of the PR https://github.com/claytonjn/hass-circadian_lighting/pull/166

The configuration look like this

  - platform: circadian_lighting
    lights_ct:
      - light.living_room
      - light.entrance
      - light.bedroom
    hue_keyword: 'Circadian'

This will update the color temp of scenes with names containing the word Circadian, without changing the power state, thus you can have multiples scenes with differents powered bulbs

You can also manually setup the bridge and API key

If you have multiple switch you cal also set differents keyword

RobertDWhite commented 2 years ago

Glad my python to grab the Hue API key automatically is working for you. I'll test this out later. Was just going back through my configs earlier this week to make similar functionality occur on the newest CL version.

BenoitAnastay commented 2 years ago

@RobertDWhite The main change I've done since my previous PR is that I forked aiohue and uploaded it to PyPi, thus there is no needs to manually update libs.

I was waiting after aiohue mainte,air to add a methode to update scenes but they didn't make it, I forked it bu kept the V1.

I do feel a bit lazy about updating to V2 but feel free to have a look on my fork https://github.com/BenoitAnastay/aiohue