I don't see how your arrangement is compliant. Are you saying that the emergency power comes on if and only if there is loss of utility power? What happens then when there's a fire which trips one branch circuit which provides general lighting? Will any emergency lighting come on?
What happens when same fire, or fault of any type, simply causes the lighting branch circuit wiring to open, not tripping the breaker? How would the sensing go of an open circuit, zero current draw, of an unoccupied building/no motion vs a fault? If the motion sensor activates, and branch circuit current = 0, then generator starts?
istm to be prudent to bypass motion sensors if on internal power; the goal is safe egress of the building, or continued work, not energy code compliance. Also, wouldnt be simpler/cheaper/better/safer to have some fixtures on battery back up in case of generator failure?