Universal Default Brightness

I am looking for a method to set the default brightness level for lights. I have attempted automations, scripts, and light_profiles.cvs. I have not found a universal solution that meets my needs.

I need the following:

  1. Universal - brightness is applied regardless of method for turning on the light (e.g. physical switch, home assistant UI, service light.turn_on, voice commands via Google Assistant).
  2. No flashing - the light must turn on to the specified default brightness immediately and not first to a brighter value and then quickly dim.
  3. Adjustable without restarting home assistant. Need to be able to change the default brightness via automations without restarting HA.

It seems like such an easy request, yet in hours/days/weeks/months of searching I have not found a viable solution.

What I have tried:

  • Automations and Scripts: when light turns on, set brightness to X
    • This results in the lights first turning on to their previous value, which may be 100% brightness, before quickly dimming to the “default” value set by the automation.
  • light_profiles.csv: define default brightness values for all lights and/or individual lights
    • This works when lights are turned on via the Home Assistant UI and when using service light.turn_on, but it does not control the brightness when lights are turned on physically from a switch.
  • Z-wave “default brightness level” parameter
    • The opposite of above: works when lights are turned on physically from a switch, but is not applied when lights are turned on via the Home Assistant UI and when using service light.turn_on.
  • Combination of light_profiles.csv and Z-wave “default brightness level” parameter
    • This does work, but is not adjustable unless HA is restarted. light_profiles.csv cannot be reloaded without restarting HA.

Help please :pray:

Edit: is there anyway to get HA to respect the Z-wave “default brightness level” parameter when turning on lights from the UI? This would meet all of my needs.

Because the light’s ‘power on’ behavior is controlled by the light’s firmware.

Commands sent from Home Assistant to turn on a light (along with other characteristics like brightness, color, color temperature, etc) are processed after the light executes the ‘power on’ behavior defined by its firmware.

If a light’s technology (like ZigBee, zwave, UPB, Insteon, etc) supports native “scenes” (terminology may vary) you can define a native scene in advance (it’s stored in the light) then activate it from Home Assistant (typically the light’s integration will represent the native scene as a Home Assistant scene) when needed.

When you activate it, the light typically foregoes its normal ‘power on’ behavior and instantly applies the native scene. The main difference is that Home Assistant isn’t sending “light turn on with these characteristics” but “activate your native scene X”.

This is somewhat helpful, although I have not found a way to activate native scenes for my z-wave switches when physically turning on the switch. Also, I would need to reconfigure much of my HA UI to replace the default switch toggles with another method that will directly activate these scenes.

Thank you for the suggestion, but it does not fulfill #1.

It was meant to explain why you cannot fulfill #1.

Got it.

Is there anyway to get HA to respect the Z-wave “default brightness level” parameter when turning on lights from the UI? This would meet all of my needs.

I don’t know the answer.

The Z-Wave integration has several native service calls so maybe one of them can do that (just speculating here).

Thanks, I appreciate your help, I will check it out!

What are you referring to as the “Z-wave default brightness level”? The default behavior for the light turn_on service (with no brightness level set) is to “restore most recent (non-zero) level”. The Z-Wave specification does not provide a “default brightness level”.

Using the Z-Wave JS Integration, Open a Device and under Device Info there is a CONFIGURE button which allows you to set various values for the z-wave device. One of these values is the Default Brightness Level.

image

Unfortunately, Home Assistant does not respect this Default Brightness Level when lights are turned on from the HA UI.

That configuration item is specific to your device, it is not common to all Z-Wave light switches. There is no provision in the Z-Wave specification for the behavior you want. As configuration parameters differ between devices and manufacturers, the only way to support this would be custom code for every device.

If you want to do this manually, you can create a couple of template entities. First, you need a sensor for the configuration parameter, using the zwave_js.value_updated trigger platform. Then, you could create a light template entity that references the config param sensor for it’s turn_on service. Or some kind of script that turns on the light with the value of the config param sensor.

Alternatively, you can try to contact the vendor and ask them to implement this behavior in the product itself. Probably a long shot.

1 Like