Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Zigbee2MQTT command names in philips_324131092621.yaml #542

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RobertClarke64
Copy link

@RobertClarke64 RobertClarke64 commented Apr 29, 2023

Command names for Hue Dimmer blueprint were using hypens for Zigbee2MQTT, where they should be underscores, like in ZHA. Fixes #541.

Proposed change

Fix the command names for Hue Dimmer switches connected using Zigbee2MQTT. The blueprint was expecting hyphens before, where it should be expecting underscores. This resulted in a broken blueprint.

Note that this change is already reflected in the blueprint for the Hue Dimmer v2 remote. I'm using the v1 remote and the commands use underscores.

Simply changes:

    zigbee2mqtt:
      button_on_short: [on-press]
      button_on_long: [on-hold]
      button_on_release: [on-hold-release]
      button_off_short: [off-press]
      button_off_long: [off-hold]
      button_off_release: [off-hold-release]
      button_up_short: [up-press]
      button_up_long: [up-hold]
      button_up_release: [up-hold-release]
      button_down_short: [down-press]
      button_down_long: [down-hold]
      button_down_release: [down-hold-release]

to this:

    zigbee2mqtt:
      button_on_short: [on_press]
      button_on_long: [on_hold]
      button_on_release: [on_hold_release]
      button_off_short: [off_press]
      button_off_long: [off_hold]
      button_off_release: [off_hold_release]
      button_up_short: [up_press]
      button_up_long: [up_hold]
      button_up_release: [up_hold_release]
      button_down_short: [down_press]
      button_down_long: [down_hold]
      button_down_release: [down_hold_release]

Checklist

  • I followed sections of the Contribution Guidelines relevant to changes I'm proposing.
  • I properly tested proposed changes on my system and confirm that they are working as expected.
  • I formatted files with Prettier using the command npm run format before submitting my Pull Request.
    ^ no but I only swapped some hyphens for underscores :)

Command names for Hue Dimmer were using hypens for Zigbee2MQTT, where they should be underscores, like in ZHA.
@github-actions
Copy link
Contributor

Hey @RobertClarke64, thank you so much for your contribution! 🚀

🔄 We're currently running a few checks to make sure that everything is great with your contribution.
If further actions need to be performed before your contribution can be reviewed, additional guidance will be provided to you in the next comment.

Results are coming soon, stay tuned!

@mutovkin
Copy link

Thank you, your PRed version works well!

@OBoudreaux
Copy link

I think someone should go ahead and merge this?

@RobertClarke64
Copy link
Author

@EPMatt Is this repository still maintained? Seems like quite a few people have benefited from this PR and it should probably be merged.

@nomike
Copy link

nomike commented Feb 3, 2024

This fix doesn't quite do it yet.
The events should not be

    zigbee2mqtt:
      button_on_short: [on_press]

but

    zigbee2mqtt:
      button_on_short: [on_press_release]

I'm currently preparing a PR to fix this and I will combine it with a few other fixes.

@brdcg
Copy link

brdcg commented Mar 4, 2024

I patched the blueprint in my environment and it worked!
Regardless of this, I would really appreciate a fix in your GitHub repository

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug - Command name incorrect for Philips Hue Dimmer using Zigbee2MQTT
5 participants