Hue Dimmer Remote (connected via Hue Bridge + Hue Integration), December 2021 - Works w/RWL020 / 21 / 22

Hmm, I would verify that the remote is connected to the Hue hub and can control lights on its own first.

There might be all sorts of things that could be done but establishing connectivity directly with the Hue hub will help you isolate where issues are occurring.

I might go about troubleshooting as follows: Hue hub? → networking? → Home Assistant Hue integration?

What I have tested so far.
I can control Hue lights from HA and with remote.
So I think its safe to say remote and bridge are talking together. And that HA and bridge are also talking together.
I also did notice that when remote got too far from hub and pressed button remote light went red. Home assistant noticed that remote had connectivity issues at that same time.
HA records events when light status/brightness changes.
Tried to reset remote settings from Hue app but nothing changed in HA except remote name.

I am very knew to HA so this could be a very stupid question but whenever i am going to save a new automation using this blueprint i get he following error: Message malformed: expected str for dictionary value @ data[‘subtype’]

Anyone know what this is ?

use_blueprint:
  path: lksnyder0/hue-remote-dimmer-january-2022.yaml
  input:
    dimmer_device: c386611d42b977398906eab25fa3c37d
    on_short_action:
      - type: toggle
        device_id: 73d5f372d85a3d2bebcafc6f41fd06b0
        entity_id: switch.under_counter_lights
        domain: switch
alias: UnderCounterLightSwitch

Hey @aki1987, hope you’re doing well!
Thanks for sharing your troubleshooting journey. I’m hopeful we’ll be able to resolve the issues you’re facing :grin:

Couple things:

  1. I would try removing the dimmer accessory from Hue, verify it’s removed in Home Assistant, and then add it back via Hue app and see it get picked up again by Home Assistant. After a restart, that might help. If it’s still not working, you’d probably want to consider learning more about the API and/or if you have backups just re-adding the Hue integration on Home Assistant. There aren’t really any guarantees from my end for either so please do so at your discretion.
  2. Just something I noticed when comparing our screenshots and what my actual config is: my Zigbee Connectivity sensor isn’t present for my dimmer anymore. I’m not sure if this has anything to do with connectivity method (guessing it doesn’t) but wanted to throw it out there in case it’s useful.

Would be great to know how things turn out.
Best of luck and happy automating! :robot::rocket::tada:

Hello @Ryanklingert and welcome to HA! Thank you for trying out this blueprint.
I see you’re using the one which allows for long-press :raised_hands:t2:

Thanks for sharing your automation config; to be honest I’m not sure what the appropriate YAML schema is for this and I didn’t validate what you wrote, but I was able to use the UI to generate an automation that uses a toggle action on a switch and is based on a device id:

- id: '1680373212530'
  alias: Test 1234
  description: ''
  use_blueprint:
    path: lksnyder0/hue-remote-dimmer-january-2022.yaml
    input:
      dimmer_device: 845a5ea127778a7acb53b6da4c4a248f
      on_short_action:
      - service: switch.toggle
        data: {}
        target:
          device_id: 44c33aa6fdb94fe8a222e63064c8cf8d

There are some differences between the automations. I’m unsure of the YAML schema but most likely a data dictionary needs to be added hence the error for attempting to locate the 'subtype' key. It’s possible that just having an empty dictionary would avoid this issue.

It’s also possible that providing both device_id and entity_id would be two different options, and in this case I think device_id is still taking precedence. It could cause undefined behavior to have both, but I’m not 100% sure.


I’m not sure if it’s what you’re already doing and this misses the mark, but I’d recommend using the UI to generate this automation. That would provide the guard rails in generating the correct YAML under the hood.

As an added “bonus” to using the UI editor, you can disable actions for specific automations. What this meant for me when the long press repeat blueprint was added is that I only needed to override the repeat actions on the new automation, and could use the old automation’s actions and simply disable the hold actions for that original automation. This allows me to

  1. reduce how much code was written initially
  2. reduce how much code will be written and have both options easily toggle-able. If I want to go back I can simply re-enable the functionality for the original automation for hold actions and disable the long press actions as needed without needing to create/edit existing automations

Hopeful it’s helpful. Once again welcome to Home Assistant and happy automating!

:robot::handshake::house_with_garden:

Hi.
Hue devices where new so nothing to revert to.
But following your post I now get “hue_event” in HA.

Removing and adding remote to Hue helped.
Apparently in Hue starter kits there some something in out of the box setup thats not good for HA.
For other note that when I added remote back to Hue I selected at end of adding remote “Configure in other app”.

Thanks codes for ideas. Now I can get to doing setups :grin:

1 Like

Rad, great to hear :star_struck:!
Will take this info into account and add it to the initial post so others can easily reference as well.

I’m guessing the remote came pre-paired to the Hub?
Speculating here but this initial pairing could be the cause of the issue… some info may be missing when paired this way which Home Assistant needs to listen to the events.

Yes all devices where pre-paired in starter kit I bought.
Must be something to do with their factory settings so might truly come handy for some others who buy kits.

Hi, I don’t really understand, yesterday I was able in automation to have a different action on each switch but today after rebooting my hue bridge, nothing work anymore! Probably an unfortunate update!
So I look, for something to help me, and I found your blueprint, but unfortunately, when I try to save my automation I’ve got this error message : “Message malformed: expected str for dictionary value @ data[‘subtype’]” looks like my dimmer is RWL021.
Did someone have a suggestion to edit the blueprint or find an other solution.
Thanks

