fellinga / node-red-contrib-ui-time-scheduler

Easily power on/off any kind of device based on a schedule that you can easily create at the node-red-dashboard frontend.
MIT License
37 stars 15 forks source link

cannot delete timers #94

Closed simon276 closed 9 months ago

simon276 commented 10 months ago

hi, im trying to delete all existing timers using the input of the node.

i already tried:

msg.payload = { timers: null, settings: null } msg.payload = { timers: [], settings: {} }

and so on.

it looks like the undefined / null values are ignored. is there any possibilty to delete the timers?

fellinga commented 10 months ago

Hi @simon276,

the nodes input expects a JSON string, not an object. You need to pass the payload like this:

msg.payload = '{"timers":[],"settings":{}}';

Please let me know if this helps!