Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event driven sensor updates #57

Closed

Conversation

yxkrage
Copy link

@yxkrage yxkrage commented Sep 29, 2024

Issue

When the select option Garo Wallbox is changed to e.g. Not Available for Charging from HomeAssistant it can take up to 30 seconds until the sensor (sensor.garo_wallbox) is updated.

image

Solution

This code fix ensures that the status (and all other sensors' values) are updated immediately when the option is changed in HomeAssistant.

@sockless-coding
Copy link
Owner

I don't think the event handling is part is needed, it should already be handled by the coordinator.
The main problem is that set_option is calling the api_client directly, it should have a coordinator method that also calls the async_request_refresh.

@sockless-coding
Copy link
Owner

This has been superseded by #60

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants