#light.turn_on setting brightness does not turn on light

1 messages · Page 1 of 1 (latest)

blazing glacier
#

I have an automatisation for dimming light by pressing one button in step as % of current brightness, works fine, turns off light when brightness = 0

I have another automatisation for increasing light, but when light is turned off, then the automatisation does not turn it on.

If I change brightness: >- value to 1 then it turns light on.

I have tried checking if currbright is below 0 and then set it to 1, does not help.

The complete automatisation is included here:

alias: "Test Brightness increase"
description: ""
triggers:
  - domain: mqtt
    device_id: deviceid
    type: action
    subtype: arrow_right_click
    trigger: device
conditions: []
actions:
  - action: light.turn_on
    metadata: {}
    data:
      brightness: >-
        {% set currbright = state_attr('light.stueglod', 'brightness') | int %}
        {{ currbright + (currbright * 0.1 + 1) }}
    target:
      entity_id: light.stueglod
mode: single

Thank you for helping me.