Hey,
i want an automation that turns on my office lamp, when my pc is on and its dark outside (don't got a light level sensor yet).
Here is my actual automation:
description: ""
mode: single
triggers:
- minutes: /1
trigger: time_pattern
- type: turned_on
device_id: d28db8e23301483c2a1bb0b2b832ef50
entity_id: 828b89bbee6dd4fb17a161c2b087f61c
domain: switch
trigger: device
conditions:
- condition: sun
before: sunrise
after: sunset
after_offset: "-00:45:00"
- condition: or
conditions:
- condition: device
type: is_on
device_id: d28db8e23301483c2a1bb0b2b832ef50
entity_id: 828b89bbee6dd4fb17a161c2b087f61c
domain: switch
actions:
- type: turn_on
device_id: 66fe6f3c8873df09795ecce41c2441a9
entity_id: light.tl01
domain: light```
The issue is, when i manual turn off the lamp, it turns automatically on again, because the trigger still works.
It should only trigger once, per pc on (f.e. when i turn the PC off at 22:00 and on again at 23:00, the lamp should go on, even when i manual turned off the lamp at 21:55).
Has anyone a good way to do this?