@@ -63,7 +63,7 @@ def device_info(self) -> DeviceInfo:
6363 manufacturer = "HyperHDR" ,
6464 name = f"HyperHDR ({ self ._host } )" ,
6565 model = "HyperHDR LED Controller" ,
66- sw_version = "1.3.0 " ,
66+ sw_version = "1.3.1 " ,
6767 )
6868
6969 async def _delayed_update (self ) -> None :
@@ -106,10 +106,15 @@ async def _set_brightness(self, value: float) -> None:
106106 try :
107107 async with aiohttp .ClientSession () as session :
108108 url = f"http://{ self ._host } :{ self ._port } /json-rpc"
109+ params = {"request" : json .dumps (request_data , separators = (',' , ':' ))}
110+ _LOGGER .debug ("Sending brightness request to %s with params: %s" , url , params )
111+
109112 async with async_timeout .timeout (10 ):
110- async with session .get (url , params = { "request" : json . dumps ( request_data )} ) as response :
113+ async with session .get (url , params = params ) as response :
111114 if response .status != 200 :
112115 _LOGGER .error ("Failed to set brightness: %s" , response .status )
116+ response_text = await response .text ()
117+ _LOGGER .error ("Response: %s" , response_text )
113118 except (aiohttp .ClientError , TimeoutError ) as error :
114119 _LOGGER .error ("Error setting brightness: %s" , error )
115120
@@ -122,8 +127,10 @@ async def async_update(self) -> None:
122127 try :
123128 async with aiohttp .ClientSession () as session :
124129 url = f"http://{ self ._host } :{ self ._port } /json-rpc"
130+ params = {"request" : json .dumps (request_data , separators = (',' , ':' ))}
131+
125132 async with async_timeout .timeout (10 ):
126- async with session .get (url , params = { "request" : json . dumps ( request_data )} ) as response :
133+ async with session .get (url , params = params ) as response :
127134 if response .status == 200 :
128135 data = await response .json ()
129136 adjustment = data .get ("info" , {}).get ("adjustment" , {})
0 commit comments