Set fan speed with Google Assistant using another language than English

Tags: #<Tag:0x00007fc41237d0d8> #<Tag:0x00007fc41237d010> #<Tag:0x00007fc41237cf48>

Hello,

Following this topic: Template Fan shows always shows as "On" in Google Home, behaves correctly in HA. What am I missing? I can have the correct state (on/off) for my template fan in Google Assistant.
Thank @TazUk for the YAML and explanations.

But does someone have succeeded in controlling the speed in another language than English?
In fact even in the Google Home app I have not the fan speed and I don’t find how to change the speed using voice.

My actual fan:

- platform: template
  fans:
    ventilateur_bureau_google:
      friendly_name: "Ventilateur bureau"
      unique_id: fan.ventilateur_bureau_google
      value_template: "{{ states.input_boolean.etat_ventilateur_bureau.state }}"
      speed_template: >
        {% set current = states.input_select.vitesse_ventilateur_bureau.state %}
        {% set speeds = { 'Stop le ventilateur': 'off','Vitesse 1': 'low', 'Vitesse 2': 'medium', 'Vitesse 3': 'high'} %}
        {{ speeds[current] if current in speeds else 'low' }}
      turn_on:
        - service: script.alume_ventilateur_bureau
      turn_off:
        - service: script.stop_ventilateur_bureau
      set_speed:
        - service: script.ventilateur_bureau_vitesse
          data_template:
            speed: >
              {% set speeds = {'off': 'Stop le ventilateur', 'low': 'Vitesse 1', 'medium': 'Vitesse 2', 'high': 'Vitesse 3'} %}
              {{ speeds[speed] if speed in speeds else 'Stop le ventilateur' }}
      speeds:
        - 'off'
        - 'low'
        - 'medium'
        - 'high'

I tried to translate different speeds, without success.
I tried to search on the Google documentation but no indication about anything to do for specific languages.

Hi,
please note Google Home app won’t show any speed control, but they work via voice - in english only.
I’m in your same situation and I’d like to control the fan speed with italian commands.
In my case if I say “set the fan speed to X” it works, but if I say it in other languages it simply shows me search results.

When I setup the fan in openHAB (another automation software) and exposed it to GHome, it let me specify the speeds as well as the language:

Dimmer { ga="Fan" [ speeds="0=away:zero,50=default:standard:one,100=high:two", lang="en", ordered=true ] }

(as documented here: openHAB Google Assistant
In fact this worked like a charm within openHAB:

Dimmer Ventilatore "Ventilatore" { ga="Fan" [ speeds="0=zero,1=uno:minimo,2=due,3=tre,4=quattro,5=cinque:massimo", lang="it", ordered=true ] }

Also I found this example in the Smart Home docs:

{
  "availableFanSpeeds": {
    "speeds": [
      {
        "speed_name": "speed_low",
        "speed_values": [
          {
            "speed_synonym": [
              "low",
              "slow"
            ],
            "lang": "en"
          }
        ]
      },
      {
        "speed_name": "speed_high",
        "speed_values": [
          {
            "speed_synonym": [
              "high",
              "fast"
            ],
            "lang": "en"
          }
        ]
      }
    ],
    "ordered": true
  },
  "reversible": true,
  "supportsFanSpeedPercent": true
}

meaning that the lang parameter can (and should) be specified, so I think we should ask to the Template Fan devs if it’s possible to add the language setting and how!

As specified on this comment, currently there is no way to have translatted data in the Google Assistant integration.

I have read some other issues where there were some ideas but nothing concrete for now.

Ading translations to Google Assistant would allow a lot of other things.

I created a feature request to suggest it.