Address mypy errors

This commit is contained in:
Michael Hansen
2025-06-23 16:40:43 -05:00
parent 226f6c7ff5
commit d1d21b140b
3 changed files with 8 additions and 6 deletions

View File

@ -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())

View File

@ -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

View File

@ -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,
) )