A script to check sensor last update

FYI, on top of A script to check sensor last update - #25 by Sharkys

and A script to check sensor last update - #39 by Sharkys ,

I created new wake-up scripts for Zigbee lights - seems to be working fine for me without side effects, so feel free to test.

Use case : ensure light is alive (by turning “switched off” light off, “switched on” light again on etc), if failed - report

LOG example :

CONFIG: {
  includeTransports: [ 'zigbee' ],
  includeClasses: [ 'light' ],
  excludeClasses: [
    'sensor',     'button',
    'remote',     'socket',
    'other',      'curtain',
    'blind',      'valve',
    'thermostat', 'fan',
    'lock'
  ],
  includeNamePatterns: [],
  excludeNamePatterns: [ 'Unif', 'Christma', 'group' ],
  verboseSkipLogs: false
}

NOK: Spot Ambiance 3 - light [69.38m] (Last: 24-09-2025, 16:00:02; Reason: threshold 60m)
WAKE try: Spot Ambiance 3 → set onoff=false (noop poke)
NOK: Spot Ambiance 1 - light [69.38m] (Last: 24-09-2025, 16:00:02; Reason: threshold 60m)
WAKE try: Spot Ambiance 1 → set onoff=false (noop poke)
NOK: Lucca Outdoor Pedestal left - light [66.96m] (Last: 24-09-2025, 16:02:27; Reason: threshold 60m)
WAKE try: Lucca Outdoor Pedestal left → set onoff=false (noop poke)
OK:  Ensis Pendant - Lower light - light [0.88m] (Last: 24-09-2025, 17:08:32)
NOK: Spot Ambiance 2 - light [69.38m] (Last: 24-09-2025, 16:00:02; Reason: threshold 60m)
WAKE try: Spot Ambiance 2 → set onoff=false (noop poke)
NOK: Kitchen Light - light [69.38m] (Last: 24-09-2025, 16:00:02; Reason: threshold 60m)
WAKE try: Kitchen Light → set onoff=false (noop poke)
NOK: Welcome Outdoor Floodlight - light [69.38m] (Last: 24-09-2025, 16:00:02; Reason: threshold 60m)
WAKE try: Welcome Outdoor Floodlight → set onoff=false (noop poke)
WAKE ok: Bulb 1600 Lumen White
WAKE ok: Spot Ambiance 1
WAKE ok: Spot Ambiance 3
WAKE ok: Welcome Outdoor Floodlight
WAKE ok: Spot Ambiance 2
WAKE ok: Lucca Outdoor Pedestal left
WAKE ok: Kitchen Light
WAKE ok: Lucca Outdoor Pedestal right

Validation: waiting 5s for capability updates…
Validation: timer API not available in this environment → skipping wait.

RECOVERED: Spot Ambiance 3 (after WAKE) [0.01m] (Last: 24-09-2025, 17:09:26)
RECOVERED: Spot Ambiance 1 (after WAKE) [0.01m] (Last: 24-09-2025, 17:09:26)
RECOVERED: Lucca Outdoor Pedestal left (after WAKE) [0.01m] (Last: 24-09-2025, 17:09:26)
RECOVERED: Spot Ambiance 2 (after WAKE) [0.01m] (Last: 24-09-2025, 17:09:26)
RECOVERED: Kitchen Light (after WAKE) [0.01m] (Last: 24-09-2025, 17:09:26)
RECOVERED: Bulb 1600 Lumen White (after WAKE) [0.01m] (Last: 24-09-2025, 17:09:26)
RECOVERED: Lucca Outdoor Pedestal right (after WAKE) [0.01m] (Last: 24-09-2025, 17:09:26)
RECOVERED: Welcome Outdoor Floodlight (after WAKE) [0.01m] (Last: 24-09-2025, 17:09:26)

---------------------------------------------

Summary (threshold 60 minutes; validation 5 seconds):
OK devices:         2
NOK devices:        0
WAKE attempted:     8
WAKE succeeded:     8

Failed devices list: (none)

Flow example :