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.38k stars 30.64k forks source link

select_option seems to call the wrong entity #89998

Closed springfall2008 closed 1 year ago

springfall2008 commented 1 year ago

The problem

If I call the 'select_option' service on an entity it's calling the wrong entity. I am using:

entity_id: select.givtcp_sa2243g277_charge_start_time_slot_1

But if I place in invalid value (e.g. one outside the option list) and then run this service I get an error message indicating it's called 'select.givtcp_sa2243g277_charge_end_time_slot_1' instead.

As the error is inside Home Assistant and not in GivTCP itself I think it's a problem in the core or how it's been configured. I'm struggling to track the problem down.

Any suggestions would be helpful.

What version of Home Assistant Core has the issue?

core-2023.3.5

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

GivTCP

Link to integration documentation on our website

https://github.com/britkat1980/giv_tcp

Diagnostics information

The error:

Screenshot 2023-03-20 at 16 44 30

The original action:

Screenshot 2023-03-20 at 16 44 49

From core.entity_register

Screenshot 2023-03-20 at 16 48 54

Example YAML snippet

service: select.select_option
data:
  option: "bad"
target:
  entity_id: select.givtcp_sa2243g277_charge_start_time_slot_1
  device_id: f7085347e6fc63eb955131aee288b990

Anything in the logs that might be useful for us?

No response

Additional information

No response

elupus commented 1 year ago

You are targetting a device. It will likely call all select entites on that device. Remove device_id from your target specifikation.

springfall2008 commented 1 year ago

You are right, if I remove the device_id then it works! Wow, that's really not obvious from the GUI, sorry for being silly!