def _on_power_state(self, header, payload, rest, addr):
with self.lock:<EOL><INDENT>self.power_state[header.mac] = payload<EOL>if len(self.power_state) >= self.num_bulbs:<EOL><INDENT>self.power_state_event.set()<EOL><DEDENT><DEDENT>self.callbacks.put(EVENT_POWER_STATE, self.get_bulb(header.mac),<EOL>is_on=bool(payload['<STR_LIT>']))<EOL>
Records the power (on/off) state of bulbs, and forwards to a high-level
callback with human-friendlier arguments.