Skip to content

Commit

Permalink
Small speed up to cameras (#96124)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco committed Jul 8, 2023
1 parent e38f55f commit 51344d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions homeassistant/components/camera/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,8 +514,8 @@ def frontend_stream_type(self) -> StreamType | None:
@property
def available(self) -> bool:
"""Return True if entity is available."""
if self.stream and not self.stream.available:
return self.stream.available
if (stream := self.stream) and not stream.available:
return False
return super().available

async def async_create_stream(self) -> Stream | None:
Expand Down

0 comments on commit 51344d5

Please sign in to comment.