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