Hey there, @tilempaf! Hopefully you’re doing well.

To begin with this blueprint is still running solid for me (for now locally at least :stuck_out_tongue_closed_eyes:) which is good because it will probably work for you as well. RWL021 is the same model I am using too.

It looks like there could be an update required for the blueprint if it is expecting a string instead of an int.
I will be happy to take a look and update the blueprint if needed though it may take some time.
If you’re handy with the YAML you could edit the blueprint directly, changing the field from an int literal to a str literal by putting quotations around each of the numbers on the subtype fields.

In the meantime another option you can try out are the new event entities. If you go down this route please do chime in here and we can share that info with others.

hopefully this is helpful; happy automating :robot:

1 Like

Hi,

I am looking for a possibility to make double presses on a Hue dimmer switch work. Is this somehow possible, when you use a HueBridge (and not ZHA). At the moment I am using the iOS iConnectHue app to configure double/tripple/quadruple presses, but I want to bring the complete configuration/automation to Home Assistant.

Thanks Hoppel

1 Like

Hey there, @hoppel118 ! Hopefully you’re doing well.

I’m sure it’s possible to setup, packaging it up potentially through yaml or at least as a custom component. I’m unsure if we can natively detect the multiple presses, though I see the other blueprints using ZHA are able to get these events natively. Worst case scenario some custom logic would be needed to check how many presses are detected in a duration and trigger automations accordingly.

I’m happy to research existing solutions and check if there is a way to natively get the button presses since this is possible using ZHA. It might take some time though as I’m currently on vacation :sunglasses:. In the meantime if you have any updates please feel free to share.

Best of luck and happy automating :house_with_garden:

1 Like

Hi @codes ,

I was in contact with the developer of the native HueBridge implementation. He told me the following:

The native Hue api nor their matter bridge exposes that info. Also a Hue dimmer switch connected to ZHA/Z2M wont expose that info. You’re only option is to create a smart automation/blueprint to do this with counting the presses and checking the timeframe

I showed him the following Blueprint, where double presses are possible:

After that he told me:

yes they do here: https://github.com/EPMatt/awesome-ha-blueprints/blob/9ee5920a3633c87bd8ee8713b83bbbf4705cc31d/blueprints/controllers/philips_324131092621/philips_324131092621.yaml#L416C33-L416C55

Thank you so much. Enjoy your vacation.

1 Like

Thanks for sharing this insight with me.

If anyone else is willing to pitch in to add this multiple tap functionality to this blueprint I will happily test and add it to the post!

Hopefully I’ll have some time to work on an addition as well.

Have a good one :vulcan_salute:t2:

1 Like

Hey @tilempaf , hopefully you’re doing well.

Got a chance to look through this blueprint and haven’t been able to replicate the message: “Message malformed: expected str for dictionary value @ data[‘subtype’]”. I’m using the latest Home Assistant version 2023.11.

At first, I thought subtype could be referring to properties within the blueprint itself, though I was able to validate the blueprint is working as-is. For good measure I re-imported the blueprint and created an automation, and all is working there with an RWL021.

I would recommend checking the automations you’re creating from the blueprint to validate they are setup as intended. Please let me know if there’s anything else I can do to help.

Happy automating! :robot::house_with_garden:

1 Like

@codes Hi there, hope you’re doing well? Thanks for trying to find an answer to my error. But it appears that the error came mostly from me
Today I was able to make it work, by editing you’re blueprint on the blueprint menu of HA.
When I was doing it from the automations menu of HA, it doesn’t work.
Sorry to disturb you for nothing.

1 Like

Hey @hoppel118, hopefully you’re doing well! I took a more thorough look at the existing blueprint shared and realized a couple things that have made me decide against extending the existing blueprint here.

For our current blueprint, we provide a single tap or long press action. This was extended by another user to have a repeat action when the button is held. These exist as two separate blueprints which are both shared here.

For the multi-tap actions that the other blueprint provides, there are additional requirements to track the state of the last press and logic to determine whether that press occurred within a duration to trigger a multi-tap action. Because of the additional helper required, users would need to setup this helper in order to use the blueprint.

Due to the extra helper requirement and logic required to test the different multi-tap gestures, I believe this functionality should be held in a separate blueprint. I’d also like to share that even at its current stage, we have a total of eight unique actions that can be selected with a single remote! I would encourage you or anyone else to use this blueprint as a foundation to implement multi-action functionality accordingly!

While I won’t be adding the additional functionality here, this blueprint still delivers on the key functions described above, and I believe it strikes a good balance of functionality to customizability. I’m jazzed that it’s worked so well for myself and that others are probably experiencing the same.

Appreciate your taking the time to post and happy automating! :robot::house_with_garden:

1 Like

Has anyone after 2024.4.3 had their automation/blueprint become unavailable?

Hey @Verpz, the latest home assistant 2024.4.3 is working great with this blueprint for me.

Was it working previously and recently stopped?

Hey @codes thanks for your reply. Was a false alarm. I had an old entity in the blueprint which made the automation unavailable in the newer version of HA. Now that I have removed it, all is working again.

1 Like