Closed ManivannanBA closed 1 year ago
Am getting the below error Traceback (most recent call last): File "/usr/lib/python3.10/site-packages/homeassistant/helpers/update_coordinator.py", line 258, in _async_refresh self.data = await self._async_update_data() File "/config/custom_components/tinxy/coordinator.py", line 58, in _async_update_data result = await self.my_api.get_all_status() File "/config/custom_components/tinxy/tinxycloud.py", line 135, in get_all_status status_data = await self.tinxy_request("v2/devices_state") File "/config/custom_components/tinxy/tinxycloud.py", line 90, in tinxy_request return await resp.json() File "/usr/lib/python3.10/site-packages/homeassistant/helpers/aiohttp_client.py", line 72, in json return await super().json(*args, loads=loads, **kwargs) File "/usr/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 1104, in json raise ContentTypeError( aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: text/plain; charset=utf-8', url=URL('https://ha-backend.tinxy.in/v2/devices_state')
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/usr/lib/python3.10/site-packages/homeassistant/helpers/entity_platform.py", line 304, in _async_setup_platform await asyncio.shield(task) File "/config/custom_components/tinxy/light.py", line 43, in async_setup_entry await coordinator.async_config_entry_first_refresh() File "/usr/lib/python3.10/site-packages/homeassistant/helpers/update_coordinator.py", line 233, in async_config_entry_first_refresh raise ex homeassistant.exceptions.ConfigEntryNotReady: 0, message='Attempt to decode JSON with unexpected mimetype: text/plain; charset=utf-8', url=URL('https://ha-backend.tinxy.in/v2/devices_state')
application/json should be content type when calling api
Hope these can be fixed by code
@ManivannanBA This was issue caused when migrating servers, HA Integration should work as expected now .
In recent days able to see the status of the switch is not getting updating correctly in home assistant but the status been correct in your mobile app.