diff --git a/cmd/tesla-control/commands.go b/cmd/tesla-control/commands.go index b9d6344..1baa784 100644 --- a/cmd/tesla-control/commands.go +++ b/cmd/tesla-control/commands.go @@ -216,7 +216,7 @@ var commands = map[string]*Command{ return fmt.Errorf("failed to parse temperature: format as 22C or 72F") } if unit == "F" || unit == "f" { - degrees = (5.0 * degrees / 9.0) + 32.0 + degrees = (degrees - 32.0) * 5.0 / 9.0 } else if unit != "C" && unit != "c" { return fmt.Errorf("temperature units must be C or F") }