Make BaseCoordinatorEntity.should_poll a cached_property since it never changes (#121826)
This commit is contained in:
parent
cdb26ef8a3
commit
cdf7ecebc0
1 changed files with 2 additions and 1 deletions
|
@ -6,6 +6,7 @@ from abc import abstractmethod
|
|||
import asyncio
|
||||
from collections.abc import Awaitable, Callable, Coroutine, Generator
|
||||
from datetime import datetime, timedelta
|
||||
from functools import cached_property
|
||||
import logging
|
||||
from random import randint
|
||||
from time import monotonic
|
||||
|
@ -471,7 +472,7 @@ class BaseCoordinatorEntity[
|
|||
self.coordinator = coordinator
|
||||
self.coordinator_context = context
|
||||
|
||||
@property
|
||||
@cached_property
|
||||
def should_poll(self) -> bool:
|
||||
"""No need to poll. Coordinator notifies entity of updates."""
|
||||
return False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue