Move condition check into action sequence after variables are defined. Previously, the condition tried to use 'occupancy_sensors' before it was defined, causing UndefinedError during automation execution.
Move condition check into action sequence after variables are defined. Previously, the condition tried to use 'occupancy_sensors' before it was defined, causing UndefinedError during automation execution.