diff --git a/charger/fritzdect.go b/charger/fritzdect.go index 89a752c33..4621109fb 100644 --- a/charger/fritzdect.go +++ b/charger/fritzdect.go @@ -108,9 +108,10 @@ func (c *FritzDECT) Status() (api.ChargeStatus, error) { // present 0/1 - DECT Switch connected to fritzbox (no/yes) var present int64 - resp, err = c.execFritzDectCmd("getswitchpresent") if err == nil { - present, err = strconv.ParseInt(resp, 10, 64) + if resp, err = c.execFritzDectCmd("getswitchpresent"); err == nil { + present, err = strconv.ParseInt(resp, 10, 64) + } } // power value in 0,001 W (current switch power, refresh aproximately every 2 minutes) diff --git a/dist/index.html b/dist/index.html index 5c9166248..afa05f845 100644 --- a/dist/index.html +++ b/dist/index.html @@ -1,4 +1,4 @@ -