-
-
Notifications
You must be signed in to change notification settings - Fork 28.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correct referenced entities and devices for event triggers #76818
Conversation
Hey there @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration ( |
and isinstance(trigger_conf[CONF_EVENT_DATA][CONF_DEVICE_ID], str) | ||
): | ||
return [trigger_conf[CONF_EVENT_DATA][CONF_DEVICE_ID]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's a list, shouldn't we also return the list of device IDs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It cannot be a list :)
As in, an event cannot originate from multiple entities at the same time.
@@ -1103,6 +1103,24 @@ async def test_extraction_functions(hass): | |||
"event_type": "state_changed", | |||
"event_data": {"entity_id": "sensor.trigger_event"}, | |||
}, | |||
# entity_id is a list of strings (not supported) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not support it?
Proposed change
Correct referenced entities and devices for event triggers.
The filter for the
event_data
is not validated, so must check thatevent_data["entity_id"]
andevent_data["device_id"]
are strings.Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: