3030import zmq
3131
3232from .constants import CONNECTION_PUB_URL , BAD_CHARS
33- from .action_station import ActionStation
3433from .iotcontrol .alarm import Alarm
3534from .iotcontrol .device_view import DeviceView
3635from .iotcontrol .enums import ControlName
@@ -575,8 +574,6 @@ def register_connection(self, connection):
575574 self .connections_list .append (connection .zmq_connection_uuid )
576575 self .rx_zmq_sub .connect (CONNECTION_PUB_URL .format (id = connection .zmq_connection_uuid ))
577576 connection .rx_zmq_sub .connect (CONNECTION_PUB_URL .format (id = self .zmq_connection_uuid ))
578- if self ._add_actions :
579- self .action_station .register_connection (connection )
580577
581578 def de_register_connection (self , connection ):
582579 """Connections unregistered here"""
@@ -585,16 +582,12 @@ def de_register_connection(self, connection):
585582 self .connections_list .remove (connection .zmq_connection_uuid )
586583 self .rx_zmq_sub .disconnect (CONNECTION_PUB_URL .format (id = connection .zmq_connection_uuid ))
587584 connection .rx_zmq_sub .disconnect (CONNECTION_PUB_URL .format (id = self .zmq_connection_uuid ))
588- if self ._add_actions :
589- self .action_station .register_connection (connection )
590- self .action_station .de_register_connection (connection )
591585
592586 def __init__ (
593587 self ,
594588 device_type : str ,
595589 device_id : str ,
596590 device_name : str ,
597- add_actions : bool = False ,
598591 cfg_dict : dict | None = None ,
599592 context : zmq .Context | None = None
600593 ) -> None :
@@ -610,8 +603,6 @@ def __init__(
610603 The name for this device
611604 cfg_dict : dict optional
612605 Setup dict to cfgRev and adds controls defined in cfg_dict, defaults None
613- add_actions : boolean
614- To include actions or not, defaults false
615606 context : optional
616607 ZMQ context. Defaults to None.
617608 """
@@ -649,12 +640,6 @@ def __init__(
649640 self .add_all_c64_controls (cfg_dict )
650641 self .use_cfg64 ()
651642
652- self ._add_actions = add_actions
653- if self ._add_actions :
654- self ._add_action_device_setup (True )
655- self .action_station = ActionStation (self , context = self .context )
656- time .sleep (0.5 )
657- self .action_station .device_zmq_sub .connect (CONNECTION_PUB_URL .format (id = self .zmq_connection_uuid ))
658643 self .running = True
659644 time .sleep (0.5 )
660645 self .start ()
@@ -724,8 +709,6 @@ def device_name(self, val: str):
724709
725710 def close (self ):
726711 """Close the device"""
727- if self ._add_actions :
728- self .action_station .close ()
729712 self .running = False
730713
731714 def _local_command (self , msg_dict ):
0 commit comments