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
69.74k stars 28.9k forks source link

Unable to set the temperature setpoint with Assist or Alexa #118899

Open jlipsit opened 4 weeks ago

jlipsit commented 4 weeks ago

Edit - Found the ROOT problem is in Home Assistant and not the Alexa skill and is because you cannot specify a single setpoint in a multi setpoint system. Please remove this limitation in HA so we can set the temperature by Voice with LLM and voice assistants. See screen shots below.....

The problem

Versions: • Core: 2024.5.5 • Supervisor: 2024.05.1 • Operating System: 12.3 • Frontend: 20240501.1

Description: I recently switched from Homeseer to Home Assistant and subscribed to Home Assistant Cloud for voice-controlled device management via Alexa (and to support the developers). However, setting the thermostat temperature by voice does not work as expected. When I command Alexa to adjust the temperature, it responds with a default message but doesn't change the set point. In contrast, Homeseer's integration works perfectly with the same hardware.

This same problem occurs if you try to set the temperature with Assist.

Steps to Reproduce: a Must have a mult-setpoint thermostat (HEAT and COOL)

  1. Use the Amazon Alexa skill included with the Nabu Casa account.
  2. Try setting the thermostat temperature by voice command using Alexa. o Example command: "Alexa, set the [Thermostat Name] temperature to [XX] degrees."

Actual Result: • Alexa responds with: "The AC is keeping the temperature around XX and between XX and XX." • The setpoint does not change.

Expected Result: • Alexa should respond with: "I have set the [Thermostat Name] temperature to [XX] degrees." • The thermostat setpoint should change accordingly.

Additional Information:This issue persists regardless of the thermostat mode or various settings. • Other users have reported experiencing the same problem. • You can RAISE or LOWER the temperature by voice. • Attached video demonstrates the issue.

Attachment:

https://github.com/home-assistant/core/assets/155367039/0564d9a6-dbcd-42d6-9e40-2b28421b606f

The error stems from NOT being able to set 1 single setpoint at a time in Home Assistant. image

You can see the error in creating a rule in HA. We should be able to set 1 setpoint while leaving the other untouched. image

This will not generate an error - but you cannot set 2 setpoint by voice with Alexa or a LLM voice command. image

Cannot set temperature with Google AI LLM - Tried dozens of ways and it always fails. image

Error Details.. image

Same problem with ChatGPT LLM image

What version of Home Assistant Core has the issue?

2024.6.0

What was the last working version of Home Assistant Core?

None

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Paid Nuba Casa Alexa Skill

Link to integration documentation on our website

https://www.nabucasa.com/config/amazon_alexa/

Diagnostics information

Need ability to get Amazon Alexa logs

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

jlipsit commented 3 weeks ago

Hello @balloob, can you look into this. I think this should be an easy fix and it’s affecting a lot of people who have multi-setpoint thermostats. (Heat and Cool). Thanks! 😉

home-assistant[bot] commented 3 weeks ago

