Change value, 6 hour after the last write

Hello everyone…
I am a little bit confused! :smiley:

I have created a Virtual Parameter that activates/deactivates remote access to the CPE and on update get the values from the CPE.

I want to disable the remote access … 6 hours after the last change…

Is this valid?
declare(“VirtualParameters.RemoteAccess”, (Date.now() - ( 6 * 60 *60 * 1000)), {value: false});

Thank in advance!
Vangelis

1 Like

Close:

const sixHoursAgo = Date.now() - (6 * 60 * 60 * 1000);
declare("VirtualParameters.RemoteAccess", {value: sixHoursAgo}, {value: false});
2 Likes

:smiley: Thank you very much!!