@@ -627,7 +627,8 @@ def process_pv_topic(self, msg: mqtt.MQTTMessage):
627627 elif subdata .SubData .pv_data .get (f"pv{ get_index (msg .topic )} " ):
628628 if "/get/fault_state" in msg .topic :
629629 self ._validate_value (msg , int , [(0 , 2 )])
630- elif "/get/fault_str" in msg .topic :
630+ elif ("/get/fault_str" in msg .topic or
631+ "/get/serial_number" in msg .topic ):
631632 self ._validate_value (msg , str )
632633 elif ("/get/daily_exported" in msg .topic or
633634 "/get/monthly_exported" in msg .topic or
@@ -696,7 +697,8 @@ def process_bat_topic(self, msg: mqtt.MQTTMessage):
696697 self ._validate_value (msg , float , [(0 , 100 )])
697698 elif "/get/fault_state" in msg .topic :
698699 self ._validate_value (msg , int , [(0 , 2 )])
699- elif "/get/fault_str" in msg .topic :
700+ elif ("/get/fault_str" in msg .topicc or
701+ "/get/serial_number" in msg .topic ):
700702 self ._validate_value (msg , str )
701703 elif "/set/power_limit_controllable" in msg .topic :
702704 self ._validate_value (msg , bool )
0 commit comments