From 7242202cbb66a8e10da0e94e5323627c3e246500 Mon Sep 17 00:00:00 2001 From: metalblue Date: Mon, 8 May 2023 09:39:33 +0100 Subject: [PATCH] Remove unnecessary _ from Battery_Details in the device name --- GivTCP/HA_Discovery.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GivTCP/HA_Discovery.py b/GivTCP/HA_Discovery.py index 68744791..07ef95c3 100644 --- a/GivTCP/HA_Discovery.py +++ b/GivTCP/HA_Discovery.py @@ -106,7 +106,7 @@ def create_device_payload(topic,SN): tempObj["name"]=GiV_Settings.ha_device_prefix+" "+str(topic).split("/")[3].replace("_"," ")+" "+str(topic).split("/")[-1].replace("_"," ") #Just final bit past the last "/" tempObj['uniq_id']=str(topic).split("/")[3]+"_"+GiVTCP_Device+"_"+str(topic).split("/")[-1] tempObj['device']['identifiers']=str(topic).split("/")[3]+"_"+GiVTCP_Device - tempObj['device']['name']=GiV_Settings.ha_device_prefix+" "+str(topic).split("/")[3].replace("_"," ")+" "+GiVTCP_Device + tempObj['device']['name']=GiV_Settings.ha_device_prefix+" "+str(topic).split("/")[3].replace("_"," ")+" "+GiVTCP_Device.replace("_"," ") else: tempObj['uniq_id']=SN+"_"+GiVTCP_Device+"_"+str(topic).split("/")[-1] tempObj['device']['identifiers']=SN+"_"+GiVTCP_Device