File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3434STICK_TIME_OUT : Final = 11 # Stick responds with timeout messages within 10s.
3535NODE_TIME_OUT : Final = 15 # In bigger networks a response from a node could take up a while, so lets use 15 seconds.
3636MAX_RETRIES : Final = 3
37+ SUPPRESS_INITIALIZATION_WARNINGS : Final = 10 # Minutes to suppress (expected) communication warning messages after initialization
3738
3839# plugwise year information is offset from y2k
3940PLUGWISE_EPOCH : Final = 2000
Original file line number Diff line number Diff line change 2020 RelayState ,
2121)
2222from ..connection import StickController
23- from ..constants import UTF8 , MotionSensitivity
23+ from ..constants import SUPPRESS_INITIALIZATION_WARNINGS , UTF8 , MotionSensitivity
2424from ..exceptions import NodeError
2525from ..messages .requests import NodeInfoRequest , NodePingRequest
2626from ..messages .responses import NodeInfoResponse , NodePingResponse
@@ -79,6 +79,7 @@ def __init__(
7979
8080 self ._connected : bool = False
8181 self ._initialized : bool = False
82+ self ._initialization_delay_expired : datetime | None = None
8283 self ._loaded : bool = False
8384 self ._node_protocols : SupportedVersions | None = None
8485 self ._node_last_online : datetime | None = None
@@ -412,6 +413,7 @@ async def initialize(self) -> bool:
412413 """Initialize node."""
413414 if self ._initialized :
414415 return True
416+ self ._initialization_delay_expired = datetime .now (UTC ) + timedelta (minutes = SUPPRESS_INITIALIZATION_WARNINGS )
415417 self ._initialized = True
416418 return True
417419
You can’t perform that action at this time.
0 commit comments