Skip to content

Commit

Permalink
remove unused optional_ga_schema
Browse files Browse the repository at this point in the history
  • Loading branch information
farmio committed Jun 20, 2024
1 parent cfe0e22 commit 465b9eb
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions homeassistant/components/knx/storage/entity_store_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,26 +36,6 @@
)


def optional_ga_schema(
key: str, ga_selector: GASelector
) -> dict[vol.Marker, vol.Schema]:
"""Validate group address schema or remove key if no address is set."""
# frontend will return {key: {"write": None, "state": None}} for unused GA sets
# -> remove this entirely for optional keys
# if one GA is set, validate as usual
return {
vol.Optional(key): ga_selector,
vol.Remove(key): vol.Schema(
{
vol.Optional("write"): None,
vol.Optional("state"): None,
vol.Optional("passive"): vol.IsFalse(), # None or empty list
},
extra=vol.ALLOW_EXTRA,
),
}


SWITCH_SCHEMA = vol.Schema(
{
vol.Required("entity"): BASE_ENTITY_SCHEMA,
Expand Down

0 comments on commit 465b9eb

Please sign in to comment.