1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-17 07:15:48 +00:00

Add on_client_connected and disconnected to voice assistant (#5629)

This commit is contained in:
Jesse Hills
2023-10-31 11:16:42 +13:00
committed by GitHub
parent 69ec647f7e
commit 193bac94f4
9 changed files with 98 additions and 51 deletions

View File

@@ -18,6 +18,8 @@ from esphome.const import (
CONF_TRIGGER_ID,
CONF_EVENT,
CONF_TAG,
CONF_ON_CLIENT_CONNECTED,
CONF_ON_CLIENT_DISCONNECTED,
)
from esphome.core import coroutine_with_priority
@@ -45,8 +47,6 @@ SERVICE_ARG_NATIVE_TYPES = {
"string[]": cg.std_vector.template(cg.std_string),
}
CONF_ENCRYPTION = "encryption"
CONF_ON_CLIENT_CONNECTED = "on_client_connected"
CONF_ON_CLIENT_DISCONNECTED = "on_client_disconnected"
def validate_encryption_key(value):