Remove unnecessary should poll from switch classes (#41218)

This commit is contained in:
springstan 2020-10-04 21:31:02 +02:00 committed by GitHub
parent f17089e46e
commit e51be33e18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 0 additions and 35 deletions

View File

@ -66,11 +66,6 @@ class PwrCtrlSwitch(SwitchEntity):
self._port = port
self._parent_device = parent_device
@property
def should_poll(self):
"""Return the polling state."""
return True
@property
def unique_id(self):
"""Return the unique ID of the device."""

View File

@ -95,11 +95,6 @@ class DINRelay(SwitchEntity):
"""Return true if relay is on."""
return self._state
@property
def should_poll(self):
"""Return the polling state."""
return True
def turn_on(self, **kwargs):
"""Instruct the relay to turn on."""
self._outlet.on()

View File

@ -68,11 +68,6 @@ class HikvisionMotionSwitch(SwitchEntity):
self._hikvision_cam = hikvision_cam
self._state = STATE_OFF
@property
def should_poll(self):
"""Poll for status regularly."""
return True
@property
def name(self):
"""Return the name of the device if any."""

View File

@ -94,11 +94,6 @@ class KankunSwitch(SwitchEntity):
except requests.RequestException:
_LOGGER.error("State query failed")
@property
def should_poll(self):
"""Return the polling state."""
return True
@property
def name(self):
"""Return the name of the switch."""

View File

@ -69,11 +69,6 @@ class MfiSwitch(SwitchEntity):
self._port = port
self._target_state = None
@property
def should_poll(self):
"""Return the polling state."""
return True
@property
def unique_id(self):
"""Return the unique ID of the device."""

View File

@ -73,11 +73,6 @@ class S20Switch(SwitchEntity):
self._state = False
self._exc = S20Exception
@property
def should_poll(self):
"""Return the polling state."""
return True
@property
def name(self):
"""Return the name of the switch."""

View File

@ -235,11 +235,6 @@ class XiaomiPlugGenericSwitch(SwitchEntity):
self._device_features = FEATURE_FLAGS_GENERIC
self._skip_update = False
@property
def should_poll(self):
"""Poll the plug."""
return True
@property
def unique_id(self):
"""Return an unique ID."""