kireque / esphome_nebula_light

50 stars 2 forks source link

Motor speed #3

Closed Th3M1k3y closed 1 year ago

Th3M1k3y commented 1 year ago

I just did this to my nebula light too, and it is working great.

One thing I noticed was the motor speed had a pretty limited range where the speed was actually adjusted. Changing that from being a light to being a fan disable light correction, and instead return a linear output. This makes it easier to adjust the speed of the motor.

kireque commented 1 year ago

Can you share your code? I will update the readme.

Or create a pull request. :)

Th3M1k3y commented 1 year ago

I have changed too much to just be able to make a pull request, but I can share the fan part

fan:
  platform: speed
  name: "${friendly_name} Motor"
  id: motor
  output: motor_pwm
  restore_mode: ALWAYS_OFF

and then just remove the

  - platform: monochromatic
    name: "${friendly_name} Motor"
    id: motor
    output: motor_pwm
    restore_mode: ALWAYS_OFF

part under light.

To set the speed with the button press you need to change it to

        - output.set_level:
            id: motor_pwm
            level: 25%
kireque commented 1 year ago

Thanks, works like a charm! I have updated the readme.

I also noticed that changing the speed of the motor had some issues. Never looked deeper into it. Learning every day 😄