mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Avoid linear search of MQTT SUPPORTED_COMPONENTS (#99459)
By making this a set we avoid the linear search in async_discovery_message_received
This commit is contained in:
parent
cf59ea3c47
commit
09f45660cf
@ -48,7 +48,7 @@ TOPIC_MATCHER = re.compile(
|
|||||||
r"?(?P<object_id>[a-zA-Z0-9_-]+)/config"
|
r"?(?P<object_id>[a-zA-Z0-9_-]+)/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
SUPPORTED_COMPONENTS = [
|
SUPPORTED_COMPONENTS = {
|
||||||
"alarm_control_panel",
|
"alarm_control_panel",
|
||||||
"binary_sensor",
|
"binary_sensor",
|
||||||
"button",
|
"button",
|
||||||
@ -75,7 +75,7 @@ SUPPORTED_COMPONENTS = [
|
|||||||
"update",
|
"update",
|
||||||
"vacuum",
|
"vacuum",
|
||||||
"water_heater",
|
"water_heater",
|
||||||
]
|
}
|
||||||
|
|
||||||
MQTT_DISCOVERY_UPDATED = "mqtt_discovery_updated_{}"
|
MQTT_DISCOVERY_UPDATED = "mqtt_discovery_updated_{}"
|
||||||
MQTT_DISCOVERY_NEW = "mqtt_discovery_new_{}_{}"
|
MQTT_DISCOVERY_NEW = "mqtt_discovery_new_{}_{}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user