-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setup failure #144
Comments
Thank you for letting us know. It seems that if the value cannot be obtained with the sensor component, it is necessary to return |
I committed to the Master branch. The corrections will be reflected by selecting Master in the version selection in Redownload of HACS, re-downloading, and restarting HA. Could you try it? |
Thank you for your reply and prompt response.
|
This error log is an error related to the setup of Also, could you please confirm that this fix has been applied to your HA source?
|
Sorry, it appears that I was looking at the wrong log.
|
It is difficult to determine the cause of the error based on the error message you submitted. Are there any other error messages such as "Unable to configure''? There is usually some message before "Traceback...". |
Could be a Home Assistant wide issue related to error handling of the event loop. Maybe something about asyncio has changed in Python 3.11. home-assistant/core#99795 Im guessing that maybe a better way of handling time outs is needed if there are no packets returned? But it fired on asyncio.sleep which is odd. |
[ja]度々すみません。 Google translate... Sorry again. |
Does your lighting system use a DHCP-assigned IP address? Perhaps that has changed? 照明システムは DHCP によって割り当てられた IP アドレスを使用していますか? おそらくそれは変わったでしょうか? |
When I set up MoekadenRoom for testing, intentionally stopped MoekadenRoom, and restarted HA, I was able to get an error similar to this problem. From this, it is assumed that the device cannot be connected. Please check the LAN connection status of MKN7531 and the link status of the switches. Also, as scottyphillips says, the IP address of your echonet-lite device may have changed. If the IP address has changed, try removing the device and adding it again. Currently, this integration does not support changes in the device's IP address, so I recommend setting a static IP for the echonet-lite device on the DHCP server.
|
Thank you so much for trying everything. P.S. From your name, naopon, I instantly assumed that you are Japanese. Thank you very much for your polite reply in Japanese. :D |
@nao-pon we probably should keep this open and come up with a nicer way to handle that exception when a device is unresponsive. |
@scottyphillips I agree. First, start by making notes of information that will serve as a reference.
If the component tracks the IP address and detects a change, I think we can migrate as is by rewriting the config_entry and trying the setup again. |
@scottyphillips I started implementing automatic reloading when the device is unreachable and automatic tracking of IP address changes. |
I done. I will continue testing for a while. Please verify if possible. |
The light bulbs with EchonetLite control suddenly became unresponsive.
So I updated Home Assistant to 2023.09.2 and the Operating System to 10.5. ]
After updating Echonet Lite to the latest version as well, I encountered the following error, resulting in a "Setup failure".
Please help.
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 591, in state
numerical_value = float(value) # type:ignore[arg-type]
^^^^^^^^^^^^
ValueError: could not convert string to float: 'unavailable'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 507, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 752, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1002, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 730, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 830, in _async_write_ha_state
state, attr = self._async_generate_attributes()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 771, in _async_generate_attributes
state = self._stringify_state(available)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 736, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 593, in state
raise ValueError(
ValueError: Sensor sensor.store_humidity has device class 'humidity', state class 'measurement' unit '%' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: 'unavailable' (<class 'str'>)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/echonetlite/init.py", line 241, in async_setup_entry
await echonetlite.async_update()
File "/config/custom_components/echonetlite/init.py", line 434, in async_update
return await self.async_update_data(kwargs=kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/echonetlite/init.py", line 441, in async_update_data
batch_data = await self._instance.update(flags, no_request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pychonet/EchonetInstance.py", line 122, in update
response = await self._api.echonetMessage(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pychonet/echonetapiclient.py", line 202, in echonetMessage
await asyncio.sleep(0.1)
File "/usr/local/lib/python3.11/asyncio/tasks.py", line 639, in sleep
return await future
^^^^^^^^^^^^
asyncio.exceptions.CancelledError: Global task timeout
The text was updated successfully, but these errors were encountered: