@@ -320,9 +320,9 @@ def get_device(self, device_sn: str, device_type: int) -> AbstractDevice|None:
320320 """Get the device class by serial number and device_type id."""
321321 match device_type :
322322 case Sph .DEVICE_TYPE_ID :
323- return Sph (device_sn )
323+ return Sph (self , device_sn )
324324 case Min .DEVICE_TYPE_ID :
325- return Min (device_sn )
325+ return Min (self , device_sn )
326326 case _:
327327 warnings .warn (f"Device for type id: { device_type } has not been implemented yet." , stacklevel = 2 )
328328 return None
@@ -524,7 +524,7 @@ def sph_detail(self, device_sn):
524524 requests.exceptions.RequestException: If there is an issue with the HTTP request.
525525
526526 """
527- return Sph (device_sn ).detail ()
527+ return Sph (self , device_sn ).detail ()
528528
529529 def sph_energy (self , device_sn ):
530530 """
@@ -541,7 +541,7 @@ def sph_energy(self, device_sn):
541541 requests.exceptions.RequestException: If there is an issue with the HTTP request.
542542
543543 """
544- return Sph (device_sn ).energy ()
544+ return Sph (self , device_sn ).energy ()
545545
546546 def sph_energy_history (self , device_sn , start_date = None , end_date = None , timezone = None , page = None , limit = None ):
547547 """
@@ -564,7 +564,7 @@ def sph_energy_history(self, device_sn, start_date=None, end_date=None, timezone
564564 requests.exceptions.RequestException: If there is an issue with the HTTP request.
565565
566566 """
567- return Sph (device_sn ).energy_history (start_date , end_date , timezone , page , limit )
567+ return Sph (self , device_sn ).energy_history (start_date , end_date , timezone , page , limit )
568568
569569 def sph_read_parameter (self , device_sn , parameter_id = None , start_address = None , end_address = None ):
570570 """
@@ -585,7 +585,7 @@ def sph_read_parameter(self, device_sn, parameter_id=None, start_address=None, e
585585 requests.exceptions.RequestException: If there is an issue with the HTTP request.
586586
587587 """
588- return Sph (device_sn ).read_parameter (parameter_id , start_address , end_address )
588+ return Sph (self , device_sn ).read_parameter (parameter_id , start_address , end_address )
589589
590590 def sph_write_parameter (self , device_sn , parameter_id , parameter_values = None ):
591591 """
@@ -607,7 +607,7 @@ def sph_write_parameter(self, device_sn, parameter_id, parameter_values=None):
607607 requests.exceptions.RequestException: If there is an issue with the HTTP request.
608608
609609 """
610- return Sph (device_sn ).write_parameter (parameter_id , parameter_values )
610+ return Sph (self , device_sn ).write_parameter (parameter_id , parameter_values )
611611
612612 def sph_write_ac_charge_times (self , device_sn , charge_power , charge_stop_soc , mains_enabled , periods ):
613613 """
@@ -647,7 +647,7 @@ def sph_write_ac_charge_times(self, device_sn, charge_power, charge_stop_soc, ma
647647 requests.exceptions.RequestException: If there is an issue with the HTTP request.
648648
649649 """
650- return Sph (device_sn ).write_ac_charge_times (charge_power , charge_stop_soc , mains_enabled , periods )
650+ return Sph (self , device_sn ).write_ac_charge_times (charge_power , charge_stop_soc , mains_enabled , periods )
651651
652652 def sph_write_ac_discharge_times (self , device_sn , discharge_power , discharge_stop_soc , periods ):
653653 """
@@ -685,7 +685,7 @@ def sph_write_ac_discharge_times(self, device_sn, discharge_power, discharge_sto
685685 requests.exceptions.RequestException: If there is an issue with the HTTP request.
686686
687687 """
688- return Sph (device_sn ).write_ac_discharge_times (discharge_power , discharge_stop_soc , periods )
688+ return Sph (self , device_sn ).write_ac_discharge_times (discharge_power , discharge_stop_soc , periods )
689689
690690 def sph_read_ac_charge_times (self , device_sn , settings_data = None ):
691691 """
@@ -729,7 +729,7 @@ def sph_read_ac_charge_times(self, device_sn, settings_data=None):
729729 requests.exceptions.RequestException: If there is an issue with the HTTP request.
730730
731731 """
732- return Sph (device_sn ).read_ac_charge_times (settings_data )
732+ return Sph (self , device_sn ).read_ac_charge_times (settings_data )
733733
734734 def sph_read_ac_discharge_times (self , device_sn , settings_data = None ):
735735 """
@@ -772,4 +772,4 @@ def sph_read_ac_discharge_times(self, device_sn, settings_data=None):
772772 requests.exceptions.RequestException: If there is an issue with the HTTP request.
773773
774774 """
775- return Sph (device_sn ).read_ac_discharge_times (device_sn , settings_data )
775+ return Sph (self , device_sn ).read_ac_discharge_times (device_sn , settings_data )
0 commit comments