Closed lethuer closed 11 months ago
All my projects and their code are presented as tutorials. The idea being you are free to copy and update where you see fit. Feel free to open a PR and adjust/update as required.
I added my code, maybe you could help me or you have an idea which could be the problem ?
I added my code, maybe you could help me or you have an idea which could be the problem ?
I hope you can appreciate I don't have much spare time to debug peoples' code. Soz.
my code is just a copy from yours and duty cycle part is just adjusted to my needs... so i think my questions are really specific and my detected issues could be present in your code aswell :)
btw: I labeled my original post with "help wanted", but obviously this label isn't visible. how to label this issue correctly ?
"call.set_speed(0)" is an invalid option for the "Fan:" component - Which is one of the reasons I added the MOSFET.
call.set_speed(0)
This was my first try to get this solved but it didn't changed anything.
After powering up the esp I get a percentage value of 0 until the starting temperature is reached for the first time, so it should be possible to write 0% on shutting off the fan ?
Maybe I have a workaround for my issues:
to avoid turning on with 100% duty cycle after powering up and reaching startup temperature for the first time I modified the fan component like below;
fan:
- platform: speed
id: the_fan
output: fan_pwm
name: $name Fan
speed_count: 100
on_turn_on:
- switch.turn_on: fan_power
- logger.log: "Fan Turned On"
**- fan.turn_on:
id: the_fan
speed: 1 #turn on the fan with initially 1% instead of 100%
#- output.set_level: # alternative approach for turning on with initially 1% instead of 100%
# id: fan_pwm
# level: 1**
on_turn_off:
- switch.turn_off: fan_power
- logger.log: "Fan Turned Off"
regarding my second issue with 0% duty cycle indeed it seems to be impossible to write 0%. because I'm using the duty cycle value in a graph and I want to see 0% if fan is turned off I created an automation inside homeassistant with a input number helper which writes 0% if fan is off and takes over the percentage value if fan is on.
alias: Balkonkraftwerk Helper Lüfterzustand PWM
description: ""
trigger:
- platform: state
entity_id:
- fan.wr_lufter_balkonkraftwerk_media_centre_fan
condition: []
action:
- if:
- condition: state
entity_id: fan.wr_lufter_balkonkraftwerk_media_centre_fan
state: "off"
then:
- service: input_number.set_value
data_template:
entity_id: input_number.balkonkraftwerk_helper_lufter_pwm
value: 0
- if:
- condition: state
entity_id: fan.wr_lufter_balkonkraftwerk_media_centre_fan
state: "on"
then:
- service: input_number.set_value
data_template:
entity_id: input_number.balkonkraftwerk_helper_lufter_pwm
value: >-
{{ state_attr('fan.wr_lufter_balkonkraftwerk_media_centre_fan',
'percentage') }}
mode: single
I will see if that works...
You have changed both the circuit and the code, this is now different from my design and tutorial.
Hi ! I added some features to the code which I want to share:
Here is the code: FanController.txt
Here is the schematic: Schematic_Fansteuerung_2023-09-29.pdf
I have two small problems to which I would like to ask for help: