For some reason one of my automations seems to have a ghost copy which is an older version of the current automation that runs. When I check the logs the trace still links to automation with the newer settings. Even when I disable the automation the ghost copy of it still triggers.
alias: "Computer: Notify when program is idle"
description: ""
trigger:
- platform: template
value_template: |-
{% if states('sensor.bedroom_pc_last_active') != 'unavailable' %}
{{
not (
states('sensor.bedroom_pc_active_window') == 'Steam' or
states('sensor.bedroom_pc_active_window') == 'JDownloader 2' or
states('sensor.bedroom_pc_active_window') == 'VirtualHere Client' or
states('sensor.bedroom_pc_active_window') == 'File Explorer' or
states('sensor.bedroom_pc_active_window') == 'Task Manager' or
'Google Chrome' in states('sensor.bedroom_pc_active_window')
) and
(now() - timedelta(minutes=60) > as_datetime(states('sensor.bedroom_pc_last_active')).astimezone())
}}
{% endif %}
condition: []
action:
- service: notify.mobile_app_joe_s20
data:
message: "{{ states('sensor.bedroom_pc_active_window') }} has been left idle."
title: Bedroom PC
data:
sticky: "true"
notification_icon: mdi:alert
actions:
- action: notify_alf
title: Notify Alf
- action: close
title: Ignore
- wait_for_trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: notify_alf
- platform: event
event_type: mobile_app_notification_action
event_data:
action: close
timeout:
hours: 12
minutes: 0
seconds: 0
milliseconds: 0
continue_on_timeout: false
alias: Wait for notification response
- if:
- condition: template
value_template: "{{ wait.trigger.event.data.action == \"notify_alf\"}}"
then:
- service: script.computer_quit_program
data: {}
alias: Fire TTS message if notify action has been chosen
mode: restart