Thank you Gary! Yes, temporary and hub variable but this gave a lot of work because of the amount of devices.
In this thread you can see my rules