Improve Sonos polling (#51170)
* Improve Sonos polling Warn user if polling is being used Provide callback IP:port to help user fix networking Fix radio handling when polling (no event payload) Clarify dispatch target to reflect polling action * Lint * Revert method removal
This commit is contained in:
parent
e45196f9c9
commit
39e62f9c90
7 changed files with 35 additions and 17 deletions
|
@ -1,7 +1,6 @@
|
|||
"""Entity representing a Sonos battery level."""
|
||||
from __future__ import annotations
|
||||
|
||||
import datetime
|
||||
import logging
|
||||
|
||||
from homeassistant.components.sensor import SensorEntity
|
||||
|
@ -50,7 +49,7 @@ class SonosBatteryEntity(SonosEntity, SensorEntity):
|
|||
"""Get the unit of measurement."""
|
||||
return PERCENTAGE
|
||||
|
||||
async def async_update(self, now: datetime.datetime | None = None) -> None:
|
||||
async def async_update(self) -> None:
|
||||
"""Poll the device for the current state."""
|
||||
await self.speaker.async_poll_battery()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue