mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
Fix double state write on camera added to hass when rtsp_to_webrtc is present (#93806)
This commit is contained in:
parent
17d1c0733d
commit
89cc57c0d6
@ -673,7 +673,10 @@ class Camera(Entity):
|
||||
async def async_internal_added_to_hass(self) -> None:
|
||||
"""Run when entity about to be added to hass."""
|
||||
await super().async_internal_added_to_hass()
|
||||
await self.async_refresh_providers()
|
||||
# Avoid calling async_refresh_providers() in here because it
|
||||
# it will write state a second time since state is always
|
||||
# written when an entity is added to hass.
|
||||
self._rtsp_to_webrtc = await self._async_use_rtsp_to_webrtc()
|
||||
|
||||
async def async_refresh_providers(self) -> None:
|
||||
"""Determine if any of the registered providers are suitable for this entity.
|
||||
|
Loading…
x
Reference in New Issue
Block a user