mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Use class attribute instead of property decorator (#58448)
This commit is contained in:
parent
e22aaea5b2
commit
207a5029e8
@ -27,6 +27,8 @@ EVENT_ALIVE = "alive"
|
|||||||
class ZWaveBaseEntity(Entity):
|
class ZWaveBaseEntity(Entity):
|
||||||
"""Generic Entity Class for a Z-Wave Device."""
|
"""Generic Entity Class for a Z-Wave Device."""
|
||||||
|
|
||||||
|
_attr_should_poll = False
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, config_entry: ConfigEntry, client: ZwaveClient, info: ZwaveDiscoveryInfo
|
self, config_entry: ConfigEntry, client: ZwaveClient, info: ZwaveDiscoveryInfo
|
||||||
) -> None:
|
) -> None:
|
||||||
@ -243,8 +245,3 @@ class ZWaveBaseEntity(Entity):
|
|||||||
):
|
):
|
||||||
self.watched_value_ids.add(return_value.value_id)
|
self.watched_value_ids.add(return_value.value_id)
|
||||||
return return_value
|
return return_value
|
||||||
|
|
||||||
@property
|
|
||||||
def should_poll(self) -> bool:
|
|
||||||
"""No polling needed."""
|
|
||||||
return False
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user