Read Zooz Zen31 Dimmer Value

Giving Home Assistant another go after getting frustrated with OpenHAB (again). I have 2 of these RGBW dimmers and, at the surface, they appear to be working. However, I don’t seem to be able to assign a dimmer value to any of the channels (without using the “Turn On” command with the brightness field) or use the dimmer value for any logic.
Currently, I have a rule that turns the white dimmer on to 25% as a night light after dark. I also have a button that, when pressed, turns the dimmer completely on or off. I would like to add some logic to the night light rule where, if the dimmer is > 25% then make no changes to the state (thus preserving the desired ON state commanded by the button). Unfortunately, I can’t seem to separate the dimmer value from the state of the channel (ON or OFF).
I don’t know if this is ignorance on my part or a limitation of the database. Can someone please tell me what I’m doing wrong?

To follow up - I was able to work around this by using the ON/OFF state of the white channel for logic. It gave me the behavior I wanted but I’m still not seeing a way to read the brightness value in automation. Is there something I’m overlooking?

The solution to this lies in templating. Using the template action in an if statement, I came up with this:

- if:
  - condition: template
    value_template: >-
      {{ state_attr('light.lights_cabinet_lower_white', 'brightness')|int >= 128 }}

The brightness is reported between 0 and 255 (there isn’t a brightness_pct attribute); I’m probably converting to an int unnecessarily but it was late and I don’t feel like testing.