-
Notifications
You must be signed in to change notification settings - Fork 177
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
feat: refresh card based on IDLE or STREAMING state changes #622
base: master
Are you sure you want to change the base?
Conversation
I get the idea what you want to fix. But I don't like the solution. It can have a lot of side effects. |
Understood, any suggestion? |
Maybe easiest way to change reconnect timeout via card config for this cameras. Such a thing is not difficult to implement
|
Works for me, but would it go back to rendering the poster when the stream stops? |
I don't know. Haven't tested this case. Maybe something should be fixed for this |
There are some cameras out there which are only streaming intermittently, rather than continuously so WebRTC custom card waits for next reconnect (0 to 30 seconds).
With this PR, webrtc will be forced to refresh itself if the underlying camera entity's state changes into IDLE or STREAMING.
IDLE and STREAMING are defined in home assistant camera entity.
https://github.com/home-assistant/core/blob/dev/homeassistant/components/camera/__init__.py#L96
Looking forward to hearing your feedback.