Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cdce8p committed Dec 11, 2024
1 parent 96a6836 commit 9d93d15
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion homeassistant/components/axis/hub/event_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def _mqtt_message(self, message: ReceiveMessage) -> None:
if message.topic.endswith("event/connection"):
return

event = mqtt_json_to_event(message.payload)
event = mqtt_json_to_event(message.payload) # type: ignore[arg-type]
self.api.event.handler(event)

@callback
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/image/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ async def _write_frame() -> bool:
# While this results in additional bandwidth usage,
# given the low frequency of image updates, it is acceptable.
frame.extend(frame)
await response.write(frame)
await response.write(frame) # type: ignore[arg-type]
return True

event = asyncio.Event()
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/mqtt/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@

type SocketType = socket.socket | ssl.SSLSocket | mqtt.WebsocketWrapper | Any

type SubscribePayloadType = str | bytes # Only bytes if encoding is None
type SubscribePayloadType = str | bytes | bytearray # Only bytes if encoding is None


def publish(
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/mqtt/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class MqttSwitch(MqttEntity, SwitchEntity, RestoreEntity):
_entity_id_format = switch.ENTITY_ID_FORMAT

_optimistic: bool
_is_on_map: dict[str | bytes, bool | None]
_is_on_map: dict[str | bytes | bytearray, bool | None]
_command_template: Callable[[PublishPayloadType], PublishPayloadType]
_value_template: Callable[[ReceivePayloadType], ReceivePayloadType]

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/helpers/service_info/mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from homeassistant.data_entry_flow import BaseServiceInfo

type ReceivePayloadType = str | bytes
type ReceivePayloadType = str | bytes | bytearray


@dataclass(slots=True)
Expand Down

0 comments on commit 9d93d15

Please sign in to comment.