Good day Fellow Home assistant enthusiasts. I apologize if this topic has been covered. I have not been able to find anything. I Have many sonoff products all working using AlexxIT so none of my sonoffs are flashed. Everything is working very well. Recently I realized that I am not able to control fan speed of my Ifan03 units from lovelace. I have not found a solution. Is there anyone that can shed some light on this for me. Please note that my devices are not flashed with tasmota so I cannot use MQTT. Many thanks
You have to create a script for each speed.
then automate based on template state.
script example :
fan_low:
sequence:
- service: fan.set_speed
data:
entity_id: fan.sonoff_fan
speed: low - service: fan.turn_off
entity_id: fan.sonoff_fan
fan_med:
sequence: - service: fan.set_speed
data:
entity_id: fan.sonoff_fan
speed: medium - service: script.turn_off
entity_id: script.fan_med
fan_high:
sequence: - service: fan.set_speed
data:
entity_id: fan.sonoff_fan
speed: high - service: script.turn_off
entity_id: script.fan_high
Automation example :
- alias: vitesse fan
trigger:- platform: state
entity_id: input_select.vitesse_fan
from: Choisir
action: - service: script.turn_on
data_template:
entity_id: “{% if is_state(“input_select.vitesse_fan”, “Low”) %}\n script.fan_low\n
{% elif is_state(“input_select.vitesse_fan”, “Medium”) %}\n script.fan_med\n
{% elif is_state(“input_select.vitesse_fan”, “High”) %}\n script.fan_high\n
{% else %} {% endif %}\n” - service: input_select.select_option
entity_id: input_select.vitesse_fan
data_template:
option: Choisir
- platform: state
May be not the best way to do it, but works very well
Could you sent me the RAW code to turn on/off the buzzer, please?
Thank you so much. I will give this a try