Hey there @home-assistant/cloud, @ochlocracy, @jbouwh, mind taking a look at this issue as it has been labeled with an integration (alexa) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `alexa` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign alexa` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


alexa documentation alexa source (message by IssueLinks)

balloob commented 3 weeks ago

Do not tag people to get their attention. Also keep issues to a single topic. Either Assist or Alexa.

RichardHoman commented 2 weeks ago

I have the same issue on my system (HAOS, HA v24.6.3). Assist either tells me it has set the new temperature and it simply doesn’t actually do it, or it tells me it can’t control the thermostats.

My thermostats do not have multiple set points. It’s a set of Plugwise thermostats linked via the Plugwise integration. The thermostats can ofcourse be controlled without issue using - for example - a thermostat card. IMG_3574

jbouwh commented 6 days ago

I can confirm is this an an issue, but it is not alexa specific.

The climate set_temperature schema just does not allow a single version to be set:

https://github.com/home-assistant/core/blob/aaef31958be6b7116a10b8158349d856db526b11/homeassistant/components/climate/__init__.py#L128-L140

Alexa would indeed support setting the upper or lower setpoint independently.

The docs though state that both upper and lower setpoint are required. https://developers.home-assistant.io/docs/core/entity/climate/

So, what is needed is that assist should set both the specified and the unspecified set_point in the service call, or we should decide to change the service schema, The latter needs an architectural discussion, but I can imagine that this should not be a problem.

elupus commented 6 days ago

Both are only required if you set upper or lower. The service call normally allow the single temperature to be set too.

Which climate device is this?

jbouwh commented 6 days ago

It seems the issue is that only the upper or lower setpoint is set, but the scema disallows this.

elupus commented 6 days ago

Im not sure that is the case. Alexa and Assist dont use the service call builder from frontend. So they can set only the standard temperature. Frontend does indeed look wrong though, but does not block voice doing things right.

But without seeing the actual call done by alexa, we cant say what it is doing.

I still want to know which backing climate integration this is using.

jbouwh commented 6 days ago

Alexa is not doing calls, but just passes the state of the HA entities to allow showing them in Alexa. The calls made in the handler are there to process the changes made from Alexa to HA.

jbouwh commented 6 days ago

So they can set only the standard temperature.

So you say assist simply does not support this yet?

elupus commented 6 days ago

Alexa is not doing calls, but just passes the state of the HA entities to allow showing them in Alexa. The calls made in the handler are there to process the changes made from Alexa to HA.

Exactly which is what happens when you ask alexa to change temperature.

jbouwh commented 6 days ago

Alexa is not doing calls, but just passes the state of the HA entities to allow showing them in Alexa. The calls made in the handler are there to process the changes made from Alexa to HA.

Exactly which is what happens when you ask alexa to change temperature.

Right, bit the issue is about changing the temperature the other way (Through conversation and assist), The issue is not about Alexa not being able to change the temperature. It is about, Assist/conversation, apparently this does not support setting dual point thermostats yet, but I'd like to have that confirmed.

elupus commented 6 days ago

Huh?

However, setting the thermostat temperature by voice does not work as expected. When I command Alexa to adjust the temperature, it responds with a default message but doesn't change the set point. In contrast, Homeseer's integration works perfectly with the same hardware.

jbouwh commented 6 days ago

Let me test

jbouwh commented 6 days ago

It works as expected with this (self made) MQTT climate:

mqtt:
  - climate:
      name: "Jacuzzi"
      max_temp: 37
      min_temp: 18
      precision: 0.1
      modes:
        - "off"
        - "heat"
      current_temperature_topic: "spa/currenttmp"
      # temperature_command_topic: "spa/targettmp"
      temperature_low_command_topic: "spa/targettmp_low"
      temperature_high_command_topic: "spa/targettmp_high"
      mode_command_topic: "spa/mode"
      power_command_topic: "spa/pwrcmd"
jbouwh commented 6 days ago

Homeseer

Does it work via assist?

jlipsit commented 6 days ago

Hello,

Thank you for looking into this problem. I have a Leviton/HAI OmniStat 2 RC-1000 thermostat wired into my HAI OmniPro II controller. I am using the OmniLinkBridge MQTT Add-on to integrate this with HomeAssistant.

OmniLinkBridge GitHub

Before reporting this bug, I discussed it extensively with the developer of the Add-on. He confirmed that he also has the same issue and that it is not a limitation of MQTT.

Additionally, I have confirmed that this affects other users who have completely different hardware and integrations within HomeAssistant.

I previously used Homeseer, a competing platform, for years to integrate my system with Alexa for voice control. I recently switched to HomeAssistant because Homeseer started charging a fee to access Alexa. I decided to pay for HomeAssistant yearly to have access to Alexa and to support the developers. This is where I encountered the two bugs related to voice control with Alexa and Assist.

Please let me know if there are any logs or videos I can provide or if you have any questions.

Thank You

jbouwh commented 6 days ago

My test climate works with Alexa, but assist does not seem to support climates with a lower and higher setpoint. Further both setpoints must be specified together when used in a service call.

elupus commented 5 days ago

OmniLinkBridge does not seem to support the single temperature topic: https://www.home-assistant.io/integrations/climate.mqtt/#temperature_command_template It is at least not listed here: https://github.com/excaliburpartners/OmniLinkBridge/blob/master/OmniLinkBridge/MQTT/HomeAssistant/Climate.cs.

When requesting a single setpoint, that topic is expected. Mqtt logic in HA has no fallback here: https://github.com/home-assistant/core/blob/cef7def024ea8876a36d88b69e9433ce5ceee93f/homeassistant/components/mqtt/climate.py#L508. The integration (in this case OmniLinkBridge) need to handle single temperature requests.

tronikos commented 3 hours ago

Note assist doesn't support setpoint yet. Even if it was just one. The only supported intent is HassClimateGetTemperature, see https://github.com/home-assistant/core/blob/dev/homeassistant/components/climate/intent.py So not working with Gemini or ChatGPT is expected. Until support is added you could create a script that takes as input via a field the temperature and calls the service. This will only work with LLMs, not Alexa.