No recent visitors after 2024.5 update
AuroreVgn opened this issue · 18 comments
Hi!
After an upgrade to 2024.5, "Recent Visitor" doesn't work. To be more specific: "sensor.recent_visitor" sensor was "Unavailable" despite is "Enable" in the settings as you can show bellow.
Please note that I am running the last version of BB integration: 0.0.19 (with the tricks mentioned in this issue)
The issue occures also in 2024.5.1 update.
I just updated to 5.1, and I'm not seeing either issue, this one or #82. I didn't have to patch my langcodes version, and my recent visitor entity is working correctly.
Do you have any birdbuddy
related warnings or errors in the logs?
In the BB app, do you see any recent visitors there - especially in the Saved view? Sometimes after a restart of HA you might have to wait until the next postcard arrives, since it will populate from new postcards. It does also try to populate from the last saved postcard in the feed as well, but that's only a best-effort attempt.
That error looks promising. What's the actual log (i.e. click on it)? If it's not there anymore you should be able to reload the integration to get it to log the error again.
I click on the errror log mentionned bellow and I have the following details:
Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:580
integration: Sensor (documentation, issues)
First occurred: May 3, 2024 at 20:05:38 (3 occurrences)
Last logged: 17:26:40
Error adding entity sensor.etourmi_recent_visitor for domain sensor with platform birdbuddy
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 580, in _async_add_entities
await coro
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 892, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1358, in add_to_platform_finish
await self.async_added_to_hass()
File "/config/custom_components/birdbuddy/sensor.py", line 148, in async_added_to_hass
await self._update_latest_visitor()
File "/config/custom_components/birdbuddy/sensor.py", line 216, in _update_latest_visitor
medias := [
^
TypeError: 'NoneType' object is not iterable
It seems to be no sensors updates with Home Assistant Core 2024.5.1 and Bird Buddy 0.0.19
Unless you manually reload the integration, sensors will not changed over the time.
I have this issue with "battery" (see below with two manual reloads) and "charging" sensors.
Yeah if the sensor platform didn't load, then it likely wouldn't have finished the rest of the sensors either. I'll take a look at that your, thanks for reporting.
You can try installing the version in the PR branch, with this service call:
service: update.install
target:
entity_id: update.bird_buddy_update
data:
version: pr/fix-83
Afterwards it will ask you to restart HA to finish the install. Note it will start saying that there's a newer version (v0.0.19), but that's just because this PR branch isn't released yet.
Let me know if a) your recent visitors entity starts working again, and/or b) the rest of the sensors start working again.
I tried to "update" to pr/fix-38 by using your service call under the "Developer tools" menu tab "services" and I still am in 0.0.19. I also tried to pu the code you provide in configuration.yaml or in a script ("Automation" menu then "Scripts" tab) without success.
I am not very sure this is the good way to use a service call. Could ou please tell me what is the right way to do this?
Doing it from the developer tools screen is the correct place:
After running the service, you'll go back to the Settings menu, and there will be 2 Bird Buddy notifications at the top: one telling you to restart HA, and the other telling you that there is an update available:
You need to ignore the update line, because that will undo the PR version. You'll note that in the dialog - it's trying to replace the pr/fix-83
version with v0.0.19
, which is NOT what you want:
But you do have to click the Restart required
repair, and actually restart HA. After it restarts, it will continue showing the available update to v0.0.19, but you must continue to ignore it. If you install that, it will remove the PR fix.
OK, that means the HACS update entity isn't right.
When you go to Settings > Devices & Services > Entities tab, and search for "bird buddy", you should see an Update entity owned by integration HACS
. That entity is the one you need to use in the service call.
Or in the Dev Tools Service screen, click the Go to UI Mode
button in the bottom left, and choose the correct entity from the "Choose Entity" list. Pick the one that DOES NOT have the name of your BB and "Firmware" in the name, that is different, because that's the one to install a BB firmware update. You want the one that is just named "Bird Buddy Update":
Did you install the BB integration via HACS, or installed manually?
Do you have any update.*
entities owned by HACS?
I wonder if this might be an Experimental feature of HACS 🤔 If you go to the HACS integration page and then click the "Configure" button, do you have Enable experimental features
checked?
I have installed BB integration (and all other one) with HACS and I have no 'update' entities at all.
Yeeahhhh! By activating experimental featured, I have a lot of 'update' entities!!
I can follow your tutorial above!
If it's nighttime, and the BB is in sleep mode, then none of the sensors will update until it's online again.
If it's not in sleep mode and you're also not seeing other entities update still, then there might be another warning or error in your logs?
Great, thank you for testing. This will be addressed in the next release.