Remove unnecessary should poll from sensor classes (#41219)

* Remove unnecessary should poll from sensor classes

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

View File

@ -169,14 +169,6 @@ class FinTsAccount(Entity):
self._balance: float = None
self._currency: str = None
@property
def should_poll(self) -> bool:
"""Return True.
Data needs to be polled from the bank servers.
"""
return True
def update(self) -> None:
"""Get the current balance and currency for the account."""
bank = self._client.client
@ -229,14 +221,6 @@ class FinTsHoldingsAccount(Entity):
self._holdings = []
self._total: float = None
@property
def should_poll(self) -> bool:
"""Return True.
Data needs to be polled from the bank servers.
"""
return True
def update(self) -> None:
"""Get the current holdings for the account."""
bank = self._client.client

View File

@ -174,11 +174,6 @@ class HistoryStatsSensor(Entity):
"""Return the unit the value is expressed in."""
return self._unit_of_measurement
@property
def should_poll(self):
"""Return the polling state."""
return True
@property
def device_state_attributes(self):
"""Return the state attributes of the sensor."""

View File

@ -224,11 +224,6 @@ class InfluxSensor(Entity):
"""Return the unit of measurement of this entity, if any."""
return self._unit_of_measurement
@property
def should_poll(self):
"""Return the polling state."""
return True
def update(self):
"""Get the latest data from Influxdb and updates the states."""
self.data.update()

View File

@ -77,11 +77,6 @@ class SkybellDevice(Entity):
"""Initialize a sensor for Skybell device."""
self._device = device
@property
def should_poll(self):
"""Return the polling state."""
return True
def update(self):
"""Update automation state."""
self._device.refresh()

View File

@ -72,11 +72,6 @@ class TwitchSensor(Entity):
self._follow = None
self._statistics = None
@property
def should_poll(self):
"""Device should be polled."""
return True
@property
def name(self):
"""Return the name of the sensor."""

View File

@ -227,11 +227,6 @@ class WirelessTagBaseSensor(Entity):
self._name = self._tag.name
self._state = None
@property
def should_poll(self):
"""Return the polling state."""
return True
@property
def name(self):
"""Return the name of the sensor."""

View File

@ -174,11 +174,6 @@ class XiaomiAirQualityMonitor(Entity):
ATTR_MODEL: self._model,
}
@property
def should_poll(self):
"""Poll the miio device."""
return True
@property
def unique_id(self):
"""Return an unique ID."""