Fan Control in lovelace

image

This is from release notes. I will post it on github as well

one question that keeps bugging me is…
When I set up an automation for an Sonoff iFan03 it works with no errors in log.

However when I try to set up a standard Button Card i get this…


Is this as a result of SonoffLAN @AlexxIT or is there another issue?
???

433Mhz RF Fan speed control

I put an issue in on smartIR vassilis-panos

github.com/smartHomeHub/SmartIR

Speed is Depreciated - FAN Entity

opened Yesterday 10:55 AM

ronjtaylor ronjtaylor

As of HA version 2022.3.x Named Speeds (eg Low, Medium, High) are gone. They we…

He told me I did not have the latest version (1.17.5) of the software. I updated and now my TV Room RF 433Mhz FAN works with the percent row buttons
image

Another thing to cross of the TO DO list

1 Like

Hello,I have some issues with the fan control cards, it was working fine before this
I had to do a fresh ha installation because my sdcard crashed
But now, i’m getting error with call service when I select the button speed and they also don’t reflect the current status/speed of the ifan03 (flashed with tasmota)
Any thoughts on this

which plugin are you using?

All
i’ve got a Fanco ceiling fan running dc motor. how can i get it running with Home Assistant? i could not find any wifi device that can control dc motor for ceiling fan. I’ve no issue with the ac control since i’ve got the Ifan03 reciever.

Thank you

In my experience my DC FAN was controlled by a 433MHz RF remote control. I used a Broadlink RM4 Pro and had to teach it the RF codes.
refer to SMARTIR Broadlink - Home Assistant and SmartIR/FAN.md at e62890672bf4241d898bf49740f06ff10573eccd Ā· smartHomeHub/SmartIR Ā· GitHub
Hope that helps.

Edit a few hours later

One of the down sides to this is that although the original remote still controls the DC FAN, when you do use it HA does not know anything about it (unlike the iFan03 which has its controller in the iFan03)
This does not bother me but it would be nice if it did.
I control my fans via an automation and use temperature as a trigger to turn on and off as well as speed control.

DC fans have the speed controller in-built to the fan so there is no way of controlling the speed by playing with the AC feed. Your only option is replicating the OEM remote as per Ron’s example.

Thank you Ron

i did what you told me and its running. the only down side is that it has no feedback to home assistant. when the physical switch in ON, home assistant does not know the state.

any controller that is available out there like iFan03 on DC motor?

Thank you

I use this this card from HACS

image
The TV Room Fan is a DC fan and it does show the state when controlled from HA but does not show state if controlled from the original remote.

1 Like

I’, guessing you are using an IR blaster to send commands to the fan? You could connect a power monitor device to the fan so it’s state can be relayed back to HA based on the current draw.

Yes, I could but the DC FAN is a ceiling fan so involves quite a bit of work as I have high (3+ m) on raked ceilings.
I am a Technician and IT person in my working life so know what to do but…
It does not bother me that the remote does not reflect into HA as I rarely use it anyway.
I mostly control FAN from Automations or my phone using HA companion.

Thank you all.

Its working as per Sparkydave recommendation. i replicating the button and it works. the issue ive got now is that whenever home assistant restart the fan state is on OFF position but the fan is still running.
ive tried several ways such as retainpower, retain switch… saver, restore but not working.

thank you

Hello there,

I need some help with fan-percent-button-row, when I pressed a velocity button this do not assume is color (the fancoil it works fine, the percentage is a mqtt command to onewire device)

Thanks

show_header_toggle: false
tap_action:
  haptic: success
type: custom:fan-percent-button-row
name: Soppalco
entity: fan.soppalco_fan
customSetpoints: true
customTheme: true
allowDisablingButtons: false
lowPercentage: 16
medPercentage: 8
hiPercentage: 4
customHiText: 3
customMedText: 2
customLowText: 1
width: 50px
height: 40px
isOffColor: 'red'
isOnLowColor: 'green'
isOnMedColor: 'orange'
isOnHiColor: 'yellow'
buttonInactiveColor: 'gray'
state_color: true

Can you do me a favor and try reversing the percentage setpoints?

lowPercentage: 4
medPercentage: 8
hiPercentage: 16

I remember there was an issue a while back if the low was actually the highest number is wouldn’t work correctly. I thought I fixed it tho.

And just to clarify…you are saying that the fan actually turns on the correct speed but it’s just that the buttons don’t change color to reflect the actual speed?

Hello, nothing changed,

type: custom:fan-percent-button-row
name: Soppalco
entity: fan.soppalco_fan
customSetpoints: true
customTheme: true
allowDisablingButtons: false
lowPercentage: 4
medPercentage: 8
hiPercentage: 16
customHiText: 3
customMedText: 2
customLowText: 1
width: 50px
height: 40px
isOffColor: red
isOnLowColor: green
isOnMedColor: orange
isOnHiColor: yellow
buttonInactiveColor: gray
state_color: true

fan.yaml:

#Fan
#Prova
  - platform: template
    fans:
      soppalco_fan:
        friendly_name: "Soppalco fancoil"
        value_template: "{{ states('input_boolean.state') }}"
        percentage_template: "{{ states('input_number.percentage') }}"
        #preset_mode_template: "{{ states('input_select.preset_mode') }}"
        #oscillating_template: "{{ states('input_select.osc') }}"
        #direction_template: "{{ states('input_select.direction') }}"
        turn_on:
          service: script.fan_sopp_on
        turn_off:
          service: script.fan_sopp_off
        set_percentage:
          service: script.fan_sopp_speed
          data:
            percentage: "{{ percentage }}"
        optimistic: "true"
        #set_preset_mode:
        #  service: script.fans_set_preset_mode
        #  data:
        #    preset_mode: "{{ preset_mode }}"
        #speed_count: 4
        #preset_modes:
        #  - '4'
        #  - '8'
        #  - '16'
        #  - '0'

script.yaml

fan_sopp_speed:
  alias: fan_sopp_speed
  sequence:
  - service: mqtt.publish
    data:
      topic: homeassistant/sensor/onewire
      qos: '0'
      payload_template: owwrite fancoil6/PIO.BYTE {{ percentage }}
fan_sopp_on:
  alias: fan_sopp_on
  sequence:
  - service: mqtt.publish
    data:
      topic: homeassistant/sensor/onewire
      qos: '0'
      payload_template: owwrite fancoil6/PIO.BYTE 16
fan_sopp_off:
  alias: fan_sopp_off
  sequence:
  - service: mqtt.publish
    data:
      topic: homeassistant/sensor/onewire
      qos: '0'
      payload_template: owwrite fancoil6/PIO.BYTE 0

How does the ā€˜input_boolean.state’ and ā€˜input_number.percentage’ get updated to the correct current value?

I don’t know what happened, but I’ve reviewed all, rewrite {{ percentage}} (exactly only deleted adn rewrite) and puff… works fine and perfectly.

You think it’s possible to put the icon of the fan (entity) on moving when is state is on?

1 Like

No it’s not possible as far as I know at least with the built-in stuff or my plugin.