Improve entity type hints [i] (#77529)

This commit is contained in:
epenet 2022-08-30 19:21:08 +02:00 committed by GitHub
parent 50663bbc5d
commit 23090cb8a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 74 additions and 58 deletions

View file

@ -1,6 +1,8 @@
"""Support for Aqualink pool feature switches."""
from __future__ import annotations
from typing import Any
from homeassistant.components.switch import DOMAIN, SwitchEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
@ -52,11 +54,11 @@ class HassAqualinkSwitch(AqualinkEntity, SwitchEntity):
return self.dev.is_on
@refresh_system
async def async_turn_on(self, **kwargs) -> None:
async def async_turn_on(self, **kwargs: Any) -> None:
"""Turn on the switch."""
await await_or_reraise(self.dev.turn_on())
@refresh_system
async def async_turn_off(self, **kwargs) -> None:
async def async_turn_off(self, **kwargs: Any) -> None:
"""Turn off the switch."""
await await_or_reraise(self.dev.turn_off())