Use class attribute instead of property decorator (#58448)

This commit is contained in:
Raman Gupta
2021-10-25 21:51:11 -04:00
committed by GitHub
parent e22aaea5b2
commit 207a5029e8

View File

@@ -27,6 +27,8 @@ EVENT_ALIVE = "alive"
class ZWaveBaseEntity(Entity):
"""Generic Entity Class for a Z-Wave Device."""
_attr_should_poll = False
def __init__(
self, config_entry: ConfigEntry, client: ZwaveClient, info: ZwaveDiscoveryInfo
) -> None:
@@ -243,8 +245,3 @@ class ZWaveBaseEntity(Entity):
):
self.watched_value_ids.add(return_value.value_id)
return return_value
@property
def should_poll(self) -> bool:
"""No polling needed."""
return False