Merge branch 'main' into beta
This commit is contained in:
1 file changed
+12
-1
@@ -35,7 +35,6 @@ from aioesphomeapi.api_pb2 import ( # type: ignore[attr-defined]
|
|||||||
AuthenticationRequest,
|
AuthenticationRequest,
|
||||||
)
|
)
|
||||||
from aioesphomeapi.core import MESSAGE_TYPE_TO_PROTO
|
from aioesphomeapi.core import MESSAGE_TYPE_TO_PROTO
|
||||||
|
|
||||||
from aioesphomeapi.model import (
|
from aioesphomeapi.model import (
|
||||||
VoiceAssistantEventType,
|
VoiceAssistantEventType,
|
||||||
VoiceAssistantFeature,
|
VoiceAssistantFeature,
|
||||||
@@ -577,3 +576,15 @@ class VoiceSatelliteProtocol(APIServer):
|
|||||||
trained_languages=external_wake_word.trained_languages,
|
trained_languages=external_wake_word.trained_languages,
|
||||||
wake_word_path=config_path,
|
wake_word_path=config_path,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def process_packet(self, msg_type: int, packet_data: bytes) -> None:
|
||||||
|
super().process_packet(msg_type, packet_data)
|
||||||
|
|
||||||
|
if msg_type == PROTO_TO_MESSAGE_TYPE[AuthenticationRequest]:
|
||||||
|
self.state.connected = True
|
||||||
|
# Send states after connect
|
||||||
|
states = []
|
||||||
|
for entity in self.state.entities:
|
||||||
|
states.extend(entity.handle_message(SubscribeHomeAssistantStatesRequest()))
|
||||||
|
self.send_messages(states)
|
||||||
|
_LOGGER.debug("Sent entity states after connect")
|
||||||
Reference in new issue
Block a user