Inovelli Switch Hold Button to Dim

It’s not quite real time since it won’t set the brightness level until your hand is off the switch, but I use this automation to get my light to match the brightness level of the switch, which is an inovelli red dimmer.

alias: Light Bedroom Mirror Switch On
description: ''
trigger:
  - platform: state
    entity_id: light.bedroom_wall_switch
condition:
  - condition: template
    value_template: >-
      {{  states.light.bedroom_wall_switch.last_updated >
      states.light.bedroom_fan.last_changed }}
action:
  - service: light.turn_on
    entity_id: light.bedroom_fan
    data_template:
      brightness: >
        {{ state_attr('light.bedroom_wall_switch', 'brightness') | default(0,
        true) }}
mode: single

I tried a mirror the other way so the switch would match the level of the light, but it would create a race condition where the light kept going on and off.

2 Likes