Small speed up to cameras (#96124)
This commit is contained in:
parent
e38f55fdb6
commit
51344d566e
1 changed files with 2 additions and 2 deletions
|
@ -514,8 +514,8 @@ class Camera(Entity):
|
||||||
@property
|
@property
|
||||||
def available(self) -> bool:
|
def available(self) -> bool:
|
||||||
"""Return True if entity is available."""
|
"""Return True if entity is available."""
|
||||||
if self.stream and not self.stream.available:
|
if (stream := self.stream) and not stream.available:
|
||||||
return self.stream.available
|
return False
|
||||||
return super().available
|
return super().available
|
||||||
|
|
||||||
async def async_create_stream(self) -> Stream | None:
|
async def async_create_stream(self) -> Stream | None:
|
||||||
|
|
Loading…
Add table
Reference in a new issue