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

I have some automaions in HA and until now I have usually used the UI and when I click device I select it. In YAML I see the entity ID, so far so good. However, recently when I try to make an automation, I select device and start typing but cant find a device I need. I tried looking to YAML and I see now strings for other automatons.!


I use add trigger → device

Why are some of my devices not showing and how to prevent using the string, I want the actuall entity ID of the device. Thanks

1 Like

for triggers use a state trigger instead of using a device trigger.

bottom of list here:

image

the same for conditions - use a state condition:

image

For services use the call service option instead of the device option:

image

1 Like

Yes, with a state works, it is kind of work-around. But with devce does not work, why? Also, some entities dont work with state. Like my luminance sensor, when I put state it show rather than device, it does not show the above/below states for luminance level.


It’s not a work around. Most of home assistant uses entities, not devices. Devices are new and very limited. Entities are old and have no limitations. I suggest you start getting comfortable using state triggers over device triggers. Keep in mind that YAML only integrations will not create devices, they only create entities, so you’ll have to use state triggers for those cases anyways.

2 Likes

Thank you. But I have some similar but not exact issue here: HA automations bug, does not show devices in automations, any fix? - Configuration / Zigbee - Home Assistant Community (home-assistant.io)

Device and state does not provide the same options. And with device some devices stopped showing. Before it used to work. Is this new bug in the newest version of HA? Thanks

I’m not sure, I don’t use device triggers.

No they don’t but you can use any other trigger to get the job done. Device triggers are beginners tools to get started. They can do a few things, but are limited in functionality.

All other triggers can do anything, you just need to find the trigger you’re looking for.

I am pretty new to HA, using it for past 6-7 moths. I have lots of devices that are sensors and I always use them as triggers. Like contact sensor open/close, or motion sensor detecting motion, or in this case I have condition for lumens below 35 lux… so I find it a bummer such bug exist now. I am sure it was working fine few HA versions ago… Where can I report it to the people that are fixing bugs? So hopefully they can fix it soon. Thanks a lot!

From what I can tell, it’s still working. So it’s most likely an issue with your device.

and as a condition below 35 lux is simply a numerical state condition.

condition: numeric_state
entity_id: sensor.xyz
below: 35

Notice how it doesn’t need a device, it’s more concise and to the point? All you need to do is find the entity_id. It’s less clicking in the UI.

OK I will try this, but I try not to make automations with YAML only to check it from time to time, as visual editor is easier and less pron to mistakes as syntax. Thank you for your help. I wish I knew where to report this a as I bug.

You don’t need to use yaml… Just use the items in the list… Remove your blinders, stop looking at the device conditions and triggers, read the other conditions and triggers.


You can check the yaml after you fill out the condition

1 Like

I guess this is the workaround you are offering with a number state? It should work, yes?

Okay, thank you. This is something new I learned today from you and I will definitely be using it. But I still hope they fix the missing devices :slight_smile: I guess there are multiple way to do the same automations. Thanks again PETRO!

1 Like

Again, this is most likely an issue with your devices. Verify they are available and working.

I can confirm there is no issue with my devices. I checked preveouse automations I had created and “livingroom corner motion sensor” it was showing and is currenly added in the automation. But now if I want to add it again, is not showing. Check the screenshot. This is the way I have always created my automation until now, so I am 99% sure it is a bug from a recent versions. I hope this helps!

Previous automations already are built, they will show what was originally configured. When you’re making a new automation it searches your current devices and exposes them. I.e. look at your current device and make sure it’s working. Do not check it via automations.

I have multiple sensor (lumens, motion, contact sensor, water leak and etc.) I have both ZHA and Zigbee2mqtt. All devices that are connected to my ZHA are not showing and all devices connected to Zigbee2MQTT are showing (in automations). When I check them directly, they are all working and showing correctly. Even previous automations are working both ZHA and Z2Q.

Then it sounds like you’ve hit a bug with ZHA devices, I recommend reporting it on github so the developers know there’s an issue.

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)