Migrating Hue rules to HASS - possible?

Hello - right now I only have Hue bulbs, dimmers and switches. I’m officially out of room on the bridge and can’t add anymore rules. Apparently the motion sensor rules take up the most room But I’m not done and so yes, I could buy another Hue bridge, but I figured I’d take a shot and do it all in HASS. Why? Well, I’m planning to add more gear - particularly z-wave switches, motions, esp8266 stuff, etc. This would give me a chance to get familiar with HASS

So far I’ve tried a few things - I have the Conbee stick, tried deCONZ and I also have the HUSBZB-1 stick. I realize that being all Hue might be part of the problem. The motions and switches don’t work with the HUSBZB and deCONZ is buggy as heck. Lot’s of know issues.

Long story short - they’re not ready and I’m done being so exhausted and I’ll just interface with my Hue gear through the Hue hub in HASS. This seems to be the most consistent and straight forward way to talk to all of the Hue devices. I’m ok with this. At least I tried the other options and I’m prepared for when they eventually mature. I’ve got every stick out there! Haha!

Now down to the rules.

  1. Some of my rules work in ways where when it’s a certain hour and the main stairs motion senses motion, it kicks on several lights that lead to the basement and out to the garage. Simple, but one thing that happens when the main stairs senses motion is that it cancels out two other motions along the path, so that they don’t take over controlling the lights and turn them off too soon.

  2. Different behaviors when pressing the “On” button on a Hue dimmer switch one, two or three times.

  3. Holding down “On” button on a Hue dimmer switch turns on multiple lights.

  4. Depending on the time, pressing the “Off” button turns off the light and turns on another. This is a late night setup. It turns off the bathroom light and turns on the light strip under the bed, acting as a night light.

  5. When a motion detects motion, the light goes on, but if I push the “On” button on the Hue dimmer switch, it cancels the motion, so that it does not take control of the light and turn it off too soon.

All of these rules were easily configurable in an app I use call iConnectHue.

Is this doable in HASS? Anyone using something similar?


All these rules are possible in HA. But there is no way to import them from the hue bridge. You’d need to build them again in HA if you want to transfer them over.

Yep - that part I get. I guess I’m polling for some help, examples or guidance on a good place to start.

If you couldn’t tell by now, I’m very new and I while I’ve managed to build some simple configs, combined with Node-Red - most of it is copy and paste from what I’ve found here and elsewhere.

How do most folks determine how to develop the constructs of all of these configs?

Best way is to use this forum’s search function when dealing with complex automations. For dealing with simple automations, the base automation section on the help page is what got me started: https://home-assistant.io/docs/automation/examples/

1 Like

Yes - I’ve doing lots of that and then posting for some help when I run into a roadblock.

  1. ) In your automation for the sensors down the path, use a condition looking at the sensor that may be triggered first. If the state of that sensor is on, don’t do the automation. Something like that would work.

  2. ) not sure if this is supported. You would need to perform a double tap on your hue device and see if it fires an event in Hass. If it fires a event, then you can build automation off that event.

  3. ) same principle as #2. If the device sends a event for holding the button, then you can build off that.

  4. ) This can be done, i had this automation working for a while, you’d just need to add time frame to it:

     - alias: 'Toggle Office Light On'
         - platform: state
           entity_id: switch.office_s_switch_3_0
           from: 'off'
           to: 'on'
         - service: switch.turn_on
           entity_id: switch.office_o_switch_4_0
     - alias: 'Toggle Office Light Off'
         - platform: state
           entity_id: switch.office_s_switch_3_0
           from: 'on'
           to: 'off'
         - service: switch.turn_off
           entity_id: switch.office_o_switch_4_0
  1. You’ll have to utilize the script.turn_off service and call it from 2 separate scripts. 1 script would be a timer that fires an event in x minutes (turn_off_lights). The second script would cancel that script by turning off the other script:

     - service: script.turn_off
         entity_id: script.hall_light_timer

Hey thanks this is helpful. I’m using Node-Red mostly and it so far has been helpful.

I’ll keep digging in and trying to make progress and post back if I need help.

Thanks again for the help!