HA Crash
When i edit any of the daily sesnsor Ha crash every time, is that a new bug?
160 mb log file whit this:
ValueError: Config entry Min Jord Fugt (01J44W1PMAWH6FN2W4YF1T9BFX) for daily.sensor has already been setup! 2024-10-24 10:47:12.387 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Min Jord Fugt for sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 131, in async_setup_entry return await hass.data[DATA_COMPONENT].async_setup_entry(entry) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 183, in async_setup_entry raise ValueError( ValueError: Config entry Min Jord Fugt (01J44W1PMAWH6FN2W4YF1T9BFX) for daily.sensor has already been setup!
Same problem here.
I am afraid I don't know how to fix this :(
If i delete and recreated it works.
Same here with a simple rename operation....
ValueError: Config entry Gázfogyasztás (Wh) (01JCB26PYRGZB6HEGR104M08JQ) for daily.sensor has already been setup! 2024-11-16 09:22:37.953 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Gázfogyasztás (Wh) for sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 635, in __async_setup_with_context result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 133, in async_setup_entry return await hass.data[DATA_COMPONENT].async_setup_entry(entry) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 186, in async_setup_entry raise ValueError( ValueError: Config entry Gázfogyasztás (Wh) (01JCB26PYRGZB6HEGR104M08JQ) for daily.sensor has already been setup! 2024-11-16 09:22:37.957 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Gázfogyasztás (Wh) for sensor
I have the same issue
Same issue (v 2024.10.1). Core 2025.1.2 Supervisor 2024.12.3 Operating System 14.1 Frontend 20250109.0
Workaround: delete and recreate the sensor
Yup HA restarts when you exit the sensor or name
Same here, simply tried to rename a sensor...
same issue if you try to edit and save it crashes i updated interval and ha will die
same here, I got a heart attack when changing from 1800 to 60 seconds and everything was crashed. It took HA 5-10 min to come back again. This is no usable and I dont know if I remember in months/years to NOT change an entry instead of recreating it. This should be solved. I lil bit lost trust in this AddOn :-(
I am afraid I don't know how to fix this :(
I’ve created a pull request to add support for dynamic configuration updates in the DailySensor integration.
The goal is to avoid Home Assistant crashes when editing existing sensors via the UI. Instead of throwing a ValueError on duplicate setup, the sensor now updates its configuration dynamically using a new async_update_config() method.
Let me know what you think.
Awesome! Is there any chance you can make a PR?
Awesome! Is there any chance you can make a PR?
PR is available for review by you
Awesome! Is there any chance you can make a PR?
PR is available for review by you
thanks, but as mentioned in the PR this does not resolve anything, at least not on my machine. What are you seeing?
Awesome! Is there any chance you can make a PR?
PR is available for review by you
thanks, but as mentioned in the PR this does not resolve anything, at least not on my machine. What are you seeing?
Hey,
I'm really sorry for submitting a pull request without thoroughly testing it first. I know it ended up causing issues and extra work on your end. I'll make sure to be more careful with testing in the future. Thanks a lot for your patience and all the hard work you put into the project.
I just wanted to let you know that I've submitted a new pull request. In this version, Home Assistant no longer crashes when changing the interval, and you can now update the interval for existing sensors on the fly. The adjustment of operation and unit is possible but will only take effect after a restart of HA.
Maybe you can test it.
Thanks, I'll test it. I think we should also add support for updates to unit of measurement and other config options.