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 can't set Homematic thermostats #20105

Closed
speedmann opened this issue Jan 14, 2019 · 9 comments
Closed

google_assistant can't set Homematic thermostats #20105

speedmann opened this issue Jan 14, 2019 · 9 comments

Comments

@speedmann
Copy link
Contributor

Home Assistant release with the issue:

0.85.0 (0.85.1 seems to be not available for docker?)

Last working Home Assistant release (if known):
unknown

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

Docker

Component/platform:

https://www.home-assistant.io/components/google_assistant
In combination with
https://www.home-assistant.io/components/climate.homematic/

Description of problem:
With google assistant i am not able to set the thermostates temperature

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

google_assistant:
  project_id: XXXX
  api_key: XXXX
  expose_by_default: True
  exposed_domains:
    - switch
    - light
    - climate
homematic:
  interfaces:
    rf:
      host: xxx
      resolvenames: xml
    ip:
      host: xxx
      port: 2010
      resolvenames: xml

Traceback (if applicable):


Additional information:

Changeing
climate.STATE_AUTO: 'heatcool',
to
climate.STATE_AUTO: 'heat',
in
homeassistant/components/google_assistant/trait.py
solves this for me.

I see Issues which are about this, but are closed (And i honestly can't figure out if they are closed because the issue should be solved or if they are closed for any other reason)
#17742
#18645

@speedmann
Copy link
Contributor Author

Any update on this?

@Swamp-Ig
Copy link
Contributor

Swamp-Ig commented Feb 3, 2019

I just had a quick look at this one. Google assistant will only handle a quite limited set of possible 'modes' for a device:

        climate.STATE_HEAT: 'heat',
        climate.STATE_COOL: 'cool',
        climate.STATE_OFF: 'off',
        climate.STATE_AUTO: 'heatcool',
        climate.STATE_FAN_ONLY: 'fan-only',
        climate.STATE_DRY: 'dry',
        climate.STATE_ECO: 'eco'

Plus there's an 'auto' mode where a range isn't used.

Whereas the modes available for this device are quite different:

HM_STATE_MAP = {
    'AUTO_MODE': STATE_AUTO,
    'MANU_MODE': STATE_MANUAL,
    'BOOST_MODE': STATE_BOOST,
    'COMFORT_MODE': STATE_COMFORT,
    'LOWERING_MODE': STATE_LOWERING
}

What do the states for this device ultimately mean in terms of cooling / heating / etc? Are they all a variation of auto - get the temp to a particular set point either by heating or cooling, just in aggressiveness? Does auto use a range or just a single point?

Also unless a PR #20001 I've put in gets accepted, auto modes have to have a high and low temp.

The solution here is really going to depend on what the device actually does.

@speedmann
Copy link
Contributor Author

@Swamp-Ig as far as i know the auto mode on homematic only is going to set a temperature on the thermostats which might get overriden by homematic automation (schedules etc).
Manual mode mainly does the same, but does ignore automatic schedules.
Boost Mode is a so to say "alias" for, set target temperature to 30°C for 5 minutes, then revert back to the previous temperature set.
Comfort and Lowering are unknown to me.

I guess i could try setting the thermostats to manual mode and see what google assistant does then, but unfortunately my integration does not work at all at the moment

@speedmann
Copy link
Contributor Author

@Swamp-Ig do you happen to have a solution for this already?

@Swamp-Ig
Copy link
Contributor

Swamp-Ig commented Mar 8, 2019

There's no real solution, GA only has heat/cool/auto/etc as above. You can't tell google assistant to set the device to manual/boost/comfort/lowering modes, this isn't something the GA knows about for climate devices.

We could potentially use the Modes attribute, but the list of modes is limited. This is outside the scope of the HA <-> GA link at this point, although not something completely impossible to implement. Hopefully eventually GA will allow custom modes not on that list, at which time there's more potential to change it.

@speedmann
Copy link
Contributor Author

Could we "fix" this by having a map from thermostat -> GA mode?
I will have to read more about both integrations to understand how they are working...

@Swamp-Ig
Copy link
Contributor

Swamp-Ig commented Mar 9, 2019

Not really, there's no way to have a manual / boost / comfort / lowering mode in GA for climate devices, except maybe if you put in the Modes attribute, but I don't know that I'd guarantee that would work and besides not all of the modes you want are in the allowed list on GA. Really all modes are a kind-of heatcool mode in GA, all basically an auto mode with a target temp. It's just that the target temp changes.

I've got a pretty good grip on how they both work, there's not a lot of options. The main thing I'd suggest is implementing turn_on and 'turn_off`if #21842 gets accepted, and then at least you can use "hey google turn on/off device".

@Swamp-Ig
Copy link
Contributor

There's another option, which I'm contemplating using to fix #18515 and #17559, which is to report to google a state of heatcool for any unknown states. That way at least you can change the temperature. You won't be able to use GA to change the mode, but that's the best we can do.

@speedmann
Copy link
Contributor Author

Something seems to have changed. I do not know when this happened, but when i tested it with 0.93.1 again, i can at least say "set temperature to xx °C" and it works.
For me this is ok and i think the issue can be closed

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

No branches or pull requests

3 participants