From 2a89e58ae0299ca7329c989fc94715cbd51c1154 Mon Sep 17 00:00:00 2001
From: "Teemu R." <tpr@iki.fi>
Date: Tue, 10 Sep 2024 18:20:00 +0200
Subject: [PATCH] Add missing type hints to alarm module (#1111)

---
 kasa/smart/modules/alarm.py | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/kasa/smart/modules/alarm.py b/kasa/smart/modules/alarm.py
index 439bc571..1dacf181 100644
--- a/kasa/smart/modules/alarm.py
+++ b/kasa/smart/modules/alarm.py
@@ -2,6 +2,8 @@
 
 from __future__ import annotations
 
+from typing import Literal
+
 from ...feature import Feature
 from ..smartmodule import SmartModule
 
@@ -94,7 +96,7 @@ class Alarm(SmartModule):
         )
 
     @property
-    def alarm_sound(self):
+    def alarm_sound(self) -> str:
         """Return current alarm sound."""
         return self.data["get_alarm_configure"]["type"]
 
@@ -113,11 +115,11 @@ class Alarm(SmartModule):
         return self.data["get_support_alarm_type_list"]["alarm_type_list"]
 
     @property
-    def alarm_volume(self):
+    def alarm_volume(self) -> Literal["low", "normal", "high"]:
         """Return alarm volume."""
         return self.data["get_alarm_configure"]["volume"]
 
-    async def set_alarm_volume(self, volume: str):
+    async def set_alarm_volume(self, volume: Literal["low", "normal", "high"]):
         """Set alarm volume."""
         payload = self.data["get_alarm_configure"].copy()
         payload["volume"] = volume
@@ -134,10 +136,10 @@ class Alarm(SmartModule):
         src = self._device.sys_info["in_alarm_source"]
         return src if src else None
 
-    async def play(self):
+    async def play(self) -> dict:
         """Play alarm."""
         return await self.call("play_alarm")
 
-    async def stop(self):
+    async def stop(self) -> dict:
         """Stop alarm."""
         return await self.call("stop_alarm")