def get_status(self):
        """Get the details from the bulb."""
        try:
            request = requests.get(
                '{}/{}/'.format(self.resource, URI), timeout=self.timeout)
            raw_data = request.json()
            # Doesn't always work !!!!!
            #self._mac = next(iter(self.raw_data))
            self.data = raw_data[self._mac]
            return self.data
        except (requests.exceptions.ConnectionError, ValueError):
            raise exceptions.MyStromConnectionError()
def get_status ( self ) : try : request = requests . get ( '{}/{}/' . format ( self . resource , URI ) , timeout = self . timeout ) raw_data = request . json ( ) self . data = raw_data [ self . _mac ] return self . data except ( requests . exceptions . ConnectionError , ValueError ) : raise exceptions . MyStromConnectionError ( )
Get the details from the bulb.