Skip to content
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

v1.5.0 leads to "This entity is no longer being provided" #66

Closed
01ste02 opened this issue Jan 24, 2024 · 11 comments · Fixed by #68
Closed

v1.5.0 leads to "This entity is no longer being provided" #66

01ste02 opened this issue Jan 24, 2024 · 11 comments · Fixed by #68
Assignees
Labels
bug Something isn't working

Comments

@01ste02
Copy link

01ste02 commented Jan 24, 2024

I have purei9 v1.5.0 and home-assistant 1.4. When I upgraded purei9 to this version from the last, my robot vacuum stopped being provided. I have found a recurring error message in the logs that relate to this:

2024-01-24 17:38:22.710 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 243, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 399, in _async_refresh
self.async_update_listeners()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 182, in async_update_listeners
update_callback()
File "/config/custom_components/purei9/vacuum.py", line 226, in _handle_coordinator_update
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 945, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1066, in _async_write_ha_state
state, attr, capabilities, shadowed_attr = self.__async_calculate_state()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1006, in __async_calculate_state
attr.update(self.extra_state_attributes or {})
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/purei9/vacuum.py", line 129, in extra_state_attributes
"maps": ", ".join([_map["name"] for _map in self._params.maps]),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: sequence item 2: expected str instance, NoneType found

I do not currently have the time to dig into the code and create a pull request, but if anyone else produces a PR, I'd be happy to try out the fix from my end.

@VidFerris
Copy link

Having the same issue; however (in case it helps for troubleshooting), sensors like the dustbin status are still provided, it's just the core device entity and controls for the vacuum that's no longer provided.

@01ste02
Copy link
Author

01ste02 commented Jan 29, 2024

I realise now that I was unclear in my initial message. The other sensors and entities such as the dustbin work as usual for me as well.

@Romain13700
Copy link

Hello, same for me. After the last update the other sensor works but the main one is grayed out...
IMG_20240201_095136.jpg

@drgreenbaum
Copy link

I have the same error!

@01ste02
Copy link
Author

01ste02 commented Feb 20, 2024

I seem to have found the solution to this problem. Make sure that none of the maps or room names in the electrolux app contain spaces. After I removed the spaces from my map name, I ran the service vacuum.start and then the vacuum started and was no longer greyed out.

Can anyone verify that this solves the problem?
I also noticed that UTF-8 names in maps and rooms are not an issue.

@michaelfuncke
Copy link

I have spaces in map as well as room names and my entity has never been unavailable.

@01ste02
Copy link
Author

01ste02 commented Feb 20, 2024

Then I was maybe mistaken in my analysis. It was based on my logs being full of the following stacktrace after "could not retrieve data" from this plugin.
`This error originated from a custom integration.

Logger: homeassistant
Source: custom_components/purei9/vacuum.py:129
Integration: Pure i9 (documentation, issues)
First occurred: February 17, 2024 at 22:31:31 (3654 occurrences)
Last logged: 12:30:36

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 256, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 412, in _async_refresh
self.async_update_listeners()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 183, in async_update_listeners
update_callback()
File "/config/custom_components/purei9/vacuum.py", line 226, in _handle_coordinator_update
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 989, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1110, in _async_write_ha_state
state, attr, capabilities, shadowed_attr = self.__async_calculate_state()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1050, in __async_calculate_state
attr.update(self.extra_state_attributes or {})
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/purei9/vacuum.py", line 129, in extra_state_attributes
"maps": ", ".join([_map["name"] for _map in self._params.maps]),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: sequence item 2: expected str instance, NoneType found
`

Maybe I stumbled upon some other bug, or the solution might simply have been to run the vacuum.start service?

@Brorssonn1
Copy link

My vacuum entity has been unavalible since the update. I just removed spaces. And within seconds vacuum entity was back.
(Without sending vacuum.star)

@cederfelt
Copy link

I removed spaces and reloaded HA and now it is back.

@VidFerris
Copy link

I can confirm that removing spaces in the strings for zone names in the Electrolux app also solved this problem for me, with the entity returning as it behaved previously within Home Assistant. I imagine there's a string not being sanitised/escaped somewhere. It's interesting that @michaelfuncke is reporting this isn't an issue on his instance - if you can share a screenshot of the relevant zones within the attributes pane (similar to the one below) it might help ID the root cause?

image

@Ekman Ekman self-assigned this Feb 29, 2024
@Ekman Ekman added the bug Something isn't working label Feb 29, 2024
@Ekman Ekman closed this as completed in #68 Feb 29, 2024
@Ekman
Copy link
Owner

Ekman commented Feb 29, 2024

I have released a new version 1.5.1 that should fix this.

Thanks for everyone commenting and helping me problem-solve. Please know that I'm aware and constantly seeing these issues, even if I don't have the time to respond immediately. I will eventually solve as much as possible when my schedule allows it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants