Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions homeassistant/components/weatherflow_cloud/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,10 @@ def _create_listen_message(self, device_id: int) -> RapidWindListenStartMessage:
"""Create rapid wind listen message."""
return RapidWindListenStartMessage(device_id=str(device_id))

async def _handle_websocket_message(self, data: RapidWindWS) -> None:
async def _handle_websocket_message(self, data: RapidWindWS | None) -> None:
"""Handle rapid wind websocket data."""
if data is None:
return
Comment thread
frenck marked this conversation as resolved.
device_id = data.device_id
station_id = self.device_to_station_map[device_id]

Expand All @@ -202,8 +204,12 @@ def _create_listen_message(self, device_id: int) -> ListenStartMessage:
"""Create observation listen message."""
return ListenStartMessage(device_id=str(device_id))

async def _handle_websocket_message(self, data: ObservationTempestWS) -> None:
async def _handle_websocket_message(
self, data: ObservationTempestWS | None
) -> None:
"""Handle observation websocket data."""
if data is None:
return
device_id = data.device_id
station_id = self.device_to_station_map[device_id]

Expand Down