Force automation re-check

Hey, I have this automation: whenever my PC is on and it’s dark outside, the desk WLED turns on. The automation otherwise works fine, but if I turn on my PC during the day when it’s bright outside and then it gets dark, the automation is not triggered.

Is there any way to force a re-check, or could I somehow customize my automation?

alias: Desk light turn ON
description: “”
trigger:

  • platform: state
    entity_id:
    • device_tracker.gamingpc
      to: home
      id: home
      condition:
  • condition: numeric_state
    entity_id: sensor.home_outdoor_illuminance
    below: 950
    action:
  • type: turn_on
    device_id: d92fa6fc4104075b7b88f0138d3b337e
    entity_id: 53628b4a0ce3185406d5a74834e555b1
    domain: light
    mode: single

Yes, add a tigger for the illumination going below 950 and add a state condition that your PC is “home”.

Also please use code blocks, not quotes to format your config.

So something like this should work?


alias: Desk light turn ON
description: ""
trigger:
  - platform: numeric_state
    entity_id:
      - sensor.home_outdoor_illuminance
    below: 950
condition:
  - condition: state
    entity_id: device_tracker.gamingpc
    state: home
action:
  - type: turn_on
    device_id: d92fa6fc4104075b7b88f0138d3b337e
    entity_id: 53628b4a0ce3185406d5a74834e555b1
    domain: light
mode: single

Another question, If I understood correctly the numeric state trigger will only work when the value goes from above 950 to below it. So if I turn my PC on during the night, while the value will be under 950 the trigger wouldn’t work, right? Or did I misunderstand something?

And also sorry, my bad. Clicked the wrong formatting button.

You can add the triggers and conditions to your existing automation. No need to make a new one.

That way it still turns on at night when you turn the PC on.

Ah I see. Thanks for the help.