Skip to content

Commit

Permalink
Add: Warning message if user attempts to use motion sensor or time sy…
Browse files Browse the repository at this point in the history
…nc without RTSP credentials
  • Loading branch information
JurajNyiri committed Jan 13, 2025
1 parent c48aa9d commit 1439f4e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions custom_components/tapo_control/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -1374,6 +1374,15 @@ async def async_step_auth(self, user_input=None):
and len(password) == 0
and len(username) == 0
)
if (len(password) == 0 or len(username) > 0) and (
enable_motion_sensor or enable_time_sync
):

enable_motion_sensor = False
enable_time_sync = False
LOGGER.warning(
"Turning off motion sensor and time sync as RTSP username or password are empty. These functionalities require RTSP/Onvif credentials."
)

LOGGER.debug(
"[%s] Updating entry.",
Expand Down

0 comments on commit 1439f4e

Please sign in to comment.