HA using for automation entity ID vs entity string? Some devices not showing / missing?!?

Yes, it is definitely ZHA integration issue, since Z2M is working fine and all their devices. Can you help me please? where in Githib to go and how to report the issue. Never done it but found online other people have had the same issue. Thanks

Do you have a link where you found otehr people having the same issue?

I think I was able to report the bug correctnly? I hope I put it into the correct place?

HA ZHA integration bug. When creating automations and selecting DEVICE, no devices are showing from ZHA. Z2M is fine. · Issue #96332 · home-assistant/core (github.com)

As far as other people issue, I think this is similar/same - Automations Unable to get ZHA Device. · Issue #89972 · home-assistant/core (github.com)

Yes, if other people have the issue, there’s no reason to create a new one. Just add your comments to the original.

OK, I commented on github, and waiting to see if is the same or different issue and what fix will be offered, or it will be a bug fix in future version. Thank you PEDRO for all your help!

Its definitely a bug. I only use ZHA so cant comment on Z2M, but I think I’ve proved the issue on the screenshots I posted on this thread:

Same problem here, can’t select ZHA devices anymore in automation trigger.

Why you closed the issue on github?

The original issue 89972 was closed, but the new one that was raised is still open.

You meant this one? Because I don’t have a log error and I am running on Home Assistant 2023.7.1

use a numeric state trigger instead (2 options above state in my screenshot).

not really.

it is a full-fledged member of the automation arsenal just as much as a device is.

and IMHO, it’s better to not use device triggers due to some inherent drawbacks when using them.

Namely, that when you use a device instead of a state if the device fails and needs replaced then there is no easy way to update the automations that use the old device id to use the new device id aside from going in to every automation and manually updating the device id to the new one. that’s because every device always gets unique id and can’t easily be changed by the user.

if you use an entity state then the target entity_id can be updated to use the same entity_id as the old one and then every place that entity_id is used just works.

it’s probably fine if nothing ever breaks or needs replaced for upgrades etc. tho.

and as you’ve found not every integration/device provides a “device” inside HA. in that case you have only one option and that’s to use an entity_id state/numeric_state etc.

what about buttons. Single/double/hold click. They dont have states. How would you do it there?

You could just use a state trigger, rather than a numeric state.

However, reagardless of whether or not its preferred to use or avoid devices, I would reiterate that this does look like a bug and should probably be fixed.

I should also note that this affects automation actions as well, not just triggers. The devices just don’t show up correctly.

1 Like

Yeah, since it was working before 2023.7 I see no reason why would not be working now. Hopefully this gets to the developers and gets fixed in 2023.7.2-3 :slight_smile:

buttons use events if they don’t have a device associated or if you don’t want to use a device trigger :wink:.

you can still use a state trigger for a button because the main state is a timestamp.

trigger:
  - platform: state
    entity_id: button.my_button

Ah ok. I was thinking of a real physical button and not a button entity.

and I think the OP was also based on:

1 Like

Yeah, those are probably ZHA events which would be an event trigger (I would guess), I use Z2M which is a diff event.

However events might be changing in the future to make them easier. So the trigger type may change to state if the current discussions are implemented. (event triggers will still work too)

Everyone, I had reported the issue and was told it will be fixed in 2023.7.3 so wait for it :slight_smile:

Unfortunately 2023.7.3 hasn’t fixed the device search issue.
When searching for the word ‘kitch’ I get this:

And the two suggested devices aren’t anything to do with my kitch(en).

However, if I simply type the letter ‘e’, I can see them:

UPDATE:- looks like the version targeting the fix is 2023.8