Nfc to interfere a flow

Hello, im a newbie and trying to learn improve little by little :slight_smile: i have a small question, in my flow bathroom light will close in 4 minute but i want to add a tag and when i touch that nfc timer become 30 minute (shower time), couldnt manage to do it and need some ideas please

Ekran Alıntısı

Hi @wolfbastion :slightly_smiling_face:

In your trigger node setup, tick "extend delay if new message arrives" and "override delay with msg.delay".

In processing your NFC touch, use a change node to set msg.delay to 30 minutes (as milliseconds).

1 Like

Thank you so much i mange to including nfc to system but there is one problem, since triger delete first message when second come, motion sensor keep sending new commends so nfc's get ignored the second motion stop

Ok perhaps this would work:

Have a context variable flow.duration.
When motion is detected, if the variable is not defined, set it to 4 minutes.
When you touch the NFC sensor, use a trigger to set flow.duration to 30 minutes and after 30 minutes set it to 4 minutes.
When you turn the light on, copy flow.duration to msg.delay.

So 30 minutes can override 4 minutes but not vice versa.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.