home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.93k stars 30.99k forks source link

Hue entities with labels aren't running the requested service from automations or dev tab when selected with label_id #123837

Closed VNRARA closed 1 month ago

VNRARA commented 3 months ago

The problem

Some entities with labels aren't running the requested service from automations or dev tab when selected with label_id. Example: I've labeled 4 motions switches from HUE with the label "motionsensor". I create a automation, script or use devtools to trigger based on that label, the switches stay off. Manually switching works fine. So targeting the entities as label_id doesn't work. Targeting them as "entity_id" does work.

I've tested with non-Hue switches as well. Same issue so it's not HUE I believe.

What version of Home Assistant Core has the issue?

2024.8.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

labels

Link to integration documentation on our website

https://www.home-assistant.io/docs/organizing/labels/

Diagnostics information

No response

Example YAML snippet

action: switch.turn_on
data: {}
target:
  label_id: motionsensor

Anything in the logs that might be useful for us?

Logs don't show anything specific.

Additional information

No response

mib1185 commented 3 months ago

Hi @VNRARA

i've tried to reproduce the issue, but for me it works as expected

label image

entitities image

performed action

state before action performed image

perform action

action: switch.turn_off
target:
  label_id: switches
data: {}

result image


Please provide more details about the switch entities, how they are labled and the label itself - with this I might be able to reproduce your issue, thx :+1:

VNRARA commented 3 months ago

Try Hue's motion sensor enable/disable switch. I'll amend this comment with more later:

To add to this; the label icon <> also doesn't split the label to the correct entities when clicked. It just disappears. image

Tried it with a fresh instance and I have the same issues.

VNRARA commented 3 months ago

Anywhere I could look deeper for logs to find what's going on??

mib1185 commented 2 months ago

please provide the output of following template

label_devices: {{label_devices('motionsensor')}}
label_entities: {{label_entities('motionsensor')}}
VNRARA commented 2 months ago

please provide the output of following template

label_devices: {{label_devices('motionsensor')}}
label_entities: {{label_entities('motionsensor')}}

label_devices: [] label_entities: ['switch.voordeursensor_motion', 'switch.kaksensor_motion', 'switch.keukensensor_motion', 'switch.schoenenkastsensor_motion', 'switch.voordeursensor_illuminance', 'switch.kaksensor_illuminance', 'switch.keukensensor_illuminance']

mib1185 commented 2 months ago

i still can't reproduce your issue - even the part about the split by clicking on <> is working. Further without any logs or error messages it is hard to find out what's happen. You can try to create a small script with just the switch.turn_on action and the label selected, ensure that all related switch entities are in state off, than run this script and check the trace of it.

VNRARA commented 2 months ago

I haven't had confirmation that you tried the aformentioned HUE products so I'm going to try to find something else that can do the SWITCH. domain

Core works, but the integrations I am using may be plagued with the issue I'm currently experiencing. Using the label_id with a template switch works just fine but HUE for example doesn't. That would mean that lots of the integrations like HUE aren't properly coded to take advantage of the new label_id as a target.

bpottle1 commented 2 months ago

I'm having the same or similar issue. I am trying to run an automation with a Number:Set action and using a label as the target ID is not working to trigger the entities. The entities are from a zigbee2mqtt device, if that makes a difference. I'm happy to help troubleshoot however I need to, but just not sure where to start.

issue-triage-workflows[bot] commented 2 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

VNRARA commented 2 months ago

unstale pls

issue-triage-workflows[bot] commented 1 month ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

VNRARA commented 1 month ago

Don't close pls