Improve string formatting v5 (#33697)
* Improve string formatting v5 * Address review comments
This commit is contained in:
parent
39336d3ea3
commit
fca90a8ddc
46 changed files with 221 additions and 252 deletions
|
@ -219,15 +219,16 @@ class HassEzvizCamera(Camera):
|
|||
ffmpeg = ImageFrame(self._ffmpeg.binary, loop=self.hass.loop)
|
||||
|
||||
image = await asyncio.shield(
|
||||
ffmpeg.get_image(self._rtsp_stream, output_format=IMAGE_JPEG,)
|
||||
ffmpeg.get_image(self._rtsp_stream, output_format=IMAGE_JPEG)
|
||||
)
|
||||
return image
|
||||
|
||||
async def stream_source(self):
|
||||
"""Return the stream source."""
|
||||
if self._local_rtsp_port:
|
||||
rtsp_stream_source = "rtsp://{}:{}@{}:{}".format(
|
||||
self._username, self._password, self._local_ip, self._local_rtsp_port
|
||||
rtsp_stream_source = (
|
||||
f"rtsp://{self._username}:{self._password}@"
|
||||
f"{self._local_ip}:{self._local_rtsp_port}"
|
||||
)
|
||||
_LOGGER.debug(
|
||||
"Camera %s source stream: %s", self._serial, rtsp_stream_source
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue