Skip to content

Conversation

@josh-m-sharpe
Copy link

@josh-m-sharpe josh-m-sharpe commented Oct 20, 2025

Proposed change

Adds a hard-coded 5 minute refresh to the calendar card & panel. This is useful when running HA on an ipad as a kiosk (e.g. long running, minimal user interaction).

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue or discussion:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • [] Tests have been added to verify that the new code works. - no prexisting tests for calendar cards?

If user exposed functionality or configuration variables are added/changed:

@karwosts
Copy link
Member

karwosts commented Oct 20, 2025

Maybe elaborate a bit why you think this would be helpful? I might have thought it would have dynamic updates that would be enough to catch event changes.

I was wrong, I didn't realize there was no subscription for calendar events 😕

@josh-m-sharpe
Copy link
Author

@karwosts I've been running HA on an ipad mounted to my fridge as a "kiosk". It is always on.

As such, the calendar card never refreshes. I have to either manually interact with it, or switch views and return to the view w/ the card to get it to update.

It doesn't appear to have dynamic updates that I was able to find.

@MindFreeze
Copy link
Member

Looks like the calendar is not event based (ironically) and just fetches everything on start. It would be better if core would send an event to frontend when the calendar data is updated but I haven't looked into that

@MindFreeze
Copy link
Member

Looks like there is no "calendar updated" event but core does fire "state_changed" on the calendar entities when they change so we can check that the entity state changed in willUpdate and refresh the data then

@karwosts
Copy link
Member

karwosts commented Nov 1, 2025

Looks like there is no "calendar updated" event but core does fire "state_changed" on the calendar entities when they change so we can check that the entity state changed in willUpdate and refresh the data then

I don't think that's always correct. The state_changed will fire if the state or any of the attributes change, such as if you add an event that is the next event. But if you add a new event that does not cause any of the attributes to change (e.g. one that is not the next event), I don't see any events on the bus.

I guess we need to add a subscription like the todo entity has. The frontend can subscribe to a todo entity and it gets a callback when any change is made to any of the todo items.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants