Hi.
I’m trying to create an automation for dimming of lights, but I encountered 2 problems I cannot find answers to:
- When dimming down, I would like for the automation to stop at 5% brightness, and not turn the light off as it does by default.
- How to set the speed for each repeat? Transition time doesn’t seem to do anything.
This is what I have created so far:
alias: Kontor - Lys m/Dimming
description: ""
trigger:
- platform: device
domain: mqtt
device_id: cda80baae48ac45754dbbfde1e575929
type: action
subtype: on_press
id: kontor_lysbryter_on_press
- platform: device
domain: mqtt
device_id: cda80baae48ac45754dbbfde1e575929
type: action
subtype: on_hold
id: kontor_lysbryter_on_hold
- platform: device
domain: mqtt
device_id: cda80baae48ac45754dbbfde1e575929
type: action
subtype: off_press
id: kontor_lysbryter_off_press
- platform: device
domain: mqtt
device_id: cda80baae48ac45754dbbfde1e575929
type: action
subtype: off_hold
id: kontor_lysbryter_off_hold
- platform: device
domain: mqtt
device_id: cda80baae48ac45754dbbfde1e575929
type: action
subtype: up_hold
id: kontor_lysbryter_up_hold
- platform: device
domain: mqtt
device_id: cda80baae48ac45754dbbfde1e575929
type: action
subtype: down_hold
id: kontor_lysbryter_down_hold
- platform: device
domain: mqtt
device_id: cda80baae48ac45754dbbfde1e575929
type: action
subtype: up_press_release
id: kontor_lysbryter_up_release
- platform: device
domain: mqtt
device_id: cda80baae48ac45754dbbfde1e575929
type: action
subtype: down_press_release
id: kontor_lysbryter_down_release
condition: []
action:
- alias: Increase brightness when HOLD UP
if:
- condition: trigger
id:
- kontor_lysbryter_up_hold
then:
- service: light.turn_on
metadata: {}
data:
brightness_step_pct: 15
target:
device_id: cd8b8eb00c811c9314167cbbde29e6ad
- repeat:
sequence: []
until:
- condition: trigger
id:
- kontor_lysbryter_up_release
- alias: Decrease brightness when HOLD DOWN
if:
- condition: trigger
id:
- kontor_lysbryter_down_hold
then:
- service: light.turn_on
metadata: {}
data:
brightness_step_pct: -15
target:
device_id: cd8b8eb00c811c9314167cbbde29e6ad
- repeat:
sequence: []
until:
- condition: trigger
id:
- kontor_lysbryter_down_release
mode: restart
Thanks