Trying to use light level attribute as automation condition

I have some Lightwave Gen 2 Lights. They run wall lights and a central light (big light) in a room. I am trying to create an automation to automatically switch off the central light when I switch off the wall lights, but only if the central light brightness level is less than 50%.

This is what I have:

Can anyone help?

Hi there. Please try the below config. I have used template in condition instead of numeric state.

alias: Lounge Wall Light Off
description: ''
mode: single
trigger:
  - platform: state
    entity_id: light.lounge_wall_lights
    to: 'off'
    from: 'on'
condition:
  - condition: template
    value_template: '{{state_attr(''light.big_light_2'', ''lwrf_dimlevel'')|int<50}}'
action:
  - service: light.turn_off
    target:
      entity_id: light.big_light_2

If you have any trouble copying the automation please check the below gif.

In order to help you its easier if you post your code (instead of an image).

How to help us help you (point 11).

No Problem. I will remember in future.
For this issue, I fixed it! I had 2 contradictory Automations. I disabled one and everything works :slight_smile: