Homeassistant Switch: remove trailing /

This commit is contained in:
andig 2025-08-30 10:20:40 +02:00
parent 668344bf32
commit 062ceceef6

View file

@ -45,7 +45,7 @@ func NewHomeAssistantSwitchFromConfig(other map[string]interface{}) (api.Charger
func NewHomeAssistantSwitch(embed embed, baseURL, token, switchEntity, powerEntity string, standbypower float64) (api.Charger, error) {
c := &HomeAssistantSwitch{
baseURL: baseURL,
baseURL: strings.TrimSuffix(baseURL, "/"),
switchEntity: switchEntity,
powerEntity: powerEntity,
Helper: request.NewHelper(util.NewLogger("ha-switch")),