Skip to content

Commit

Permalink
Merge pull request #25 from metalblue:fix-battery-details-name
Browse files Browse the repository at this point in the history
Remove unnecessary _ from Battery_Details in the device name
  • Loading branch information
britkat1980 authored May 13, 2023
2 parents 96c9ec6 + 7242202 commit 5fd9021
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion GivTCP/HA_Discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5fd9021

Please sign in to comment.