mirror of
https://github.com/home-assistant/core.git
synced 2025-06-25 01:21:51 +02:00
Address mypy errors
This commit is contained in:
@ -739,7 +739,7 @@ class WyomingAssistSatellite(WyomingSatelliteEntity, AssistSatelliteEntity):
|
||||
timestamp=timestamp,
|
||||
)
|
||||
await self._client.write_event(chunk.event())
|
||||
timestamp += chunk.seconds
|
||||
timestamp += chunk.milliseconds
|
||||
total_seconds += chunk.seconds
|
||||
|
||||
await self._client.write_event(AudioStop(timestamp=timestamp).event())
|
||||
|
@ -149,21 +149,21 @@ class WyomingConversationEntity(
|
||||
not_recognized = NotRecognized.from_event(event)
|
||||
intent_response.async_set_error(
|
||||
intent.IntentResponseErrorCode.NO_INTENT_MATCH,
|
||||
not_recognized.text,
|
||||
not_recognized.text or "",
|
||||
)
|
||||
break
|
||||
|
||||
if Handled.is_type(event.type):
|
||||
# Success
|
||||
handled = Handled.from_event(event)
|
||||
intent_response.async_set_speech(handled.text)
|
||||
intent_response.async_set_speech(handled.text or "")
|
||||
break
|
||||
|
||||
if NotHandled.is_type(event.type):
|
||||
not_handled = NotHandled.from_event(event)
|
||||
intent_response.async_set_error(
|
||||
intent.IntentResponseErrorCode.FAILED_TO_HANDLE,
|
||||
not_handled.text,
|
||||
not_handled.text or "",
|
||||
)
|
||||
break
|
||||
|
||||
|
@ -147,8 +147,10 @@ class WyomingWakeWordProvider(wake_word.WakeWordDetectionEntity):
|
||||
queued_audio = [audio_task.result()]
|
||||
|
||||
return wake_word.DetectionResult(
|
||||
wake_word_id=detection.name,
|
||||
wake_word_phrase=self._get_phrase(detection.name),
|
||||
wake_word_id=detection.name or "",
|
||||
wake_word_phrase=self._get_phrase(
|
||||
detection.name or ""
|
||||
),
|
||||
timestamp=detection.timestamp,
|
||||
queued_audio=queued_audio,
|
||||
)
|
||||
|
Reference in New Issue
Block a user