Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Assistant and Homekit sending wrong target temp values #18524

Closed
joshtbernstein opened this issue Nov 16, 2018 · 2 comments · Fixed by #19083
Closed

Google Assistant and Homekit sending wrong target temp values #18524

joshtbernstein opened this issue Nov 16, 2018 · 2 comments · Fixed by #19083

Comments

@joshtbernstein
Copy link

joshtbernstein commented Nov 16, 2018

Home Assistant release with the issue:

0.82.1

Last working Home Assistant release (if known):

Operating environment (Hass.io/Docker/Windows/etc.):

Hass.io on Docker on CentOS 7

Component/platform:

Description of problem:
If I choose a temperature of 73°F in Google Assistant, the value of 72.99999122619629 is sent to my thermostat. My thermostat rounds this down to 72°F so I can not actually set a target temp of 73.

If I choose a temperature of 75°F in HomeKit, the value of 74.7 is sent to my thermostat. My thermostat rounds this down to 74°F so I can not actually set a target temp of 75.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

cloud:

homekit:
  auto_start: false


climate:
  - platform: mqtt
    name: Thermostat
    modes:
      - "off"
      - "heat"
      - "cool"
    fan_modes:
      - "Auto"
      - "On"
    current_temperature_topic: "hvac/current_temperature"
    mode_command_topic: "hvac/mode/set"
    mode_state_topic: "hvac/mode/get"
    temperature_command_topic: "hvac/temperature/set"
    temperature_state_topic: "hvac/temperature/get"
    fan_mode_command_topic: "hvac/fan/set"
    fan_mode_state_topic: "hvac/fan/get"
    availability_topic: "hvac/availability"
    min_temp: 45
    max_temp: 95

Traceback (if applicable):


Additional information:
It looks like both components are working in Celsius and then converting to Fahrenheit. Ideally the components should work in the user's native unit measurement system (from configuration.yaml), but a possible short term fix would be to send a rounded integer to the thermostat.

@cdce8p
Copy link
Member

cdce8p commented Nov 17, 2018

I only know the situation with HomeKit: The Home App uses Celsius internally, but only rounded to the nearest 0 or .5 value. That's the one which is then send to Home Assistant where it's converted back to Fahrenheit also with another rounding to the nearest 0 or .5 value. Unfortunately that's the way it has to be done with unit conversions.

I tried setting the temperature to 75°F in the Home App myself. However it all worked fine for me. The temp target from HomeKit was 24.0°C (75.2°F) which was converted to 75°F by Home Assistant and used for the service call.

@marchingphoenix
Copy link
Contributor

@ghost ghost added the in progress label Dec 7, 2018
@ghost ghost removed the in progress label Dec 10, 2018
balloob pushed a commit that referenced this issue Dec 10, 2018
* #18524 : Add rounding to *F temps

* #18524 : Linting

* simplify round behavior

* fix trailing whitespace

(thanks github editor)
balloob pushed a commit that referenced this issue Dec 10, 2018
* #18524 : Add rounding to *F temps

* #18524 : Linting

* simplify round behavior

* fix trailing whitespace

(thanks github editor)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants