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.