Brightness Automation Not Triggering other Lights

Hello Everyone,

I’m new to home assistant and have VERY limited skills coding. I thought I had my automation setup correctly but for whatever reason when I go into “Traces” it seems the automation is starting halfway through the process and skipping the actual trigger and just simply turning the lights on and off with no automation. Any ideas as to what I did wrong?

The automation is so that when one, or both, lamps are set to 100% brightness to automatically turn on some additional rarely used lights in the room… 99% and below, turn those lights off.

alias: Master Bedroom Couch Lights On
description: >-
  This automatically turns the couch lights on if the lamps are turned to 100%
  brightness
triggers:
  - trigger: state
    entity_id:
      - light.katies_lamp
      - light.michaels_lamp
    attribute: brightness
    to: "100"
conditions:
  - condition: time
    after: "08:00:00"
    before: "21:00:00"
    weekday:
      - mon
      - tue
      - wed
      - thu
      - fri
actions:
  - type: turn_on
    device_id: d788825b906be264c428541e0e3e318c
    entity_id: 854e6bb3dc62917063412c9ef9f658c9
    domain: light
    brightness_pct: 100
  - type: turn_on
    device_id: de64b34c5f5724c3586881fa123754b4
    entity_id: 08e8ba9ab43b2101909cdee9aeae5f70
    domain: light
    brightness_pct: 100
mode: single

Any advice would be greatly appreciated! LOVING home assistant so far and just getting started!

triggers:

  • platform: state
    entity_id:
    • light.katies_lamp
    • light.michaels_lamp
      attribute: brightness
      to: 255

Try that

Err, that prob didnt handle either lamp, just both

trigger:

  • platform: template
    value_template: >
    {{ state_attr(‘light.katies_lamp’, ‘brightness’) == 255 or
    state_attr(‘light.michaels_lamp’, ‘brightness’) == 255 }}

That should trigger if either lamp’s brightness > 99% (255)

1 Like

I couldn’t get your custom code to work as I’m terrible with coding and even copying and pasting seems to be too difficult for me.

That said, changing the code from “100” to 255 resolved all the issues! Good to know! Thank you for our help!

triggers:
  - trigger: state
    entity_id:
      - light.katies_lamp
      - light.michaels_lamp
    attribute: brightness
    to: 255
1 Like

Hey im terrible with getting the formatting to work right on discourse on mobile. Glad we got it sorted regardless!