Yet once more Philips Hue Dimmer switch (4-buttons)

To track my wife’s every move :rofl::speak_no_evil: she is the only one using the buttons

Ok, i’ve found, that it takes like 5 seconds to propagate from switch press to the real action. But if I start to press the buttons like a crazy, something happens and then the dimmer actions are performed ‘randomly’ at will of something.

Hello, Folks - to chime in, I’ve been using the CC for a long time. As the default integration for Hue continues to improve, I’ve migrated the motion sensors to the default integration. The switches, though, are an integral part of my automations. For example:

- alias: Turn off training room, turn on laundry room
  - entity_id: sensor.training_room_switch
    platform: state
  - entity_id: input_boolean.shut_down_training_room
    platform: state
    to: 'on'
    condition: and
      - condition: template
        value_template: >
            {{(as_timestamp(now())-as_timestamp(state_attr('automation.do_this_on_hass_io_startup','last_triggered'))) > 5*60 }}        
      - condition: or
          - condition: state
            entity_id: sensor.training_room_switch
            state: '4_click_up'
          - condition: state
            entity_id: input_boolean.brighten_all_living_room_lights
            state: 'on'
  - service: light.turn_off
        - light.basement_bathroom
        - light.training_room
      transition: 10
  - service: switch.turn_on
    entity_id: switch.leviton_dz15s_1bz_decora_smart_switch_switch_2
  - service: switch.turn_off
    entity_id: switch.training_room_fans
  - service: script.shut_down_roku_tv
      roku_name: media_player.roku_3_training_room
      caller: Turn off training room, turn on laundry room

The automation can be triggered by either the hue dimmer switch (sensor.training_room_switch) or an input boolean (input_boolean.shut_down_training_room). The condition does a few things:

  1. Keeps the automation from triggering after a restart based on the last state of the switch, and
  2. The switch state needs to be 4_click_up or the input_boolean needs to be on

This is all with the CC. When I take the CC away, there is no sensor to trigger the automations (I have 8 for each hue switch. I have no idea how I’d do this with the newer default switch.

Thoughts on how I can accomplish the same thing with the default integration?

As a second issue, once I set up the default integration, I now have two sets of everything related to Hue - fortunately, HA is smart enough to realize that and just ignores the second set, but it seems weird to me. For example, this is one of the entries from the HA log after a restart:

Entity id already exists - ignoring: binary_sensor.living_room_sensor_motion. Platform hue does not generate unique IDs

How do I get rid of one of them? There are still two sets with or without the custom component.

Can someone please show me an example of how to create an automation for setting up the Hue battery entity to use a long hold to turn on a wall plug switch connected to a lamp? I don’t understand how to use a device trigger in the automation UI editor.

Please help.

You can always use Node-Red and the HueMagic node if you prefer
Heres an example flow from one of my dimmers

[{"id":"e3f0a3b9.041ac","type":"switch","z":"3fb57335.4b5a9c","name":"push type","property":"payload.action","propertyType":"msg","rules":[{"t":"eq","v":"pressed","vt":"str"},{"t":"eq","v":"short released","vt":"str"},{"t":"eq","v":"holded","vt":"str"},{"t":"eq","v":"long released","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":540,"y":180,"wires":[[],[],["79b445cd.591f1c"],["79b445cd.591f1c"]]},{"id":"7c2dc038.6ee98","type":"switch","z":"3fb57335.4b5a9c","name":"button","property":"","propertyType":"msg","rules":[{"t":"eq","v":"On","vt":"str"},{"t":"eq","v":"Off","vt":"str"},{"t":"eq","v":"Dim Up","vt":"str"},{"t":"eq","v":"Dim Down","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":350,"y":200,"wires":[[],["e3f0a3b9.041ac"],[],[]]},{"id":"79b445cd.591f1c","type":"api-call-service","z":"3fb57335.4b5a9c","name":"All Lights off","server":"","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"all","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":730,"y":240,"wires":[[]]},{"id":"f6de27e6.986368","type":"hue-switch","z":"3fb57335.4b5a9c","name":"Living Room Switch","bridge":"","sensorid":"","skipevents":false,"x":150,"y":200,"wires":[["7c2dc038.6ee98"]]}]
1 Like

Thank you!!

I just started learning Node Red and like what I’ve been able to do so far. How do I find the HueMagic Node?

Never mind, I figured out to install it. Thanks again!

Only with the HA default integration of Hue Bridge, I found the triggers of the dimmer switch at Configuration -> Devices -> Hue dimmer switch 1:


Thank you! I didn’t know that existed.

yours looks much better than mine…:

did you set some special settings somewhere?
wait, it changes when I change the language to English:

translations are not set yet probably then… or incorrectly.

Thank you sir. I was able to create them easily with that event sensor.