def update(self): """Return current activity.""" import pyharmony name = self._name _LOGGER.debug("Polling %s for current activity", name) state = pyharmony.ha_get_current_activity( self._token, self._config, self._ip, self._port) _LOGGER.debug("%s current activity reported as: %s", name, state) self._current_activity = state self._state = bool(state != 'PowerOff')
def update(self): """Return current activity.""" import pyharmony name = self._name _LOGGER.debug('polling ' + name + ' for current activity') state = pyharmony.ha_get_current_activity(self._token, self._config, self._ip, self._port) _LOGGER.debug(name + '\'s current activity reported as: ' + state) self._current_activity = state self._state = bool(state != 'PowerOff')