File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -301,6 +301,14 @@ def relay_config(self) -> RelayConfig:
301301 )
302302 raise NotImplementedError ()
303303
304+ @property
305+ @raise_not_loaded
306+ def relay_lock (self ) -> bool :
307+ """Relay value."""
308+ if NodeFeature .RELAY_LOCK not in self ._features :
309+ raise FeatureError (f"Relay lock is not supported for node { self .mac } " )
310+ raise NotImplementedError ()
311+
304312 @property
305313 @raise_not_loaded
306314 def switch (self ) -> bool :
@@ -766,7 +774,16 @@ async def set_relay(self, state: bool) -> bool:
766774 """Change the state of the relay."""
767775 if NodeFeature .RELAY not in self ._features :
768776 raise FeatureError (
769- f"Changing state of relay is not supported for node { self .mac } "
777+ f"Changing relay-lock is not supported for node { self .mac } "
778+ )
779+ raise NotImplementedError ()
780+
781+ @raise_not_loaded
782+ async def set_relay_lock (self , state : bool ) -> bool :
783+ """Change lock of the relay."""
784+ if NodeFeature .RELAY_LOCK not in self ._features :
785+ raise FeatureError (
786+ f"Changing relay-lock is not supported for node { self .mac } "
770787 )
771788 raise NotImplementedError ()
772789
You can’t perform that action at this time.
0 commit comments