mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 00:37:53 +00:00
Don't expose attribute option in state selector (#77347)
This commit is contained in:
parent
7fb9c4a37f
commit
dfc3e7d80f
@ -781,7 +781,6 @@ class StateSelectorConfig(TypedDict, total=False):
|
||||
"""Class to represent an state selector config."""
|
||||
|
||||
entity_id: str
|
||||
attribute: str
|
||||
|
||||
|
||||
@SELECTORS.register("state")
|
||||
@ -793,7 +792,11 @@ class StateSelector(Selector):
|
||||
CONFIG_SCHEMA = vol.Schema(
|
||||
{
|
||||
vol.Required("entity_id"): cv.entity_id,
|
||||
vol.Optional("attribute"): str,
|
||||
# The attribute to filter on, is currently deliberately not
|
||||
# configurable/exposed. We are considering separating state
|
||||
# selectors into two types: one for state and one for attribute.
|
||||
# Limiting the public use, prevents breaking changes in the future.
|
||||
# vol.Optional("attribute"): str,
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -322,11 +322,6 @@ def test_time_selector_schema(schema, valid_selections, invalid_selections):
|
||||
("on", "armed"),
|
||||
(None, True, 1),
|
||||
),
|
||||
(
|
||||
{"entity_id": "sensor.abc", "attribute": "device_class"},
|
||||
("temperature", "humidity"),
|
||||
(None,),
|
||||
),
|
||||
),
|
||||
)
|
||||
def test_state_selector_schema(schema, valid_selections, invalid_selections):
|
||||
|
Loading…
x
Reference in New Issue
Block a user