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

Bug - After upgrade to Zigbee2MQTT 2.0.0-2 conditions always failed #665

Closed
1 task
jorismocka opened this issue Jan 12, 2025 · 17 comments · Fixed by #677
Closed
1 task

Bug - After upgrade to Zigbee2MQTT 2.0.0-2 conditions always failed #665

jorismocka opened this issue Jan 12, 2025 · 17 comments · Fixed by #677
Labels
blueprint An issue related to a blueprint bug Something isn't working

Comments

@jorismocka
Copy link

Blueprint name

Controller - Philips 324131092621 Hue Dimmer switch

Home Assistant Core Version

2025.01

Home Assistant Installation Type

Home Assistant Operating System

Description

Stopped due one condition always fails (works with 1.4.0-2 but not with 2.0.0-2 even with homeassistant: legacy_action_sensor: true)
Maybe switch to MQTT device trigger because action is deprecated?

Automation YAML config

conditions:
  - condition: and
    conditions:
      - >-
        {%- set trigger_action -%} {%- if integration_id == "zigbee2mqtt" -%} {{
        trigger.event.data.new_state.state }} {%- elif integration_id ==
        "deconz" -%} {{ trigger.event.data.event }} {%- elif integration_id ==
        "zha" -%} {{ trigger.event.data.command }} {%- endif -%} {%- endset -%}
        {{ trigger_action not in ["","None"] }}
      - >-
        {{ integration_id != "zigbee2mqtt" or trigger.event.data.new_state.state
        != trigger.event.data.old_state.state }}

To Reproduce

  1. Go to Hue Switch
  2. Click on On
  3. Trigger the automation of that blueprint
  4. See error above

Expected behavior

Turn on light

Actual Behaviour

Nothing

Additional Details

  • I'd like to help developing a fix for this issue.

Screenshots

No response

Additional context

No response

@jorismocka jorismocka added blueprint An issue related to a blueprint bug Something isn't working labels Jan 12, 2025
@jorismocka jorismocka changed the title Bug - After uograde to Zigbee2MQTT conditions always failed Bug - After upgrade to Zigbee2MQTT 2.0.0-2 conditions always failed Jan 12, 2025
@yarafie
Copy link
Contributor

yarafie commented Jan 12, 2025

Are you sure you set as per the example in the link below and restarted both zigbee2mqtt and home assistant?

It should work

https://github.com/EPMatt/awesome-ha-blueprints/issues/622#issuecomment-2570466252[](url)

@jorismocka
Copy link
Author

Sure is only death ;-) But thank you very much for the interesting issue thread and the very quick help! :-)

Yesterday I read the whole theread but I'm absolutely unsure what exactly you mean. So I try the opposite and explain what I did and what works.

I set in the configuration.yaml the following configuration:

homeassistant:
legacy_action_sensor: true

Restarted both - Zigbee2MQTT an HA 2025.01.
With this the other awesome-ha-blueprints for the Ikea switches like 1524, 1743 and E2001 are working like a charme. No problems at all.

Just for the hue controller I see that an action is registered too by Zigbee2MQTT every time I press a button. So, there everything seems to work properly. But unfortunately the marked condition just for Hue devices are failing fails following the output if the trace.

In the thread I see there is a fork. Should I use the fork for hue or what recommendation you meant or something different? Sorry for asking - I didn't catch your point which might be obviously and thank you for your help.

@mdehaas
Copy link

mdehaas commented Jan 13, 2025

Best thing is to wait. Work is underway to update the blueprints to support Z2M 2.x. Until then there are two choices:

  • Stay on Z2M 1.4 until all blueprints (you use) are updated. (and then re-download them through HA)
  • Enable HA legacy triggers in Z2M 2.x until all blueprints (you use) are updated. (and then re-download them through HA)

Do not switch to a fork, the idea of a fork is to have separate developers do stuff and merge it back into the main project.

@jorismocka
Copy link
Author

Thank you very much Marcel! I will do so and keep an eye on the development of the hue blueprints :-)

@fakorte
Copy link

fakorte commented Jan 23, 2025

A few hours ago Something hast happend... Is the Problem solved?

@yarafie
Copy link
Contributor

yarafie commented Jan 23, 2025

A few hours ago Something hast happend... Is the Problem solved?

I made a pull request to fix all blueprints, waiting for EPMatt to review.
Then You all can test and we can work on any bugs after that.

@UsefulVid
Copy link

@yarafie any news on the review process?

@yarafie
Copy link
Contributor

yarafie commented Jan 29, 2025

@yarafie any news on the review process?

#674 (comment)

@yarafie
Copy link
Contributor

yarafie commented Feb 4, 2025

I Pre-Released a working version of the IKEA RODRET on my fork

https://yarafie.github.io/awesome-ha-blueprints/docs/blueprints/controllers/ikea_e2201

I've made a few changes with this controller different from the current existing controllers.

  1. There is no need to select the integration type (Zigbee2MQTT, ZHA, deCONZ) it is automagically detected in the blueprint.
  2. There is no need to create Text Helper for this controller, I figured out a way around it.
  3. It works with the Hooks (lights, covers, media_players) also (You need to use the ones from my fork) however one caveat. You cannot and I repeat you cannot use both custom actions and hooks at the same time for the same device especially for virtual double press, otherwise strange things will occur. I figured out why but not going to go into details :)

Enjoy and let me know of any bugs.

@accordxtc
Copy link

@yarafie Will this forked version you've now done fix the issues with the blueprints not being able to do double press events or will this fix be implemented to the other blueprints? I was having the issue of double press events on the IKEA Shortcut button not working.

Thanks to @EPMatt and @yarafie with a simple blueprint

@yarafie
Copy link
Contributor

yarafie commented Feb 5, 2025

Right now only RODRET as I've changed a lot of the code @EPMatt will have to review and accept the new methodology first.

@fakorte
Copy link

fakorte commented Feb 10, 2025

i have changed to HACS Switch Manager. I works perfectly

@yarafie
Copy link
Contributor

yarafie commented Feb 10, 2025

i have changed to HACS Switch Manager. I works perfectly

Yes I've used it it's pretty good.
Sorry to see you leave. Which specific device controller are you most interested in?

@fakorte
Copy link

fakorte commented Feb 10, 2025

I use the Philips Hue Dim Switches. Unfortunately I have to say that my first impression is even more convincing than it was here than it still worked...

@EPMatt EPMatt linked a pull request Feb 13, 2025 that will close this issue
@EPMatt
Copy link
Owner

EPMatt commented Feb 13, 2025

Hey everyone! I was finally able to review @yarafie's contribution and merge changes to main. Fixed blueprints are not available on main, so I'm marking this issue as resolved 🚀 If you're still experiencing problems, feel free to open a new issue.

Huge thanks to anyone who contributed to the discussion 🔥

@EPMatt EPMatt closed this as completed Feb 13, 2025
@accordxtc
Copy link

I've tested with the updated 2025.2.13 blueprint and double press events still don't work

@EPMatt
Copy link
Owner

EPMatt commented Feb 13, 2025

Thanks for reporting @accordxtc. This is the next issue we're going to work on 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blueprint An issue related to a blueprint bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants