home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.8k stars 30.89k forks source link

Home-assistant homekit generic thermostat #18254

Closed JannickBlmndl closed 6 years ago

JannickBlmndl commented 6 years ago

Home Assistant release with the issue: 0.81.6

Operating environment (Hass.io/Docker/Windows/etc.): Manually installed on Raspberry Pi https://www.home-assistant.io/docs/installation/raspberry-pi/

Component/platform: https://www.home-assistant.io/components/climate.generic_thermostat/

Description of problem:

Homekit cannot control generic thermostat with automatic mode. If I for example ask Siri to turn on my heater the default setting that Siri sets is the automatic function. But my generic thermostat only has a heat and off operation mode. On the other hand, if I manually select the heat option in the mode menu of the homekit thermostat my home assistant generic thermostat does turn on and no errors appear.

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

climate:
  - platform: generic_thermostat
    name: Kantoor
    heater: switch.verwarming
    target_sensor: sensor.multisensor_temperatuur
    min_temp: 19
    max_temp: 22.5
    initial_operation_mode: "off"
    hot_tolerance: 0.5

switch:
  - platform: tplink
    host: 192.168.xxx.xx
    name: Verwarming

sensor:
  - platform: mqtt
    state_topic: "MYSTATETOPIC/xxx/multisensor"
    name: "Multisensor Temperatuur"
    unit_of_measurement: '°C'
    value_template: '{{ value_json.temperature | round(1) }}'

Traceback (if applicable):

ERROR (MainThread) [homeassistant.components.climate.generic_thermostat] Unrecognized operation mode: auto

Additional information: Screenshot of the automatic mode which is set if I ask Siri to turn on my thermostat: schermafbeelding 2018-11-06 om 08 35 51

By the way Home-Assistant is a great open source project keep up the good work!

cdce8p commented 6 years ago

The HomeKit component assumes that the entity supports the four basic states that many climate devices do: off, heat, cool and auto. Since the implementation in the Home App can't be changed, it would require a dynamic check inside HA each time a call comes in. At least at the moment that's a bit too much complexity.

Especially since I think an easy workaround for you should be to say something like:

Hey Siri, set heater to heat

instead. That should work just fine.

JannickBlmndl commented 6 years ago

Thanks a lot for your response! I fixed this problem using Siri Shortcuts. I created a scene in Homekit which turns the heater into heating mode. And then added it to Siri using a custom command.

cdce8p commented 6 years ago

Nice solution :)