It’s not about lying: It’s about understanding. We need to share as accurately as possible what one is seeing and doing. Sometimes, even things we think should be obvious aren’t obvious to others. There are many people here from different backgrounds and languages, so one can easily miss one another.
Sure, I wouldn’t have replied initially if I wasn’t at least curious to understand the issue too. I’ve recently started using the integration and had a look at the code since it wasn’t documented what the update interval is. My feedback on this hasn’t yet been incorporated but I’ve logged an issue for that.
I can confirm what you’re seeing by performing the following steps:
- Create a Google calendar entry for a time in the future (it was about 30 min into the future to be sure the state update will trigger at least once).
- Immediately after creation, I checked both the built-in calendar and my dashboard view with a calendar card. It showed a spinning disc on the latter to show it is updating and then the new event was there immediately.
- I checked the entity state under the developer tools, and the state was off with no attributes showing the new event.
- I waited until the entity updated and then it showed the new event in the attributes (which was still in the future then, so the state was still off, as it should be).
- And just to confirm, the state changed to on when the event started.
If the entity has the information (or in this case, the absence of information) and the frontend relies on the entity, there’s either state data that’s not visible or something gets bypassed to get the information. When I refreshed, it was clear that something was updating.
Also, the calendar in question isn’t public, so it can’t (shouldn’t) be a direct request to Google.
So I checked the page source and it contains this:
The link there will take you to the specific event (eid
stands for event ID). Back to my two assumptions above, this looks like the bypass argument. Of course, I’m logged into the account which the calendar in question belongs to, so I thought that’s why the URL would resolve and HA would update immediately (but would be a cross-site security issue). But still, the question is: Where did the eid
come from if there’s no details on the calendar entity?
So I opened another browser, not logged into the same account. Logged into HA and followed the same steps as above: The calendar event was there immediately with the only difference that clicking on the event now opens a new tab asking me to log into the relevant Google account. I’m concluding that the eid
must be provided by the HA instance somehow (and there doesn’t seem to be any security issues).
I’m starting to tread here very lightly, as I haven’t really dug into much of the frontend code, but custom UI elements has access to a hass
object and can make service calls via websockets. This is what it must be doing. Just a pity to have the two bits of information (the UI vs the calendar entity) out of sync until the entity updates when it seems like the calendar entity can be updated when the UI is refreshed (again, I’m not going to pretend I understand the complexities of the current architecture).
So, no, you’re not lying or mad.