Skip to content

Commit

Permalink
tesla-control: fix climate-set-temp command wrong conversion equation
Browse files Browse the repository at this point in the history
  • Loading branch information
Gilberto Robles authored and sethterashima committed Mar 8, 2024
1 parent 011e0fd commit fb224d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/tesla-control/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down

0 comments on commit fb224d9

Please sign in to comment.