Exemplo n.º 1
0
    def turn_on(self, **kwargs):
        """Start an activity from the Harmony device."""
        import pyharmony
        activity = kwargs.get(ATTR_ACTIVITY, self._default_activity)

        if activity:
            activity_id = pyharmony.activity_id(self._config, activity)
            self._client.start_activity(activity_id)
            self._state = True
        else:
            _LOGGER.error("No activity specified with turn_on service")
Exemplo n.º 2
0
    def turn_on(self, **kwargs):
        """Start an activity from the Harmony device."""
        import pyharmony
        activity = kwargs.get(ATTR_ACTIVITY, self._default_activity)

        if activity:
            activity_id = pyharmony.activity_id(self._config, activity)
            self._client.start_activity(activity_id)
            self._state = True
        else:
            _LOGGER.error("No activity specified with turn_on service")