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

Fan speed service is still called instead of speed percentage with Google Assistant #52637

Closed
Nardol opened this issue Jul 7, 2021 · 12 comments

Comments

@Nardol
Copy link
Contributor

Nardol commented Jul 7, 2021

The problem

I opened #47728 before, which should be fixed by #50283
Unfortunately I still observe the same behavior when I ask Google assistant to slow/speed my fan.
I also cannot change the fan mode, using fan templates or MQTT Fans.
I do not observe any change on the Google Home interface but it is not really a surprise as it is the case the most of time when all functions are not usable with app.

What is version of Home Assistant Core has the issue?

2021.7.0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Google Assistant

Link to integration documentation on our website

https://www.home-assistant.io/integrations/google_assistant/

Example YAML snippet

fan:
  - platform: template
    fans:
      # Ventilateur de la chambre
      ventilateur_chambre:
        friendly_name: "Ventilateur chambre"
        unique_id: fan.ventilateur_chambre
        value_template: "{{ states.input_boolean.etat_ventilateur_chambre.state }}"
        preset_mode_template: "{{ states.input_select.mode_ventilateur_chambre.state }}"
        percentage_template: "{{ states.input_number.vitesse_ventilateur_chambre.state }}"
        oscillating_template: "{{ states.input_select.oscillation_ventilateur_chambre.state }}"
        turn_on:
          service: script.alume_ventilateur_chambre
        turn_off:
          service: script.stop_ventilateur_chambre
        set_percentage:
          service: script.ventilateur_chambre_vitesse
          data:
            speed: "{{ percentage }}"
        set_preset_mode:
          service: script.ventilateur_chambre_mode
          data:
            mode: "{{ preset_mode }}"
        set_oscillating:
          service: script.ventilateur_chambre_oscillation
          data:
            oscillation: "{{ oscillating }}"
        speed_count: 3
        preset_modes:
          - 'Normal'
          - 'Nature'
          - 'Sommeil'

Anything in the logs that might be useful for us?

2021-07-07 16:37:08 WARNING (MainThread) [homeassistant.components.fan] The fan.set_speed service is deprecated, use fan.set_percentage or fan.set_preset_mode instead
2021-07-07 16:37:15 WARNING (MainThread) [homeassistant.components.fan] The fan.set_speed service is deprecated, use fan.set_percentage or fan.set_preset_mode instead
2021-07-07 16:45:53 WARNING (MainThread) [homeassistant.components.fan] The fan.set_speed service is deprecated, use fan.set_percentage or fan.set_preset_mode instead
2021-07-07 16:45:54 WARNING (MainThread) [homeassistant.components.fan] The fan.set_speed service is deprecated, use fan.set_percentage or fan.set_preset_mode instead

Additional information

I don't use Google Assistant in English.
I use it in French.
Could it be the cause?
Are there other languages than English where it works?

@probot-home-assistant
Copy link

google_assistant documentation
google_assistant source
(message by IssueLinks)

@tehbra1n
Copy link

FWIW this does not work for me in English either. The response from the Google Assistant is “Sorry, I don’t understand”. It does work in 2021.6.6 but not 2021.7.1.

@Nardol
Copy link
Contributor Author

Nardol commented Jul 21, 2021

Pull request #53105 should hopefully fix this.
I have not set up any testing instance of Home Assistant so I will know with the next stable release it will merged in.

@Nardol
Copy link
Contributor Author

Nardol commented Aug 4, 2021

It is better, in fact the main issue is fixed now but it still does not work as expected because if I ask Google Assistant to increase/decrease my fan, a non-managed percentage is used, looks like randomness.
My fan has three speeds and Google Assistant answered other percentages than 33, 66 and 100.

It looks like I cannot specify a speed percentage by voice but is it specific to other languages than English?

For information and to notice a very good new for me, it looks like something else is better now: I have a ESPHome fan which was always on for Google Assistant because when stopped, speed was 100% and Google Assistant did not take in account the off state reported in Home Assistant. Now when it is stopped speed is still 100% but Google Assistant report it as off.

