EPMatt / awesome-ha-blueprints

A curated collection of automation blueprints for Home Assistant.
https://epmatt.github.io/awesome-ha-blueprints
GNU General Public License v3.0
834 stars 250 forks source link

Fix Zigbee2MQTT command names in philips_324131092621.yaml #542

Open RobertClarke64 opened 1 year ago

RobertClarke64 commented 1 year ago

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

github-actions[bot] commented 1 year ago

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 commented 1 year ago

Thank you, your PRed version works well!

OBoudreaux commented 9 months ago

I think someone should go ahead and merge this?

RobertClarke64 commented 9 months ago

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

nomike commented 8 months ago

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 commented 7 months ago

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