patrickcollins12/esphome-fan-controller

One console with two separate connected fans

Closed this issue · 2 comments

Hello,

first of all respect and thanks for the guide! It was fun building it.
I connected two fans (one for in, one for out) to different pins. - I know I could have just soldered them together, but I didn't want to. - I can now control both separately and also get all sensor values output separately.

But I would like to specify only one target temperature value via the console and this should be given to both output IDs.

Is this possible? As far as I understand, I would have to specify both IDs of the "cool_output" here in the code. But I can't find the syntax for it.

climate:
  - platform: pid
    name: "Console Fan Thermostat Out"
    id: console_thermostat_out
    sensor: console_fan_temperature

    # It is summer right now, so 30c is a decent target.
    default_target_temperature: 30°C
    cool_output: console_fan_speed

this is not possible, you can only specify one output.
this is my solution:

substitutions:
  nodename: fancontrol
  - platform: template
    id: pwm_merge
    type: float
    write_action:
      - output.set_level:
          id: ${nodename}_pwm_inward
          level: !lambda return state;
      - output.set_level:
          id: ${nodename}_pwm_outward
          level: !lambda return state;
# PWM Fan inward
  - platform: ledc
    pin: GPIO26
    id: ${nodename}_pwm_inward
    frequency: 25khz
# PWM fan  outward
  - platform: ledc
    pin: GPIO25
    id: ${nodename}_pwm_outward
    frequency: 25khz 
cool_output: pwm_merge

Thanks very much! It works as expected! :)