Skip to content

Commit f4b0bae

Browse files
authored
Improve type hints in omnilogic (home-assistant#145259)
1 parent f700a1f commit f4b0bae

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

homeassistant/components/omnilogic/switch.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@ def __init__(
9292
)
9393

9494
self._state_key = state_key
95-
self._state = None
96-
self._last_action = 0
95+
self._state: bool | None = None
96+
self._last_action = 0.0
9797
self._state_delay = 30
9898

9999
@property
100-
def is_on(self):
100+
def is_on(self) -> bool:
101101
"""Return the on/off state of the switch."""
102102
state_int = 0
103103

@@ -119,7 +119,7 @@ def is_on(self):
119119
class OmniLogicRelayControl(OmniLogicSwitch):
120120
"""Define the OmniLogic Relay entity."""
121121

122-
async def async_turn_on(self, **kwargs):
122+
async def async_turn_on(self, **kwargs: Any) -> None:
123123
"""Turn on the relay."""
124124
self._state = True
125125
self._last_action = time.time()
@@ -132,7 +132,7 @@ async def async_turn_on(self, **kwargs):
132132
1,
133133
)
134134

135-
async def async_turn_off(self, **kwargs):
135+
async def async_turn_off(self, **kwargs: Any) -> None:
136136
"""Turn off the relay."""
137137
self._state = False
138138
self._last_action = time.time()
@@ -178,7 +178,7 @@ def __init__(
178178

179179
self._last_speed = None
180180

181-
async def async_turn_on(self, **kwargs):
181+
async def async_turn_on(self, **kwargs: Any) -> None:
182182
"""Turn on the pump."""
183183
self._state = True
184184
self._last_action = time.time()
@@ -196,7 +196,7 @@ async def async_turn_on(self, **kwargs):
196196
on_value,
197197
)
198198

199-
async def async_turn_off(self, **kwargs):
199+
async def async_turn_off(self, **kwargs: Any) -> None:
200200
"""Turn off the pump."""
201201
self._state = False
202202
self._last_action = time.time()

0 commit comments

Comments
 (0)