Automating remote controlled dumb fans with Broadlink and Home Assistant

Hey,

So I have a Dyson Hot+Cool fan setup alongside my Broadlink to remotely control the fan from Home Assistant and other devices, it’s pretty cool, but I wanted to make it even cooler, literally.

So I am setting up an automation that will turn the fan on/off depending on the temperature, at the moment I have this hooked up to a weather sensor, however, I am going to fit a room sensor soon.

Here’s my current config for that:

     # Dyson fan on when it is too hot
  - id: auto_dyson_fan_off      
    alias: Dyson Fan on above 16C
    trigger:
      platform: numeric_state
      entity_id: sensor.weather_apparent_temperature
      above: 16
    action:
      - service: switch.turn_on
        entity_id: switch.dyson_fan
      - service: notify.ios_ng_iphone
        data:
          message: 'IT IS HOT!!! {{ sensor.weather_apparent_temperature }}%'
  # Dyson fan off when it is too hot
  - id: auto_dyson_fan_off      
    alias: Dyson Fan off below 16C
    trigger:
      platform: numeric_state
      entity_id: sensor.weather_apparent_temperature
      below: 16
    action:
      - service: switch.turn_off
        entity_id: switch.dyson_fan
      - service: notify.ios_ng_iphone
        data:
          message: 'IT IS COLD!!! {{ sensor.weather_apparent_temperature }}%'

So that works great but it definitely isn’t enough. I also want it to be able to change the strength of the fan depending on the temperature.

That’s where things get tricky and that’s the reason for this topic.

I am looking for a way to set the current number of the fan in Home Assistant with a sleek bit of code that will increase each time the strength button is pressed up or down, and remember that for the purpose of automating it to go to a set number.

Basically, Home Assistant would have to work out the difference between the current strength and the target and then tell broadlink the amount of times to press the button.

Here’s an image of the Dyson remote if this helps to provide an idea of what I want to do:

https://images-na.ssl-images-amazon.com/images/I/41GLB5KKtVL.SY300.jpg

Does anyone know of a possible way to do that?

I would use an input_slider :slight_smile:

Sure, the only problem is that the remote for the fan has an up-down button press not a specific temperature, so the automation would be to press the cool down/ cool up button a certain number of times depending on the current strength of the fan and the target.

It would have to work out the difference and then tell the Boradlink to press it that many times.

I want to do it because I think it would be a cool way of making dumb fans smart, not sure if this is something that Home Assistant can do yet though.

I kind of assumed there was an IR sensor attached to your HA such that HA knows when you press the remotes button. How does HA know the current strength of the fan? If you mean you’ve created a virtual remote inside HA (e.g. with floorplan) then we know the initial state and can work from there.