@@ -103,7 +103,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
103103 async def async_update_data ():
104104 allData = {}
105105 token = await authAndgetToken (hass , username , hashedPassword )
106- headersData = {"token" : token }
106+ headersData = {"token" : token , "User-Agent" : "Chrome" }
107107
108108 await getErnings (hass , headersData , allData , deviceID )
109109 await getAddresbook (hass , headersData , allData , deviceID )
@@ -139,7 +139,7 @@ async def authAndgetToken(hass, username, hashedPassword):
139139
140140 payloadAuth = {"user" : username , "password" : hashedPassword }
141141 headersAuth = {"Content-Type" : "application/json;charset=UTF-8" ,
142- "Accept" : "application/json, text/plain, */*" , "lang" : "en" }
142+ "Accept" : "application/json, text/plain, */*" , "lang" : "en" , "User-Agent" : "Chrome" }
143143
144144 restAuth = RestData (hass , METHOD_POST , _ENDPOINT_AUTH , None ,
145145 headersAuth , None , payloadAuth , DEFAULT_VERIFY_SSL )
0 commit comments