Closed Olen closed 1 month ago
This one is an easy fix. I'll see if I can make a PR
2024-06-20 09:34:46.067 WARNING (ImportExecutor_0) [homeassistant.const] TEMP_CELSIUS was used from zaptec, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.CELSIUS instead, please report it to the author of the 'zaptec' custom integration
These ones are also probably quite easy to fix, just not sure which of the suggested classes should be used:
2024-06-20 09:35:54.497 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.plass_16_completed_session_energy (<class 'custom_components.zaptec.sensor.ZaptecSensor'>) is using state class 'measurement' which is impossible considering device class ('energy') it is using; expected None or one of 'total', 'total_increasing'; Please update your configuration if your entity is manually configured, otherwise report it to the author of the 'zaptec' custom integration 2024-06-20 09:35:54.510 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.plass_17_completed_session_energy (<class 'custom_components.zaptec.sensor.ZaptecSensor'>) is using state class 'measurement' which is impossible considering device class ('energy') it is using; expected None or one of 'total', 'total_increasing'; Please update your configuration if your entity is manually configured, otherwise report it to the author of the 'zaptec' custom integration 2024-06-20 09:35:54.527 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.plass_24_completed_session_energy (<class 'custom_components.zaptec.sensor.ZaptecSensor'>) is using state class 'measurement' which is impossible considering device class ('energy') it is using; expected None or one of 'total', 'total_increasing'; Please update your configuration if your entity is manually configured, otherwise report it to the author of the 'zaptec' custom integration 2024-06-20 09:35:54.541 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.plass_10_completed_session_energy (<class 'custom_components.zaptec.sensor.ZaptecSensor'>) is using state class 'measurement' which is impossible considering device class ('energy') it is using; expected None or one of 'total', 'total_increasing'; Please update your configuration if your entity is manually configured, otherwise report it to the author of the 'zaptec' custom integration 2024-06-20 09:35:54.555 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.plass_2_completed_session_energy (<class 'custom_components.zaptec.sensor.ZaptecSensor'>) is using state class 'measurement' which is impossible considering device class ('energy') it is using; expected None or one of 'total', 'total_increasing'; Please update your configuration if your entity is manually configured, otherwise report it to the author of the 'zaptec' custom integration 2024-06-20 09:35:54.568 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.plass_26_completed_session_energy (<class 'custom_components.zaptec.sensor.ZaptecSensor'>) is using state class 'measurement' which is impossible considering device class ('energy') it is using; expected None or one of 'total', 'total_increasing'; Please update your configuration if your entity is manually configured, otherwise report it to the author of the 'zaptec' custom integration 2024-06-20 09:35:54.581 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.plass_3_completed_session_energy (<class 'custom_components.zaptec.sensor.ZaptecSensor'>) is using state class 'measurement' which is impossible considering device class ('energy') it is using; expected None or one of 'total', 'total_increasing'; Please update your configuration if your entity is manually configured, otherwise report it to the author of the 'zaptec' custom integration
Both of these are fixed in master
Great, thanks
This is probably the most serious one:
2024-06-20 09:34:10.153 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open inside the event loop by custom integration 'zaptec' at custom_components/zaptec/api.py, line 334: receiver = servicebus_client.get_subscription_receiver( (offender: /usr/local/lib/python3.12/platform.py, line 199: with open(executable, 'rb') as f:), please report it to the author of the 'zaptec' custom integration
I don't seem to be able to recreate this error on my installation, neither in development nor in my production setup. I wonder why you get this error.
I see from the code that the blocking IO is buried somewhere in the service bus receiver, which is 3rd party to the zaptec component. I have a fix for it, but I am unable to verify if it works or not. Are you able to help me with the verification?
I only got the error once, just now after upgrading to 2024.6.3, so it could be something else.
When is the latest pushed to hacs for update?
We don't have a fix for the HA restart warnings
We don't have a fix for the HA restart warnings
Ok, sorry my misunderstanding.
Is the problem with warnings on HA startup still present? As I've stated earlier, I haven't been able to reproduce the problem.
I still get these 2024-08-22 18:16:14.888 WARNING (ImportExecutor_0) [homeassistant.const] TEMP_CELSIUS was used from zaptec, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.CELSIUS instead, please report it to the author of the 'zaptec' custom integration 2024-08-22 18:16:14.940 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.zap_one_completed_session_energy (<class 'custom_components.zaptec.sensor.ZaptecSensor'>) is using state class 'measurement' which is impossible considering device class ('energy') it is using; expected None or one of 'total_increasing', 'total'; Please update your configuration if your entity is manually configured, otherwise report it to the author of the 'zaptec' custom integration
and a few of these: 2024-08-24 08:47:12.012 ERROR (MainThread) [custom_components.zaptec.api] GET request to https://api.zaptec.com/api/chargers/67**2/state failed with status 500: <ClientResponse(https://api.zaptec.com/api/chargers/67**2/state) [500 Internal Server Error]> <CIMultiDictProxy('Date': 'Sat, 24 Aug 2024 06:47:11 GMT', 'Content-Length': '0', 'Connection': 'keep-alive', 'Cache-Control': 'no-cache, no-store, must-revalidate, max-age=0', 'Expires': 'Fri, 23 Aug 2024 06:31:38 GMT', 'Vary': 'Origin', 'Request-Context': 'appId=cid-v1:13**5', 'X-Rate-Limit-Limit': '30m', 'X-Rate-Limit-Remaining': '885', 'X-Rate-Limit-Reset': '2024-08-24T07:00:00.0000000Z', 'Strict-Transport-Security': 'max-age=15724800; includeSubDomains')>
2024-08-24 08:47:12.012 ERROR (MainThread) [custom_components.zaptec] Fetching data failed: RequestError: GET request to https://api.zaptec.com/api/chargers/67**2/state failed with status 500: <ClientResponse(https://api.zaptec.com/api/chargers/67**2/state) [500 Internal Server Error]> <CIMultiDictProxy('Date': 'Sat, 24 Aug 2024 06:47:11 GMT', 'Content-Length': '0', 'Connection': 'keep-alive', 'Cache-Control': 'no-cache, no-store, must-revalidate, max-age=0', 'Expires': 'Fri, 23 Aug 2024 06:31:38 GMT', 'Vary': 'Origin', 'Request-Context': 'appId=cid-v1:135', 'X-Rate-Limit-Limit': '30m', 'X-Rate-Limit-Remaining': '885', 'X-Rate-Limit-Reset': '2024-08-24T07:00:00.0000000Z', 'Strict-Transport-Security': 'max-age=15724800; includeSubDomains')> Traceback (most recent call last): File "/config/custom_components/zaptec/init.py", line 240, in _async_update_data await self.account.update_states() File "/config/custom_components/zaptec/api.py", line 1061, in update_states await data.state() File "/config/custom_components/zaptec/api.py", line 590, in state state = await self._account._request(f"chargers/{self.id}/state") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/zaptec/api.py", line 988, in _request raise log_exc( custom_components.zaptec.api.RequestError: GET request to https://api.zaptec.com/api/chargers/672/state failed with status 500: <ClientResponse(https://api.zaptec.com/api/chargers/67**2/state) [500 Internal Server Error]> <CIMultiDictProxy('Date': 'Sat, 24 Aug 2024 06:47:11 GMT', 'Content-Length': '0', 'Connection': 'keep-alive', 'Cache-Control': 'no-cache, no-store, must-revalidate, max-age=0', 'Expires': 'Fri, 23 Aug 2024 06:31:38 GMT', 'Vary': 'Origin', 'Request-Context': 'appId=cid-v1:x**5', 'X-Rate-Limit-Limit': '30m', 'X-Rate-Limit-Remaining': '885', 'X-Rate-Limit-Reset': '2024-08-24T07:00:00.0000000Z', 'Strict-Transport-Security': 'max-age=15724800; includeSubDomains')>
2024-08-24 08:47:12.020 ERROR (MainThread) [custom_components.zaptec] Error fetching zaptec-.com data: GET request to https://api.zaptec.com/api/chargers/672/state failed with status 500: <ClientResponse(https://api.zaptec.com/api/chargers/67**2/state) [500 Internal Server Error]> <CIMultiDictProxy('Date': 'Sat, 24 Aug 2024 06:47:11 GMT', 'Content-Length': '0', 'Connection': 'keep-alive', 'Cache-Control': 'no-cache, no-store, must-revalidate, max-age=0', 'Expires': 'Fri, 23 Aug 2024 06:31:38 GMT', 'Vary': 'Origin', 'Request-Context': 'appId=cid-v1:13**5', 'X-Rate-Limit-Limit': '30m', 'X-Rate-Limit-Remaining': '885', 'X-Rate-Limit-Reset': '2024-08-24T07:00:00.0000000Z', 'Strict-Transport-Security': 'max-age=15724800; includeSubDomains')>
Summary of issues and fixes mentioned in this issue:
Since they are tracked in these issues, I propose closing this issue.
Just addding them all here:
This is probably the most serious one:
This one is an easy fix. I'll see if I can make a PR
These ones are also probably quite easy to fix, just not sure which of the suggested classes should be used: