Adaptive Lightning Settings

I’ve thought of some better optimizations I’m going to add but I’ll update the same link so check back whenever as I’ll try and keep it in sync for anyone in this same boat.

1 Like

I updated my automation to make it easier to use. Basically, one only has to update the switches triger_variable such that each key is the switch and the value is the light group it targets.

Initially I wrote this with only smart bulbs in mind but I added another Blue 2-1 switch which targets dumb LED lights which I may change at another time so I wanted to make sure I don’t have to update this much later.

Anyways, hope this helps. I tried writing a blueprint but the need for a dictionary would have required a template input or creating some helper mapping and neither are as easy as updating the few lines in the automation YAML.

1 Like

I’ve been a little busy but took some time this evening to reimplement using Pyscript. With that, you can simply add a ZHA group light entity in which an Inovelli switch is a member and it’ll handle the same use case. Here is the example config:

pyscript:
  apps:
    inovelli_al_fixer:
      - al_sleep_switch: switch.adaptive_lighting_sleep_mode_default
        al_switch: switch.adaptive_lighting_default
        lights:
          - light.hallway
          - light.kitchen
          - light.kitchen_dining
          - light.living_room
          - light.stairway

In my case, this is handling 7 different Inovelli switches (I’ve been lazy and haven’t installed my new ones yet…).

My code is here. I did create a blueprint but it’s much more work to maintain, harder to document, and one must manually ensure Inovelli devices and the ZHA group entity are kept up to date. This new setup inspects the entity_registry entry and ensures that translation_key == 'light_groups' and then determines ZHA group, gets group members, filters for Inovelli switches, and then sets up triggers based on them.

Anyways, hope this helps.

1 Like

I have been using Node-Red to get around this. I want my lights to be bound to the switches and I want the switches to display current brightness levels and on/off while sending the color_temp, xy, hs, rgb commands etc… to the bound light group. Finally got away from Node-Red and got it all in Home Assistant by creating a custom MQTT Light object in the HA configuration.yaml and now have all that I wanted for these.

See image below for how I accomplished this:

I also use the Homekit capability of Home Assistant to publish this back to Homekit for Siri voice commands and mobile usage. For Adaptive, using the Adaptive Lighting from HACS and just making sure to send On/Off, Brightness, Color_temp etc… as separate commands on first turn on.

All seems fabulous so far.

1 Like

Nice but I’m using standard ZHA though seriously contemplating switching but I have 61 devices and would be a headache.

Having said that, I’m thinking of dumping Adaptive Lighting for the 💡 Sensor Light - Motion Sensor - Door Sensor - Sun Elevation - LUX Value - Scenes - Time - Light Control - Device Tracker - Night Lights - Blueprints Exchange - Home Assistant Community Blueprint. I’ve done a little testing and it accomplishes much of the same objective without the headaches. Plus it has a night light feature which is kinda nifty.

I considered both when first installing my Blue 2-1s. The Internet seems filled with reasons to use z2m, but I didn’t see all of the advantages that were talked about being worth the slightly more complex setup. I’d used ZHA a bit before and enjoyed some of the easier (or more familiar) setup interfaces, for instance scenes. I’m not saying one’s better than another, but some of the advantages that people suggest for z2m like custom quirks are now in ZHA as well.

Anyway, I stayed with ZHA for the time being.

z2m is far easier to configure and a little easier to visually inspect bindings which I do like. It also has the ability to create entities for device triggers which is nice at times.

If you’re talking about Zigbee scenes, there is support for that. If it’s HA scenes, then an entity is an entity. I have mostly stopped using HA scenes and just operate on labels since I’ve found some device weirdness with HA scenes.

If you’ve not used z2m, I’d buy a second controller and try it out. There are some nice features there. In fact, I have an extra controller so maybe I’ll do that with one of my switch/light groups.

It also decouples you nicely from Home Assistant. It’s really annoying with a large Zigbee network that it shuts down and restarts whenever Home Assistant does.

That’s a great point that I didn’t think about. I guess even more reason to setup my second controller this week!

I’ll update with my results once I get a change to move a Zigbee group container a blue switch and bulbs to z2m.