Turn on fan, set speed with a single voice command (Google Assistant)


I’m trying to figure out why I can’t get my fan switch to power my fan on and set the speed with a single script… I’m using Google Assistant to call this script and every time I call it, the fan turns on but the speed is set on low. If I call the script a second time, the fan will switch to high speed. I also tried adding a delay before the second service call but that did not work either.

Is there any way to get the fan to turn on AND set the speed to high without having to tell Google to activate the script twice?

This is my code…


  • service: fan.turn_on
    entity_id: fan.ge_14287_fan_control_switch_level
  • service: fan.set_speed
    entity_id: fan.ge_14287_fan_control_switch_level
    speed: high

Thanks for the help!

what component are you using for your fan?

MQTT, Template, ISY??

That may help with what functionality it is expecting (ie if you set everything in a single call, or do it as a sequence, like you have attempted)

At the risk of sounding like a complete n00b, what do you mean when you say what component am I using? I think you’re asking what device is sending the signal to the fan? It’s a Z-Wave switch that I’m communicating with via an Aeotec Z-Stick. I have hass.io communicating with Google Home via the Home Assistant Cloud and all of my scripts get exposed/updated within Google Home Control when I run a “sync my devices” voice command.

Ahh - so it is a z-wave fan?

Looking at the z-wave documentation for homeassistant: https://www.home-assistant.io/docs/z-wave/devices/ and the link to the underlying python library; https://github.com/OpenZWave/open-zwave/tree/master/config/ge - it does not specifically list your fan … apparently a GE 14287 per your node name.

a guess would be combining the calls (depends on if supported) or adding delays in between the calls - ie another step in the sequence between step 1 and 2 like:

  - delay:
      seconds: 1

I dont have z-wave, so that is about all I can suggest - others may be able to help if this does not solve your issue.

So I did try combining the calls and also adding a delay but neither one worked. The destination device is actually a GE fan switch that has the ability to set the speed to low/med/high from the wall switch.

what are the entity_id’s associated with that device in your states panel?

Do you have a single switch associated with each speed (off, low, med. hi)? Or is there a master switch to turn on the fan and then separate switches to set the speed?

I use a broadlink to control the fans and they all have one switch per speed. And I don’t use google home; I use Alexa.

For example, to turn the fan on medium speed all I say is “turn on the fan medium”. To turn off the fan (since migrating away from emulated_hue) I had to set up a script that when I say “turn off the fan” it turns on the “fan off” switch for a couple of seconds.

I don’t know if it’s useful to you or not but hope it helps.

I think there is only one switch for the fan and the properties include the speed and speed_list

I’m at a loss here, does anyone have any other thoughts?

I don’t have anything similar to that so I’m just winging it but it looks like the actual speed that the controller thinks it’s running at is ‘high’. I say that because of the ‘speed: high’ attribute. If you change the speed setting of the remote control (from the wall switch) does that attribute change to indicate different speeds?

If that’s the case then something else to check is that on some (all?) fans the pull chain switch has to be in the ‘high’ position for a remote fan controller to actually control all three speeds. Otherwise the voltages to the speed controller are screwed up and it ends up putting the fan in an ambiguous speed condition at a speed lower than called for by the remote control.

the GE 14287 fan controller is technically a dimmer. You set your pull chain to High and the GE fan controller increases or decreases power to get the desired speed. Only a few months ago did Home Assistant get updated to show high medium Low etc. (before that you’d have to ask alexa/google home to “set the bedroom fan to 50%”

try deleting the turn_on command from your script - only run the set speed service

Awesome I’ll try that, do you think it will turn the fan on from the off position?

No dice, it comes on at a really low speed. If I run the script again, the fan speed stays the same.

did you check the pull chain setting to make sure it was on high speed? that has been suggested a couple of times.

I will check that, my bad. It should be since the command said the second time sends the fan to high. Will post back this evening.

Just so you understand…

We aren’t talking about the z wave controller command being on high. we are talking about the actual physical pull chain control on the side of the fan. That has to be set to high for the speed controller to correctly set the speeds.

I wasn’t sure if you got that from reading your post above this one.

Yes I understand, thanks for clarifying anyhow :).

I have the same zwave fan and I’m using Alexa. Not sure if this is your issue but I have to tell Alexa to turn the fan on 50% or 100% for it change the speed of the fan. I don’t use any scripts just the HASS zwave fan component. Then if you want to make changes through the front end you’ll have the Low, Med, High options.

Hope that helps.


Thanks for your input. I’m actually getting ready to test out an Echo to see how it handles some of the things I’m trying to do with Google Home that are working less than desirably. It’s great to hear that it’s so simple with Alexa as opposed to me having to write a script to do something that should be happening out of the box. I did try asking Google to set the fan to a percentage and I’m getting back “Sorry I don’t know how to help with that”. Are you using an Aeotec Z-Stick with Hass or another controller?

Oh and problem is fixed now!! A big thank you to finity and the rest of the guys for the help. It was indeed the pull chain that was throwing off my script.

I use the Aeotec Z-Stick.

Alright cool, I’ll let you know how I make out when I try out the Echo without writing a custom script to take the action. Thank you.

awesome! sometimes it’s the silly little stuff that bites you.

1 Like