Open Mason10198 opened 1 year ago
Very similar experience for myself. It looks like the underlying Python library that @sbabcock23 wrote, of which this Home Assistant integration is a wrapper for, got an update just last week, while this integration hasn't been updated since December. Looking at the classes inside the Python library, it looks like the variables are in fact present, and haven't been touched in the recent library update, so my best guess is something else in the recent update is crashing(?), and the whole library is in an unknown state. Or simply the Home Assistant integration needs to be updated to use the latest pytryfi library, as @rjshade did predict query failures would start to occur without his update.
@rjshade , do you think these errors are related to the Query failures you predicted would happen in the latest pytryfi release?
Including my own stacktrace as a point of reference
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 182, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 330, in _async_refresh
self.async_update_listeners()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 135, in async_update_listeners
update_callback()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 390, in _handle_coordinator_update
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 566, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 607, in _async_write_ha_state
state = self._stringify_state(available)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 572, in _stringify_state
if (state := self.state) is None:
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1007, in state
if (is_on := self.is_on) is None:
File "/config/custom_components/tryfi/light.py", line 74, in is_on
return bool(self.pet.device.ledOn)
File "/usr/local/lib/python3.10/site-packages/pytryfi/fiDevice.py", line 68, in ledOn
return self._ledOn
AttributeError: 'FiDevice' object has no attribute '_ledOn'```
I don't think any of these failures are related to the schema change I mentioned. It looks like FiPet._breed
and FiDevice._ledOn
should be set on successful query responses from the server. Perhaps something is failing with these queries?
@17kisern and @Mason10198 There has been a new release of hass-tryfi and the underlying package pytryfi - the new version is 0.0.19 and I believe should resolve the issues in this thread. Could you please update to the latest version and close this issue if you are all set? 😀
I am no longer receiving these errors/bugs after updating to the latest version, thank you @jldeen! Since @Mason10198 created this issue, it's up to him to close it out
My scenario consists of the following:
I have been using HASS-TryFi for a while now with no issues, with only ONE collar and ONE base. I just added a second collar/base to my Fi setup, and upon removal/re-initialization of the HASS-TryFi integration, some of the entities are not being integrated. Dog1s collar & base, the old Series 2 base, and Dog2s base are picked up, but Dog2s collar is missing. Image attached, sensitive information removed.
I have removed/reinstalled HASS-TryFi, tried manually installing, several full reboots of my Home Assistant OS machine, etc, all to no avail. Logs are included below, sensitive information removed.