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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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