async def __call__(self, *args, **kwargs):
        """Call the method with given parameters.

        On error this call will raise a :class:SongpalException:. If the error is
        reported by the device (e.g. not a problem doing the request), the exception
        will contain `error` attribute containing the device-reported error message.
        """
        try:
            res = await self.service.call_method(self, *args, **kwargs)
        except Exception as ex:
            raise SongpalException("Unable to make a request: %s" % ex) from ex

        if self.debug > 1:
            _LOGGER.debug("got payload: %s" % res)

        if "error" in res:
            _LOGGER.debug(self)
            raise SongpalException(
                "Got an error for %s: %s" % (self.name, res["error"]),
                error=res["error"],
            )

        if self.debug > 0:
            _LOGGER.debug("got res: %s" % pf(res))

        if "result" not in res:
            _LOGGER.error("No result in response, how to handle? %s" % res)
            return

        res = res["result"]
        if len(res) > 1:
            _LOGGER.warning("Got a response with len >  1: %s" % res)
            return res
        elif len(res) < 1:
            _LOGGER.debug("Got no response, assuming success")
            return True

        return res[0]
async def __call__ ( self , * args , ** kwargs ) : try : res = await self . service . call_method ( self , * args , ** kwargs ) except Exception as ex : raise SongpalException ( "Unable to make a request: %s" % ex ) from ex if self . debug > 1 : _LOGGER . debug ( "got payload: %s" % res ) if "error" in res : _LOGGER . debug ( self ) raise SongpalException ( "Got an error for %s: %s" % ( self . name , res [ "error" ] ) , error = res [ "error" ] , ) if self . debug > 0 : _LOGGER . debug ( "got res: %s" % pf ( res ) ) if "result" not in res : _LOGGER . error ( "No result in response, how to handle? %s" % res ) return res = res [ "result" ] if len ( res ) > 1 : _LOGGER . warning ( "Got a response with len >  1: %s" % res ) return res elif len ( res ) < 1 : _LOGGER . debug ( "Got no response, assuming success" ) return True return res [ 0 ]
Call the method with given parameters.

        On error this call will raise a :class:SongpalException:. If the error is
        reported by the device (e.g. not a problem doing the request), the exception
        will contain `error` attribute containing the device-reported error message.