Hey Everyone,
I have a TP-Link smart plug monitoring my laundry washing machine. The device integration was created using the standard integrations UI method. It now happily monitors my washing machine power usage every 10 seconds.
However, I would like it to ping the device every 2 seconds when in use (power usage >0).
I’ve set up an automation to detect when the washer is in use or not. I also created a script using the Scripts user interface to run within a “repeat until” automation. However, I get an error when executing the script:
extra keys not allowed @ data[‘device_id’]
What could be causing the error and how could I fix it? Is there a better way to emulate dynamic scan intervals?
Here is the script:
alias: Ping Washer then wait 2 seconds
sequence:
- service: homeassistant.update_entity
data: {}
target:
device_id: 41f1e1fed4ff9badc95f969bda1e1426
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
mode: single