The second flow is the right one. The trigger must be “Motion is detected / Motion alarm turned on”.
For luminance values you need to use the Homey build in logic cards in the And… section.
And…
– Logic → is less than → tap the tag → tap the local tag “Brightness” → fill a value in → checkmark