šŸ§Æ Zigbee2MQTT - Xiaomi Cube Controller

OK, if you would please write an issue for it. I need to dig in and make all the YAML changes to current non legacy, so will look at it then.

I donā€™t see it in my log, so give me info about your device and related so I can track it. It may be a problem with how you have named the device or something, donā€™t know.
Iā€™ll be contacting you when I work on it.

1 Like

Z2M version 2.x has dropped. This means if you install that, you will need to make a change to your configuration in order to use :fire_extinguisher: Zigbee2MQTT - Xiaomi Cube Controller.

I have not yet made changes to accommodate for the update, and my changes are going to be likely using the Home Assistant experimental event entities.

So to accommodate the change, I will be asking you to change 2 buttons in the Z2M :gear: set-up screen in the User Interface (UI) screen.

Please click both these:

Home Assistant legacy action sensors So that it will work now until I update this and

Home Assistant experimental event entities for later so it works after I update this.

Also leave Enabled checked as well. It should look similar to that photo when you are done.

Sorry for any inconvenience this is causing you. I wanted the dust to settle a bit so that I could see the final version of the change before I updated my stuff. In the end I think this is a positive change and will make programming these devices a lot easier for everyone.

1 Like

I can not get it to work - it registers the _action, but the initial check for a change in state yields a ā€œfalseā€, and as such it never proceeds beyond this ANDā€¦

Any thoughts???

It started working again after I put this line in the /config/zigbee2mqtt/configuration yaml, somewhere in the ā€œadvanced:ā€ block.

homeassistant_legacy_entity_attributes: true

Hello Jos, Tony P,

So, did you read the post directly above?
I have not edited these yet, and when I do it will likely use the event type triggers, so click botn the empty boxes like the post suggests.

Sorry Jos, just noticed these were 2 posters not just 1. Thanks for helping out.

Yes I read your post and clicked the both checkmark boxes but still had the same problem as @toppot. After I added the mentioned line about the legacy_entity_attributes, your (marvelous) template started working again. If I put this parameter on false again, the first step in the automation always result in a ā€œfalseā€.

I found this parameter Here. I first put all the parameters to ā€œtrueā€, so everything was working again and then set the parameter one by one to false again until the automation stopped working :slight_smile:

This is the relevant part of my current configuration.yaml

homeassistant:
  enabled: true
  experimental_event_entities: true
  legacy_action_sensor: true

and

advanced:
# ----
  homeassistant_legacy_entity_attributes: true
  homeassistant_legacy_triggers: false
  legacy_api: false
  legacy_availability_payload: false
# ---
  log_level: info

This is good info, thanks. Are you using a docker to host Z2M?

Because on mine, I seemed to only have to change the parameter I showed above in the UI to make mine work. I didnā€™t change the Add-on Configuration.yaml.
However if this works, it is indeed a good way to go.

Thanks again for contributing this.

I use the official HA add-on (and yes thatā€™s a docker container). Iā€™m using HA on HA-OS.

Same, but I think when you change the button in the UI, thatā€™s all you need. I didnā€™t have to change the config and there is no legacy attributes button in the UI that I changed anyway. Yes that condition is a legacy attribute.

I actually didnā€™t have any of these 4 legacy parameters in my config (nice find @jsuanet ) - and did set both the checkmarks in the UIā€¦

So probably a good idea to make this info/resolution part of the "how to get it fixed " post - and make it sticky :sunglasses:

(Running HA-OS virtualized in a HA (High Availability) environmentā€¦ thus with a LAN Zigbee adapterā€¦ and Z2M via the official repoā€¦)

After the conversation of yesterday I removed the extra parameters in the zigbee2mqtt, keep the two checkboxes checked and restarted HA and magically the template works, just as you described in your original post. The only thing what differs from my first attempt is the version number of the zigbee2mqqt add-on, this is now 2.0.0-2, but based on the information in the changelog I canā€™t explain the different behavior. But nevermind it is working :slight_smile:

And I did what you described, and mine still doesnā€™t workā€¦ Perhaps I should debug a bit whatā€™s going onā€¦ :man_shrugging:t3: