Automated dimming with level change

I wasn’t sure how to word the title…

Since a lot of newer ZWave Plus switches and dimmers report state changed back to HA (My Leviton ones do, the older first gen ZWave didn’t), Is there a way to set up an automation in HA that watches a specific dimmer, and between certain hours, if the dimmer level goes above a threshold, say 40%, HA automatically sets it back to a specific value, say 25%? Basically, I have a light that I’d like to set so between say 8pm and 1am, (using previously mentioned random values) if the light level is increased at the switch and exceeds 40%, it is automatically reduced back to 25%. Is this possible?

Create an automation with a Numeric State Trigger that monitors the light’s brightness attribute for when it increases above the threshold.

between say 8pm and 1am

Use a Time Condition

HA automatically sets it back to a specific value, say 25%

Use a light.turn_on service call to set the light’s brightness to the desired level.

alias: example
trigger:
  - platform: numeric_state
    entity_id:
      - light.one
      - light.two
      - light.three
    attribute: brightness
    above: 105
condition:
  - condition: time
    after: '20:00'
    before: '01:00'
action:
  - service: light turn_on
    target:
      entity_id: "{{ trigger.entity_id }}"
    data:
      brightness: 63

Sweet, that worked great! Thank you!

1 Like

You’re welcome!

Please consider marking my post above with the Solution tag. It will automatically place a check-mark next to the topic’s title which signals to other users that this topic has been resolved. This helps users find answers to similar questions.

For more information about the Solution tag, refer to guideline 21 in the FAQ.