Hi everyone
Recently I noticed, in the HUE integration the dimmer switch appears, long ago to automate the actions of it I used the custom component “huesensor”, but now that it appears officially, I want to integrate it directly, but only the property of the battery appears, and I do not see documentation of how to see the events available for it, has someone already integrated the dimmer switch directly with the official hue integration?
If you go into the automations UI and start a new automation you can select the button press, long press and release events.
I was looking into this and the UI way of working is nice but I prefer to manually configure automations and scripts. Does someone know how to use the right triggers in an automation? Looking for the manual equivalent for this trigger:
After research i find the Solution , exist a listener “hue_event” that send a code 9f every button pressed on the switch, just debug to find the codes example 4002 off pressed
So far I only found one way to manually add a trigger to an automation for the Hue Dimmer Switch: I added it through the UI and then adjusted the generated code to my needs:
- id: 'hue_dimmer_switch_click_on'
alias: Hue dimmer switch click ON
trigger:
- device_id: f0aaff62bbcd4f4bb333631a0f6141ea
domain: hue
platform: device
subtype: turn_on
type: remote_button_short_release
condition: []
action:
- data: {}
service: script.hue_next_scene
For the other trigger types, I would need to do the same because I can’t find them documented somewhere.
What I’m wondering is where I can find the Device ID of my devices, which is not related to the entity ID. Does somebody know?
How much time take the evento trigger after the button clicked? , In mine Is about 2 to 3 seconds , i think Is to slow
It also took about 2-3 seconds in my setup so I switched to the Hue Essentials app which offers powerful grouping and scene functionality and can be used for setting up the Hue Dimmer Switch. For now, this is a working solution for me but it’s too bad that I cannot get the same experience with HA.
This has everything to do with the hue bridge not pushing events / states to clients connected through the API. Instead HA is polling data every second. Though some apps will poll every 0.5 sec it is IMHO not the right way to go. It results in a lot of extra traffic and use of resources which are 99% of the time useless because the states / events haven’t changed. So therefore I choose to put all input devices (dimmers and motion detectors, etc) on a deconz zigbee network. The lights are still on the hue bridge. Though you can also put the lights on deconz as well. This way you have a more direct way of communication with all devices.
So the hue dimmer switch can connect direct to a zha network with a stick o gateway, or only on ZLL networks? like the hue bridge
No both zha and zll. Only lights are zll only afaik.
Hi there. I ran into the same problem and had the same question.
I know this is an old thread, but I wanted to post this here for future google searches.
I found my hue dimmer device id, along with all the other device id’s in
\config.storage\core.device_registry
it’s just a json file and you’ll find a section like
"model": "Hue dimmer switch",
"name": "Hue dimmer switch 1",
"id": "419acded91cc4bccce201d6ca86e08be",
the id seems to be randomly assigned on device creation, so it makes it hard to share automatons across servers/setups.
i don’t know if there is a field we could add to the device registry that the automations yaml would be happy with.
Hi Frits,
I would be very interested in how you make these dimmer switches work directly with Home Assistant via ZHA. I’ve connected the switches but can only see the battery information. I can’t make any automations (hence not really program them to control any lights or anything else).
Thank you so much,
Jens
I don’t use the zha integration. Only deconz.
Go to Developer Tools and listen to “zha_event”
Here is an example to listen to the short press of the On button:
- alias: 'Tänd taklampan när man trycker på On på Hue Dimmer Switch'
id: turn_on_ceiling_light_when_short_press_hue_dimmer_switch
trigger:
- platform: event
event_type: zha_event
event_data:
device_id: e41dde509ea766649b043e2251b468ea
command: on_short_release
action:
- service: light.toggle
entity_id: light.livingroom_ball
I found another way through the UI to add the automation. Go to Settings->Devices and select your Hue Dimmer Switch. Select “+” next to Automations on the left, then " Do something when…" and you should see all events that can trigger automations. It automatically takes care of device_id’s, event_types, etc.