I hop a solution exists for this unmanaged percentage speed and all will be perfect for me 🙂

@Nardol
Copy link
Contributor Author

Nardol commented Aug 4, 2021

Fan speeds look like very strange: with the last mentioned fan, if I ask to increase or decrease speed, Google Assistant will always reply 66%. In fact like before but with no error as it was medium and now it throws no error at all.

@stephenl03
Copy link

Am I understanding this correct? I have to say, "OK Google set fan to 30%" if I want it on low and then "OK Google set fan to 60%" for medium and then "... 100%" for high?

This seems like extreme degradation in the user experience. I hope I am missing something with this change, but it seemed to work wonderfully previously. As of right now I have to tell my family not to use common/simple words to control the fans but instead percentages. Not the funnest thing to do with small children.

@Nardol
Copy link
Contributor Author

Nardol commented Aug 31, 2021

Am I understanding this correct? I have to say, "OK Google set fan to 30%" if I want it on low and then "OK Google set fan to 60%" for medium and then "... 100%" for high?

This seems like extreme degradation in the user experience. I hope I am missing something with this change, but it seemed to work wonderfully previously. As of right now I have to tell my family not to use common/simple words to control the fans but instead percentages. Not the funnest thing to do with small children.

It worked, in English only. Maybe some other languages, but a little number. I don't think it is the funest thing to do with small children to ask them to talk to Google Assistant in English 🙂
And you still can add routines to keep the previous user experience so everybody can use the same instructions as before.

@edalquist
Copy link

Unfortunately forcing all fans to use a speed % also breaks the Google Home UI for fans. I've verified with the folks working on the Home app that they only support named speeds for the UI control, not percentages. So while I can tell Assistant "Set the office fan to 30%" the Google Home app and UIs on the Nest Hubs only show on/off controls.

@Nardol
Copy link
Contributor Author

Nardol commented Aug 31, 2021

Unfortunately forcing all fans to use a speed % also breaks the Google Home UI for fans. I've verified with the folks working on the Home app that they only support named speeds for the UI control, not percentages. So while I can tell Assistant "Set the office fan to 30%" the Google Home app and UIs on the Nest Hubs only show on/off controls.

I have never had the speed controls for my fans in the Google Home app also before, maybe another difference between languages? I always read there were no way to change fan speed using the Google Home app.

The main problem about the Google Assistant integration is it cannot be translated.
So only English speaking people can use all functions, and fan percentage has not changed the situation unfortunately.

Making Google Assistant integration translatable looks like necessary as Google delegates the task to developers.

@jbouwh
Copy link
Contributor

jbouwh commented Oct 19, 2021

The fan speed service will not be called anymore.

You can ask the current status (assuming your ventilator is called ventilator):

  • what is the preset mode on on my ventilator?
  • what is the speed of on my ventilator?

To change e.g. the speed:

  • set the speed of my ventilator to 30 percent

To change e.g. the preset mode (to eco):

  • set the preset on my ventilator to eco
    or
  • set the preset mode on my ventilator to eco

I think this issue can be closed.

@Nardol
Copy link
Contributor Author

Nardol commented Oct 19, 2021

The fan speed service will not be called anymore.

You can ask the current status (assuming your ventilator is called ventilator):

Yes, only in English.

I think this issue can be closed.

And maybe another should be opened or non-English speaking users can definitely forget to be able to use Google Assistant for these kind of actions with the Home Assistant integration?

@jbouwh
Copy link
Contributor

jbouwh commented Oct 19, 2021

You are right only English is supported at the moment. That is the limitation of the current implementation.
For preset_modes are are so predefined values.
B.t.w. Dutch would be my preference ;-)
This issue is about the fan service being called. Feel free to start a PR (not an issue, because it is as designed) for multi language support on Google Assistant.
For many languages (like Dutch) setting speeds and preset modes is not available yet in the native langue. Fallback is to English.

@Nardol Nardol closed this as completed Oct 19, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Nov 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants