mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Disable polling for samsungtv remote entities (#93650)
These entities do not have a defined state, there is no reason to poll
This commit is contained in:
parent
460d04fc07
commit
a56b5994e5
@ -18,12 +18,14 @@ async def async_setup_entry(
|
|||||||
) -> None:
|
) -> None:
|
||||||
"""Set up the Samsung TV from a config entry."""
|
"""Set up the Samsung TV from a config entry."""
|
||||||
bridge = hass.data[DOMAIN][entry.entry_id]
|
bridge = hass.data[DOMAIN][entry.entry_id]
|
||||||
async_add_entities([SamsungTVRemote(bridge=bridge, config_entry=entry)], True)
|
async_add_entities([SamsungTVRemote(bridge=bridge, config_entry=entry)])
|
||||||
|
|
||||||
|
|
||||||
class SamsungTVRemote(SamsungTVEntity, RemoteEntity):
|
class SamsungTVRemote(SamsungTVEntity, RemoteEntity):
|
||||||
"""Device that sends commands to a SamsungTV."""
|
"""Device that sends commands to a SamsungTV."""
|
||||||
|
|
||||||
|
_attr_should_poll = False
|
||||||
|
|
||||||
async def async_turn_off(self, **kwargs: Any) -> None:
|
async def async_turn_off(self, **kwargs: Any) -> None:
|
||||||
"""Turn the device off."""
|
"""Turn the device off."""
|
||||||
await self._bridge.async_power_off()
|
await self._bridge.async_power_off()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user