controller_fan: Allow multiple controller_fan sections to be defined

It may be necessary to define multiple fans, so allow each config
section to be named.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2019-03-10 13:57:01 -04:00
parent 19c7955f2a
commit d3f6dad853
4 changed files with 10 additions and 3 deletions

View file

@ -49,5 +49,5 @@ class ControllerFan:
self.fan.set_speed(print_time, power)
return eventtime + 1.
def load_config(config):
def load_config_prefix(config):
return ControllerFan(config)