예제 #1
0
 def new_activity(self, activity_id):
     """Call for updating the current activity."""
     import pyharmony
     activity_name = pyharmony.activity_name(self._config, activity_id)
     _LOGGER.debug("%s activity reported as: %s", self._name, activity_name)
     self._current_activity = activity_name
     self._state = bool(self._current_activity != 'PowerOff')
     self.schedule_update_ha_state()
예제 #2
0
 def new_activity(self, activity_id):
     """Call for updating the current activity."""
     import pyharmony
     activity_name = pyharmony.activity_name(self._config, activity_id)
     _LOGGER.debug("%s activity reported as: %s", self._name, activity_name)
     self._current_activity = activity_name
     self._state = bool(self._current_activity != 'PowerOff')
     self.schedule_update_ha_state()