def set_switch_state(self, state):
self.set_service_value(<EOL>self.switch_service,<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>state)<EOL>self.set_cache_value('<STR_LIT>', state)<EOL>
Set the switch state, also update local state.