How to use the plugwise.Circle function in plugwise

To help you get started, we’ve selected a few plugwise 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 cyberjunky / home-assistant-custom-components / plugwise / switch.py View on Github external
def update(self):
        """Get the latest data from the plugwise circles."""
        import plugwise

        self.current_consumption = plugwise.Circle(self.mac, self.stick).get_power_usage()
        _LOGGER.debug("Current Consumption: %s", self.current_consumption)

        self.getinfo = plugwise.Circle(self.mac, self.stick).get_info()
        self.state = self.getinfo['relay_state']
        self.fwversion = self.getinfo['fw_ver']
        self.datetime = self.getinfo['datetime']
        _LOGGER.debug("Relay State: %s", self.state)
        return
github cyberjunky / home-assistant-custom-components / plugwise / switch.py View on Github external
def switch_off(self):
        """Turn the switch off."""
        import plugwise
        plugwise.Circle(self.mac, self.stick).switch_off()
github cyberjunky / home-assistant-custom-components / plugwise / switch.py View on Github external
def update(self):
        """Get the latest data from the plugwise circles."""
        import plugwise

        self.current_consumption = plugwise.Circle(self.mac, self.stick).get_power_usage()
        _LOGGER.debug("Current Consumption: %s", self.current_consumption)

        self.getinfo = plugwise.Circle(self.mac, self.stick).get_info()
        self.state = self.getinfo['relay_state']
        self.fwversion = self.getinfo['fw_ver']
        self.datetime = self.getinfo['datetime']
        _LOGGER.debug("Relay State: %s", self.state)
        return
github cyberjunky / home-assistant-custom-components / plugwise / switch.py View on Github external
def switch_on(self):
        """Turn the switch on."""
        import plugwise
        plugwise.Circle(self.mac, self.stick).switch_on()