@@ -17,13 +17,13 @@ def __init__(self,
1717 name : str ,
1818 type : str ,
1919 hostname : str = "localhost" ,
20- parent_id : Optional [int ] = None ,
20+ hierarchy_id : Optional [int ] = None ,
2121 parent_hostname : Optional [str ] = None ) -> None :
2222 self .id = id
2323 self .name = name
2424 self .type = type
2525 self .hostname = hostname
26- self .parent_id = parent_id
26+ self .hierarchy_id = hierarchy_id
2727 self .parent_hostname = parent_hostname
2828
2929 @staticmethod
@@ -57,12 +57,11 @@ def store_error(self) -> None:
5757 topic_prefix = f"openWB/set/{ topic } /{ self .component_info .id } "
5858 pub .Pub ().pub (f"{ topic_prefix } /get/fault_str" , self .fault_str )
5959 pub .Pub ().pub (f"{ topic_prefix } /get/fault_state" , self .fault_state .value )
60- if (self .component_info .parent_hostname and
61- self .component_info .parent_hostname != self .component_info .hostname ):
62- pub .pub_single (f"openWB/set/{ topic } /{ self .component_info .parent_id } /get/fault_str" ,
63- self .fault_str , hostname = self .component_info .parent_hostname )
64- pub .pub_single (f"openWB/set/{ topic } /{ self .component_info .parent_id } /get/fault_state" ,
65- self .fault_state .value , hostname = self .component_info .parent_hostname )
60+ if self .component_info .type == "internal_chargepoint" :
61+ pub .pub_single (f"openWB/set/chargepoint/{ self .component_info .hierarchy_id } /get/fault_str" ,
62+ self .fault_str )
63+ pub .pub_single (f"openWB/set/chargepoint/{ self .component_info .hierarchy_id } /get/fault_state" ,
64+ self .fault_state .value )
6665 except Exception :
6766 log .exception ("Fehler im Modul fault_state" )
6867
0 commit comments