Closed sbritto0228 closed 1 month ago
Looks like I updated it in my own config and never changed it here 😬 This is what I'm using now:
- name: "Bedroom Fan"
state_topic: "home/hamptonbay/1000/on/state"
command_topic: "home/hamptonbay/1000/on/set"
percentage_state_topic: "home/hamptonbay/1000/speed/state"
percentage_value_template: >-
{% if value == 'low' -%}
1
{%- elif value == 'medium' -%}
2
{%- else -%}
3
{%- endif %}
percentage_command_topic: "home/hamptonbay/1000/speed/set"
percentage_command_template: >-
{% if value | int(default=0) <= 1 -%}
low
{%- elif value | int(default=0) == 2 -%}
medium
{%- else -%}
high
{%- endif %}
speed_range_max: 3
I'll update that in the readme
I used your code kinda -- had to add platform mqtt but now the fan does not turn on or off and no speeds `fan:
light:
You're right, mine's not working as well now that I actually go try it (don't use the fan too often). There must have been a breaking change at some point that invalidated this config, I'll see if I can work out what needs to be changed.
Just pushed a fix for this, it requires re-flashing and a new config, but should handle the states that Home Assistant is sending now.
Let me know if it works now with those changes.
Can't wait to try it out. For now I am having issues with MQTT. Even though I have defined the entitites in cnfiguration.yaml they are not showing up under MQTT entities. Very strange I have to figure that out before I can get to this however thank you!
- light: name: "Kim Fan Light" command_topic: "home/hamptonbay/1010/light/state" state_topic: "home/hamptonbay/1010/light/set"
The speeds are working well but the light is not working now
I think there was an issue with the transmitted state being looped back into the received state, just made a change to try to prevent that, can you flash with the current code an try again?
Thanks again. I re-compiled and uploaded the new sketch. The light works however I have to turn the light on and then turn on the fan. The on and off by itslef do not work. When I turn the fan off, the light does not turn off. I have to turn the off on the light and then the off on the fan. The room has 4 recessed lights and two lamps so we rarely if at all use the fan light. So not very important for me.
Hi Owen,
I used your code and it works great. However with the new MQTT changes I had to change the switch part and the speed of the fan does not work. Basically running on pretty much one speed but on & off are working. Anything I am doing wrong I have tried:
` - fan: name: "Family Room Fan" state_topic: "home/hamptonbay/1101/on/state" command_topic: "home/hamptonbay/1101/on/set" preset_mode_command_topic: "home/hamptonbay/1101/speed/state" preset_mode_command_template: "home/hamptonbay/1101/speed/set" preset_modes:
` - fan: name: "Family Room Fan" state_topic: "home/hamptonbay/1101/on/state" command_topic: "home/hamptonbay/1101/on/set" percentage_state_topic: "home/hamptonbay/1101/percent" percentage_command_topic: "home/hamptonbay/1101/percent" preset_mode_state_topic: "home/hamptonbay/1101/speed" preset_mode_command_topic: "home/hamptonbay/1101/speed" preset_modes: