def get_power(self):
        """Get current power."""
        self.get_status()
        try:
            self.consumption = self.data['power']
        except TypeError:
            self.consumption = 0

        return self.consumption
def get_power ( self ) : self . get_status ( ) try : self . consumption = self . data [ 'power' ] except TypeError : self . consumption = 0 return self . consumption
Get current power.