mirror of
https://github.com/home-assistant/core.git
synced 2025-09-05 21:01:37 +02:00
Change Snoo to use MQTT instead of PubNub (#150570)
This commit is contained in:
@@ -40,7 +40,7 @@ class SnooCoordinator(DataUpdateCoordinator[SnooData]):
|
||||
|
||||
async def setup(self) -> None:
|
||||
"""Perform setup needed on every coordintaor creation."""
|
||||
await self.snoo.subscribe(self.device, self.async_set_updated_data)
|
||||
self.snoo.start_subscribe(self.device, self.async_set_updated_data)
|
||||
# After we subscribe - get the status so that we have something to start with.
|
||||
# We only need to do this once. The device will auto update otherwise.
|
||||
await self.snoo.get_status(self.device)
|
||||
|
@@ -48,7 +48,7 @@ def find_update_callback(
|
||||
mock: AsyncMock, serial_number: str
|
||||
) -> Callable[[SnooData], Awaitable[None]]:
|
||||
"""Find the update callback for a specific identifier."""
|
||||
for call in mock.subscribe.call_args_list:
|
||||
for call in mock.start_subscribe.call_args_list:
|
||||
if call[0][0].serialNumber == serial_number:
|
||||
return call[0][1]
|
||||
pytest.fail(f"Callback for identifier {serial_number} not found")
|
||||
|
Reference in New Issue
Block a user