TazUk
(Taz Uk)
July 20, 2020, 11:09am
1
HA core version 0.112.5
I added two template fans some time ago to HomeAssistant (controlled via Broadlink remotes):
fan:
- platform: template
fans:
living_room_fan:
friendly_name: "Living Room Fan"
value_template: "{{ states('input_boolean.living_room_fan_power') }}"
speed_template: "{{ states('input_text.living_room_fan_speed') }}"
turn_on:
- service: script.living_room_fan_on
turn_off:
- service: script.living_room_fan_off
set_speed:
- service: script.living_room_fan_set_speed
data_template:
speed: "{{ speed }}"
set_direction:
- service: script.living_room_fan_reverse
speeds:
- '0'
- '1'
- '2'
- '3'
- '4'
- '5'
The fans are exposed to Google Assistant through Nabu Casa and all worked correctly.
As of this morning, I’ve noticed that both fans are permanently shown as ‘On’ in Google Home.
They are still represented correctly in Google Home.
Is anyone else seeing the same?
NB: I’ve tried the usual voodoo to resolve without success:
Syncing devices (each end)
Removing fan from Google Home entities list and re-adding
Exposing the input_boolean that determines power state for the fan.
1 Like
TazUk
(Taz Uk)
July 20, 2020, 11:56am
2
I am not alone: Github Issue
1 Like
mew1033
(Chandler)
August 7, 2020, 5:40am
3
I’m seeing the same issue. No idea what’s causing it though…
TazUk
(Taz Uk)
August 7, 2020, 5:54am
4
I got this solved with a workaround here
mew1033
(Chandler)
August 7, 2020, 6:22am
5
I think I fixed the never being off problem. However, I’m missing the On/Off buttons beneath the fan icon. Does it show up correctly for you? My other (non template) fans have controls on the main Google Assistant page, but this one doesn’t. I wonder if it’s because it has speeds…
TazUk
(Taz Uk)
August 7, 2020, 7:00am
6
Not sure how other fans show in Google Assistant as I only have the two templated fans, but using one of them as an example here’s how it looks for me.
configuration.yaml
fan:
- platform: template
fans:
bedroom_fan:
friendly_name: "Bedroom Fan"
value_template: "{{ states('input_boolean.bedroom_fan_power') }}"
speed_template: "{{ states('input_text.bedroom_fan_speed') }}"
turn_on:
- service: script.bedroom_fan_on
turn_off:
- service: script.bedroom_fan_off
set_speed:
- service: script.bedroom_fan_set_speed
data_template:
speed: "{{ speed }}"
set_direction:
- service: script.bedroom_fan_reverse
speeds:
- '0'
- '1'
- '2'
- '3'
- '4'
- '5'
bedroom_fan_google:
friendly_name: "Bedroom Fan"
value_template: "{{ states('input_boolean.bedroom_fan_power') }}"
speed_template: >
{% set current = states('input_text.bedroom_fan_speed') %}
{% set speeds = { '0': 'off','1': 'low', '2': 'low', '3': 'medium', '4': 'medium', '5': 'high'} %}
{{ speeds[current] if current in speeds else 'low' }}
turn_on:
- service: script.bedroom_fan_on
turn_off:
- service: script.bedroom_fan_off
set_speed:
- service: script.bedroom_fan_set_speed
data_template:
speed: >
{% set speeds = {'off': '0', 'low': '1', 'medium': '3', 'high': '5'} %}
{{ speeds[speed] if speed in speeds else '0' }}
set_direction:
- service: script.bedroom_fan_reverse
speeds:
- 'off'
- 'low'
- 'medium'
- 'high'
bedroom_fan is controlled via the HA ui using Thomas Loven’s custom entity rows installed via HACs:
bedroom_fan_google is exposed to Assistant:
i have this issue for a while, and it does not happen with alexa, not sure what is the problem, maybe is the google assistant integration