mirror of
https://github.com/home-assistant/core.git
synced 2025-08-03 12:45:28 +02: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:
@@ -18,12 +18,14 @@ async def async_setup_entry(
|
||||
) -> None:
|
||||
"""Set up the Samsung TV from a config entry."""
|
||||
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):
|
||||
"""Device that sends commands to a SamsungTV."""
|
||||
|
||||
_attr_should_poll = False
|
||||
|
||||
async def async_turn_off(self, **kwargs: Any) -> None:
|
||||
"""Turn the device off."""
|
||||
await self._bridge.async_power_off()
|
||||
|
Reference in New Issue
Block a user