From 465b9eb6d5cc821d5b02d535e0aec1a2585d06dd Mon Sep 17 00:00:00 2001 From: farmio Date: Sat, 18 May 2024 11:19:57 +0200 Subject: [PATCH] remove unused optional_ga_schema --- .../knx/storage/entity_store_schema.py | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/homeassistant/components/knx/storage/entity_store_schema.py b/homeassistant/components/knx/storage/entity_store_schema.py index 28ba3e97347756..978d4616868fcf 100644 --- a/homeassistant/components/knx/storage/entity_store_schema.py +++ b/homeassistant/components/knx/storage/entity_store_schema.py @@ -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,