Skip to content

Noisy driver logging when using a light with driver #1891

@bosh

Description

@bosh

When using a driver for a flasher or other light, there is an info log on _enable_now at

self.info_log("Enabling Driver with power %s (pulse_ms %sms and pulse_power %s)", hold_power, pulse_ms,

that can be excessively noisy. I can live with it, but maybe it's reasonable to add a config override (or should I just deal with it until I turn off info logging?)

Setup example:

coils:
  c_start_driver:
    allow_enable: true

lights:
  l_start:
    number: c_start_driver
    platform: drivers
    type: r     # single color flasher type bulb

# + a light show on the light

Output ends up being like

12:43:31.212 : INFO [coil.c_start_driver] Enabling Driver with power 0.07500000058207662 (pulse_ms 10ms and pulse_power 1.0)
12:43:31.242 : INFO [coil.c_start_driver] Enabling Driver with power 0.2 (pulse_ms 10ms and pulse_power 1.0)
12:43:31.429 : INFO [coil.c_start_driver] Enabling Driver with power 0.19333333379899464 (pulse_ms 10ms and pulse_power 1.0)
12:43:31.463 : INFO [coil.c_start_driver] Enabling Driver with power 0.4666666666666667 (pulse_ms 10ms and pulse_power 1.0)
12:43:31.649 : INFO [coil.c_start_driver] Enabling Driver with power 0.5316666667830819 (pulse_ms 10ms and pulse_power 1.0)
12:43:31.681 : INFO [coil.c_start_driver] Enabling Driver with power 0.6666666666666666 (pulse_ms 10ms and pulse_power 1.0)
12:43:31.871 : INFO [coil.c_start_driver] Enabling Driver with power 0.7666666674427688 (pulse_ms 10ms and pulse_power 1.0)
12:43:31.901 : INFO [coil.c_start_driver] Enabling Driver with power 1.0 (pulse_ms 10ms and pulse_power 1.0)
12:43:32.150 : INFO [coil.c_start_driver] Enabling Driver with power 1.0 (pulse_ms 10ms and pulse_power 1.0)
12:43:32.184 : INFO [coil.c_start_driver] Enabling Driver with power 0.40000000116415324 (pulse_ms 10ms and pulse_power 1.0)
12:43:32.214 : INFO [coil.c_start_driver] Disabling Driver

for just a 1 second piece of light show on the light. Actually looking at the show, I guess that's because I hit 5 different brightness levels in that loop as it fades on/off, but no other light is spamming like this.

Using console_log: none on the driver definition did not reduce the logging either.

I'd propose either linking this to console_log or adding a new property to coils/drivers. Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions