diff --git a/bot.py b/bot.py index e248b91..1f6c417 100644 --- a/bot.py +++ b/bot.py @@ -293,6 +293,30 @@ class Bot: chat_id=msg.chat_id, text=f"Privacy mode is {state and 'enabled' or 'disabled'}", ) + case "/night_mode_auto": + self.tapo.setDayNightMode("auto") + await self.bot.send_message( + chat_id=msg.chat_id, + text=f"Night mode set to auto", + ) + case "/night_mode_on": + self.tapo.setDayNightMode("on") + await self.bot.send_message( + chat_id=msg.chat_id, + text=f"Night mode enabled", + ) + case "/night_mode_off": + self.tapo.setDayNightMode("off") + await self.bot.send_message( + chat_id=msg.chat_id, + text=f"Night mode disabled", + ) + case "/night_mode_status": + state = self.tapo.getDayNightMode() + await self.bot.send_message( + chat_id=msg.chat_id, + text=f"Night mode is {state}", + ) async def take_photo( self, adjust_perspective=True, timeout=10.0 diff --git a/commands.txt b/commands.txt index 96353d0..6e6da47 100644 --- a/commands.txt +++ b/commands.txt @@ -7,4 +7,8 @@ privacy_off - Turn off privacy mode privacy_status - Check the status of privacy mode light_on - Turn on the light light_off - Turn off the light -light_status - Check the status of the light \ No newline at end of file +light_status - Check the status of the light +night_mode_on - Turn on night mode +night_mode_off - Turn off night mode +night_mode_auto - Turn on automatic night mode +night_mode_status - Check the status of night mode \ No newline at end of file