How to use the pywemo.ouimeaux_device.switch.Switch.subscription_update function in pywemo

To help you get started, we’ve selected a few pywemo examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pavoni / pywemo / pywemo / ouimeaux_device / coffeemaker.py View on Github external
def subscription_update(self, _type, _params):
        """Handle reports from device."""
        if _type == "attributeList":
            self._attributes.update(attribute_xml_to_dict(_params))
            self._state = self.mode
            return True

        return Switch.subscription_update(self, _type, _params)
github pavoni / pywemo / pywemo / ouimeaux_device / insight.py View on Github external
def subscription_update(self, _type, _params):
        """Update the device attributes due to a subscription update event."""
        LOG.debug("subscription_update %s %s", _type, _params)
        if _type == "InsightParams":
            self.insight_params = self.parse_insight_params(_params)
            return True
        return Switch.subscription_update(self, _type, _params)
github pavoni / pywemo / pywemo / ouimeaux_device / humidifier.py View on Github external
def subscription_update(self, _type, _params):
        """Handle reports from device."""
        if _type == "attributeList":
            self._attributes.update(attribute_xml_to_dict(_params))
            self._state = self.fan_mode

            return True

        return Switch.subscription_update(self, _type, _params)