RedMeKool / HA-Raspberry-pi-GPIO-PWM

Home Assistant component rpi_gpio_pwm as a custom component
MIT License
32 stars 12 forks source link

Frequency Control of Fan PWM #46

Open nkonidaris opened 3 months ago

nkonidaris commented 3 months ago

Checklist

Is your feature request related to a problem? Please describe.

Running the RPI PWM fun as slow speed with a low frequency produces quite a bit of noise.

Describe the solution you'd like

Could you please include the ability to change the PWM frequency for the Fan entity.

Describe alternatives you've considered

Where I can set the frequency in the python script to create my own integration.

Additional context

Home Assistant gives an error when trying to use the Frequnecy: tag when using a Fan.

RedMeKool commented 3 months ago

Hi, you can already use fan.set_percentage service to control the speed of the fan and make your own fan control automation. Or is this not what you require?

nkonidaris commented 3 months ago

Hi, you can already use fan.set_percentage service to control the speed of the fan and make your own fan control automation. Or is this not what you require?

Good day, @RedMeKool

Thanks for your quick response. Perhaps I explained badly, I want to change the PWM Frequency for a given duty cycle. I believe changing the fan speed (set_percentage) will change the PWM duty cycle. However, if the PWM frequency is too low and the duty cycle (fan speed / percentage) is low then it hum's with an annoying tone.

Thanks Nick

casse-boubou commented 3 months ago

Hi! Sorry I don't see frequency property in the Doc :/ https://developers.home-assistant.io/docs/core/entity/fan/

nielsnl68 commented 2 months ago

I would like to have this as well 👍🏼