def properties_changed(self, sender, changed_properties, invalidated_properties):
if '<STR_LIT>' in changed_properties:<EOL><INDENT>if changed_properties['<STR_LIT>']:<EOL><INDENT>self.connect_succeeded()<EOL><DEDENT>else:<EOL><INDENT>self.disconnect_succeeded()<EOL><DEDENT><DEDENT>if ('<STR_LIT>' in changed_properties and changed_properties['<STR_LIT>'] == <NUM_LIT:1> and<EOL>not self.services):<EOL><INDENT>self.services_resolved()<EOL><DEDENT>
Called when a device property has changed or got invalidated.