Closed bentongarrett closed 3 years ago
@bentongarrett can you provide some more detail into what "broke"? Did it show unavailable? Stop updating? Or? Also what version of Home Assistant are you running? A screenshot and/or any relevant error logs would be helpful too.
@natekspencer I'm seeing the same (no waste drawer sensor), even using the core integration version-
2021-09-01 12:48:24 WARNING (MainThread) [pylitterbot.utils] sleep_mode_active has been deprecated in favor of sleep_mode_enabled, the alias will be removed in the future
2021-09-01 12:48:24 WARNING (MainThread) [pylitterbot.utils] pylitterbot.robot.Robot.UnitStatus has been deprecated in favor of pylitterbot.enums.LitterBoxStatus, the alias will be removed in the future
2021-09-01 12:48:24 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 134, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 265, in _async_refresh
update_callback()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 325, in _handle_coordinator_update
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 464, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 498, in _async_write_ha_state
state = self._stringify_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 470, in _stringify_state
state = self.state
File "/config/custom_components/litterrobot/vacuum.py", line 55, in state
File "/usr/local/lib/python3.9/site-packages/pylitterbot/utils.py", line 61, in __getattr__
return getattr(self._DeprecatedClassMeta__alias, name)
File "/usr/local/lib/python3.9/enum.py", line 429, in __getattr__
raise AttributeError(name) from None
AttributeError: CCP```
It looks like you might have an old version of pylitterbot installed still. Can you run the following from within your home assistant environment:
python3 -m pip freeze | grep pylitterbot
It should output pylitterbot==2021.8.0
If it doesn't, try running:
python3 -m pip install pylitterbot --upgrade
You'll then need to restart your Home Assistant server
hmm. i'm running in HASSIO core-2021.8.8
and using the built in version of litterrobot
i ran an ha core rebuild
and that fixed it.
The sensor shows "Unavailable" on the newest version of the Litter Robot integration. I am running the latest version of Home Assistant in Docker as indicated here: https://github.com/linuxserver/docker-homeassistant/pkgs/container/homeassistant
The output of python3 -m pip freeze | grep pylitterbot is:
WARNING: The directory '/config/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. pylitterbot==2021.8.1
The warning is odd. There is no .cache/pip in my config directory.
The Docker version of HA does not appear to use the ha command, so I can't try the rebuild.
I manually created this folder and the error is no longer present, but the integration is still exhibiting the same behavior.
@bentongarrett, you might need to execute the pip commands inside your docker container. To do that, you have to bash into it first, something like below where homeassistant
is the name of your docker image:
sudo docker exec -it homeassistant bash
Yes, I did execute them within the container.
Errors:
Logger: homeassistant.components.vacuum Source: custom_components/litterrobot/vacuum.py:55 Integration: Vacuum (documentation, issues) First occurred: 2:30:23 PM (2 occurrences) Last logged: 2:30:23 PM
Error adding entities for domain vacuum with platform litterrobot
Error while setting up litterrobot platform for vacuum
Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities await asyncio.gather(*tasks) File "/usr/lib/python3.8/site-packages/homeassistant/helpers/entity_platform.py", line 587, in _async_add_entity await entity.add_to_platform_finish() File "/usr/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 711, in add_to_platform_finish self.async_write_ha_state() File "/usr/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 464, in async_write_ha_state self._async_write_ha_state() File "/usr/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 498, in _async_write_ha_state state = self._stringify_state() File "/usr/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 470, in _stringify_state state = self.state File "/config/custom_components/litterrobot/vacuum.py", line 55, in state Robot.UnitStatus.CCP: STATE_CLEANING, File "/usr/lib/python3.8/site-packages/pylitterbot/utils.py", line 61, in getattr return getattr(self._DeprecatedClassMetaalias, name) File "/usr/lib/python3.8/enum.py", line 384, in getattr__ raise AttributeError(name) from None AttributeError: CCP
Logger: homeassistant.components.sensor Source: custom_components/litterrobot/vacuum.py:55 Integration: Sensor (documentation, issues) First occurred: 2:30:24 PM (1 occurrences) Last logged: 2:30:24 PM litterrobot: Error on device update!
Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 646, in async_device_update await task File "/usr/lib/python3.8/site-packages/homeassistant/helpers/update_coordinator.py", line 336, in async_update await self.coordinator.async_request_refresh() File "/usr/lib/python3.8/site-packages/homeassistant/helpers/update_coordinator.py", line 141, in async_request_refresh await self._debounced_refresh.async_call() File "/usr/lib/python3.8/site-packages/homeassistant/helpers/debounce.py", line 78, in async_call await task File "/usr/lib/python3.8/site-packages/homeassistant/helpers/update_coordinator.py", line 165, in async_refresh await self._async_refresh(log_failures=True) File "/usr/lib/python3.8/site-packages/homeassistant/helpers/update_coordinator.py", line 265, in _async_refresh update_callback() File "/usr/lib/python3.8/site-packages/homeassistant/helpers/update_coordinator.py", line 325, in _handle_coordinator_update self.async_write_ha_state() File "/usr/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 464, in async_write_ha_state self._async_write_ha_state() File "/usr/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 498, in _async_write_ha_state state = self._stringify_state() File "/usr/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 470, in _stringify_state state = self.state File "/config/custom_components/litterrobot/vacuum.py", line 55, in state Robot.UnitStatus.CCP: STATE_CLEANING, File "/usr/lib/python3.8/site-packages/pylitterbot/utils.py", line 61, in getattr return getattr(self._DeprecatedClassMetaalias, name) File "/usr/lib/python3.8/enum.py", line 384, in getattr__ raise AttributeError(name) from None AttributeError: CCP
Logger: homeassistant.components.homeassistant.triggers.numeric_state Source: components/homeassistant/triggers/numeric_state.py:115 Integration: Home Assistant Core Integration (documentation, issues) First occurred: 2:30:37 PM (1 occurrences) Last logged: 2:30:37 PM Error initializing 'Litter Robot - Full' trigger: In 'numeric_state' condition: unknown entity sensor.my_litter_robot_waste_drawer
Logger: pylitterbot.utils Source: /usr/lib/python3.8/site-packages/pylitterbot/utils.py:71 First occurred: 2:30:23 PM (120 occurrences) Last logged: 2:32:14 PM
night_light_active has been deprecated in favor of night_light_mode_enabled, the alias will be removed in the future panel_lock_active has been deprecated in favor of panel_lock_enabled, the alias will be removed in the future sleep_mode_active has been deprecated in favor of sleep_mode_enabled, the alias will be removed in the future pylitterbot.robot.Robot.UnitStatus has been deprecated in favor of pylitterbot.enums.LitterBoxStatus, the alias will be removed in the future
Logger: homeassistant Source: custom_components/litterrobot/vacuum.py:55 Integration: Litter-Robot (documentation, issues) First occurred: 2:30:37 PM (11 occurrences) Last logged: 2:32:16 PM Error doing job: Task exception was never retrieved
Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/homeassistant/helpers/update_coordinator.py", line 134, in _handle_refresh_interval await self._async_refresh(log_failures=True, scheduled=True) File "/usr/lib/python3.8/site-packages/homeassistant/helpers/update_coordinator.py", line 265, in _async_refresh update_callback() File "/usr/lib/python3.8/site-packages/homeassistant/helpers/update_coordinator.py", line 325, in _handle_coordinator_update self.async_write_ha_state() File "/usr/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 464, in async_write_ha_state self._async_write_ha_state() File "/usr/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 498, in _async_write_ha_state state = self._stringify_state() File "/usr/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 470, in _stringify_state state = self.state File "/config/custom_components/litterrobot/vacuum.py", line 55, in state Robot.UnitStatus.CCP: STATE_CLEANING, File "/usr/lib/python3.8/site-packages/pylitterbot/utils.py", line 61, in getattr return getattr(self._DeprecatedClassMetaalias, name) File "/usr/lib/python3.8/enum.py", line 384, in getattr__ raise AttributeError(name) from None AttributeError: CCP
While the Litter Robot shows unavailable and there is no longer a waste drawer sensor entity, I am oddly able to successfully send the command to run a cleaning cycle. Very odd.
Another error:
Logger: homeassistant.core Source: custom_components/litterrobot/vacuum.py:55 Integration: Litter-Robot (documentation, issues) First occurred: 2:37:07 PM (1 occurrences) Last logged: 2:37:07 PM Error executing service: <ServiceCall vacuum.start (c:a83ce096763764b30e46b86fab573389): entity_id=['vacuum.my_litter_robot_litter_box']>
Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/homeassistant/core.py", line 1507, in catch_exceptions await coro_or_task File "/usr/lib/python3.8/site-packages/homeassistant/core.py", line 1526, in _execute_service await handler.job.target(service_call) File "/usr/lib/python3.8/site-packages/homeassistant/helpers/entity_component.py", line 213, in handle_service await self.hass.helpers.service.entity_service_call( File "/usr/lib/python3.8/site-packages/homeassistant/helpers/service.py", line 658, in entity_service_call future.result() # pop exception if have File "/usr/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 856, in async_request_call await coro File "/usr/lib/python3.8/site-packages/homeassistant/helpers/service.py", line 695, in _handle_entity_call await result File "/config/custom_components/litterrobot/vacuum.py", line 87, in async_start await self.perform_action_and_refresh(self.robot.start_cleaning) File "/config/custom_components/litterrobot/hub.py", line 109, in perform_action_and_refresh await self.hub.coordinator.async_refresh() File "/usr/lib/python3.8/site-packages/homeassistant/helpers/update_coordinator.py", line 165, in async_refresh await self._async_refresh(log_failures=True) File "/usr/lib/python3.8/site-packages/homeassistant/helpers/update_coordinator.py", line 265, in _async_refresh update_callback() File "/usr/lib/python3.8/site-packages/homeassistant/helpers/update_coordinator.py", line 325, in _handle_coordinator_update self.async_write_ha_state() File "/usr/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 464, in async_write_ha_state self._async_write_ha_state() File "/usr/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 498, in _async_write_ha_state state = self._stringify_state() File "/usr/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 470, in _stringify_state state = self.state File "/config/custom_components/litterrobot/vacuum.py", line 55, in state Robot.UnitStatus.CCP: STATE_CLEANING, File "/usr/lib/python3.8/site-packages/pylitterbot/utils.py", line 61, in getattr return getattr(self._DeprecatedClassMetaalias, name) File "/usr/lib/python3.8/enum.py", line 384, in getattr__ raise AttributeError(name) from None AttributeError: CCP
Sorry for the lack of a scientific method here, but here's what I need to do to get everything working again (waste drawer sensor + available Litter Robot entity):
-Downgrade to an older Home Assistant version (I was on the latest, but downgraded to 2021.4.4) -Downgrade to the previous Litter Robot integration
So it seems there is some bad interaction between newer versions of Home Assistant and the newest version of the Litter Robot integration.
It should also be noted that another one of my custom integrations, for a Eufy robot vacuum, also fails to work in the newer versions of Home Assistant.
Did you upgrade after downgrading or are you still running on the downgraded versions?
Also, for background, did you previously have this HACS version installed and now only have the official version?
I've done upgrades and downgrades of HA and the integration in all different orders. I've narrowed it down to something between HA version 8.0+ and either LR 2021.8.0 or 2021.2.3 (both don't work and I haven't tried older versions).
The latest functioning combination for me is HA 7.4 and LR 2021.2.3.
I have only ever used the HACS version of this integration.
I've been a complete idiot. I made the mistake of not reading the readme.
I uninstalled the HACS version and installed the official version. Works perfectly on the latest HA.
So sorry for the trouble, but thanks for helping out.
The newest available integration broke the waste drawer percentage indicator. Reverting to the old version fixed it.