Closed rpitera closed 3 years ago
items deleted from lists in OG (via the site or my devices) weren't syncing up with the display on the card. So I've been doing it manually,
Clarification: Items crossed off showed properly as crossed off. But if I deleted the crossed off items via OG WebUI or my devices, they would still appear in the card.
Most probably it has to do with HA reaching the OG web site. I would start from investigating connectivity and take it from there. My problem is similar but behavior is different. Inside the HA card, I can see the NUMBER of items on the list, but it does not display the items themselves. If i delete some of them from the OG site, the items number is updated correctly (ex. if i have 5 items on the list i see the number 5 on the HA card but no items list. If i delete one from OG site, the number is updated but again i see no items on the HA card).
Did a little test just now; added an item from the OG Card. When I added it, the item count went up, but the new item did not show in the OG Card items list. The item DID however show up in the appropriate list over on the OG site and on my devices with the OG App. So I don't think that connectivity is the issue, otherwise that wouldn't have happened. Also added another item from the OG site and the items amount updated on the OG Card. (Again, nothing on the OG Card item list thought.)
My guess is that there may have been some change in the name of the items attribute on OG's side made at the same time they changed the authentication method that @ljmerza just fixed.
everything is working on my end. what's your config for the card?
Pretty standard. Account details in configuration.yaml. Card instance as follows:
- type: 'custom:our-groceries-card'
show_header: false
Nothing crazy. Tried putting it in another view like this:
- type: custom:our-groceries-card
Card shows up fine, but with the same problem. Also tried clearing the site cache but the problem remains. Not seeing anything in the dev tools console in Chrome. Open to suggestions.
Tried renaming two of my lists on the OG WebUI and both names were immediately updated on the sensor and card, again confirming that communication/authentication is working as designed. Also tried reinstalling the card to see if that fixed things but there was no change.
I'm still unable to reproduce. When you click on a list does an API call get sent to HA? Try this setting:
type: 'custom:our-groceries-card'
show_header: false
entity: sensor.our_groceries
show_crossed_off: true
sort_by_name: true
hide_empty_lists: false
I can reproduce the issue that the list is empty but the count is visible: if your list contains a space bar the problem occurs. If your list is just one word - no problem the count is OK and the items are visible too
I can reproduce the issue that the list is empty but the count is visible: if your list contains a space bar the problem occurs. If your list is just one word - no problem the count is OK and the items are visible too
When you say the list contains a space bar, you mean if the list title contains a space, or if any one of the items contains a space in the name?
I can reproduce the issue that the list is empty but the count is visible: if your list contains a space bar the problem occurs. If your list is just one word - no problem the count is OK and the items are visible too
When you say the list contains a space bar, you mean if the list title contains a space, or if any one of the items contains a space in the name?
Only the title consists of two (or more?) words. The items in my "one word" lists contain sometimes a space and are visible. So only the title seems to be the problem if consisting of 2 words
I did all tests once more.
Update: The behavior is the same no matter if the card is standalone or within a grid container or vertical card.
Update 2: If i cross-off an item from the web interface then the list is visible (!) with all items appearing correctly (the pending ones and the crossed-off ones as well). As soon as i delete the crossed-off items from the list, then all disappear from the HA card.
after deleting the crossed-off item:
I can reproduce the issue that the list is empty but the count is visible: if your list contains a space bar the problem occurs. If your list is just one word - no problem the count is OK and the items are visible too
I just tested this with my "Target" list; when I added an item (which I did from the OG WebUI) and refreshed my HA view, the new item DID show up. (Renaming my "Grocery List" to "Grocery_List" did NOT fix the problem that list though.) However, when I went back an added a SECOND item to the Target list (again, from the OG WebUI) and refreshed the HA view, the count increased but it reverted to "No items in list" and both items were gone.
Update 2: If i cross-off an item from the web interface then the list is visible (!) with all items appearing correctly (the pending ones and the crossed-off ones as well). As soon as i delete the crossed-off items from the list, then all disappear from the HA card.
And this would mirror the experience I outlined in my original post.
@ljmerza
I'm still unable to reproduce. When you click on a list does an API call get sent to HA? Try this setting:
type: 'custom:our-groceries-card' show_header: false entity: sensor.our_groceries show_crossed_off: true sort_by_name: true hide_empty_lists: false
Tried this just now but still no items in the list.
ok fixed in OG-card v1.6.1. Thanks for everyone's debugging tracking this down.
ok fixed in OG-card v1.6.1. Thanks for everyone's debugging tracking this down.
Can confirm that 1.6.1 fixed it. All lists showing the correct numbers and items
@ljmerza Good Job man! Thank you.
Yes! Thanks @ljmerza for the fix! Curious; what caused it?
if show_crossed_off: false
and there were no crossed off items in the list then the list wont show up because it wasnt taking not crossed off items into account.
Thanks for the explanation and once again for the solution!
Version of the custom_component
Using HA-OG version 1.3.9 Using OG Card version 1.6.0
Version | core-2021.4.5 Installation Type | Home Assistant OS
Configuration
(Note config has been redacted; I don't use secrets anymore, so the values are actual account info.)
No relevant log info at this time
Describe the bug
No item detail showing when list is expanded, despite items being there and the item count reflecting the correct number of items. See comparison between card details and Our Groceries web UI below:
Our Groceries HA card
Our Groceries detail from WebUI
As near as I can tell, this happened when I was deleting crossed off items from the list via the ha-our-groceries card. I've noticed that with the last few releases, items deleted from lists in OG (via the site or my devices) weren't syncing up with the display on the card. So I've been doing it manually, which has not been a big deal for me (and since I didn't see it reported I figured it was just me. I did the same thing a few days ago as usual with the newest version. There were no errors and the display was correct showing the remaining items.
But after a restart for an unrelated core update, the card has been displaying as shown. Subsequent reboots have not solved the issue. I have not run a debug yet but my current error level should have shown something if there was a big problem.
Since the only thing that changed was the component, I thought it wise to post the issue here rather than on the repo for the card. If that wasn't correct, let me know and I'll move it.