Automation condition light brigthness returns false

I have an automation where if I use ‘run actions’ the second condition, testing brightness, returns false even though the developer tools state says the condition should match.
I’m not sure the light actually supports a brightness of 1, so it might be the issue…

alias: Test
description: ''
trigger:
  - platform: state
    entity_id: sun.sun
    from: above_horizon
condition: []
action:
  - condition: state
    entity_id: light.caleb_s_lamp
    state: 'on'
  - condition: state
    entity_id: light.caleb_s_lamp
    attribute: brightness
    state: '1'
  - condition: state
    entity_id: light.caleb_s_lamp
    attribute: color_temp
    state: '454'
  - service: notify.notify
    data:
      message: Test run success
mode: single

From developer tools for this light:

min_mireds: 250
max_mireds: 454
supported_color_modes:
  - color_temp
color_mode: color_temp
brightness: 1
color_temp: 454
off_brightness: null
friendly_name: Caleb's Lamp
supported_features: 43

OK the first condition returns true, the second returns false…

action:
  - condition: template
    value_template: '{{ state_attr(''light.caleb_s_lamp'',''brightness'') == 1 }}'
  - condition: state
    entity_id: light.caleb_s_lamp
    attribute: brightness
    state: '1'

:confused:

One is string the other integer.

That’s it! Thanks :slight_smile:
Is there a ‘correct’ solution to this? Do I put '' around the numbers or use | int?

The problem is that you are trying to compare a number with a string.
image

remove the '

Will do, thanks very much