🧯 ZHA - Xiaomi Cube Controller

And the event log, due to new-user upload limits:
image

Are you using my blueprint? Those logbook entries don’t look familiar.

Also I recommend only the action mode for ZHA. The interview profile is too far off for the scene mode to be functional in ZHA. There is a link above to the zigpy issue asking for this to be fixed and I would appreciate everyone giving it a thumbs up or finding someone that can figure out how to change the interview for this cube. Scene mode on this cube is broken, and the action mode is handicapped with a couple of functions missing and a couple of others not available.

It really only works properly in Z2M.

Well, feeling dumb. User Error.

I was 100% using your blueprint at the end - but I had loaded at least 4-5 others during testing of various issues. Reloading my configs, issue resolved - yours fires events as set up.

The Logbook still only shows the “face any” event, but the correct changes occur.
image

As the docs say, you can add the template sensor and pull that sensor to the dashboard to see what the blueprint thinks is happening real time. It helps a lot when setting things up.

I can’t get tis working

template:

  • trigger:
    • platform: event
      event_type: cube_last_action
    • platform: event
      event_type: zha_cube_last_action
      sensor:
    • name: “Cube Last Action”
      unique_id: cubelastaction
      icon: mdi:eye-refresh-outline
      attributes:
      friendly_name: “Cube Action”
      state: >
      {{ trigger.event.data.friendly_name }} -
      {{ trigger.event.data.action }} -
      {{ trigger.event.data.side }} frm
      {{ trigger.event.data.last_side }}Preformatted text

state unavailable what do I need to do to fix this sensor code

Perhaps could you edit that for me do lit looks like it does on your screen?
It may be a matter of indenting or something.
How to help us help you - or How to ask a good question.

It should be looking exactly like this, and I’m thinking you have sensor: indented wrong.
HA_Blueprints/Samples/Cube_Last_Action_Template_Trigger_SAMPLE.yaml at c05d6fb431c1d84cb145c7d6dd5ffe5a60b1d9e2 · SirGoodenough/HA_Blueprints · GitHub.

thanks but I tried to put that code in my templates.yaml and got errors so I download your yaml file and uploaded it to home assistant folder it creates sensor but still says unavailable ill keep trying I would love this working maybe ive miss something

According to what you have above, you did not copy it correctly. The indentation is off, and this is very important.
See what mine in my working config file looks like:
Home-Assistant-Config/templates/trigger/ZHA Cube Last Action.yaml at d0068d87b4036406bb6a19d257bf6cf695331c85 · SirGoodenough/Home-Assistant-Config · GitHub.

I can’t help you id you don’t copy the stuff I give you correctly.

Just wanted to type out an appreciation for this helper/automation. Worked great, really enjoy.

Thank you for this.

1 Like