Cleanup ADS constants and add type hints (#63390)

Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
epenet 2022-01-14 12:58:12 +01:00 committed by GitHub
parent 55143e240b
commit 0042bb68d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 50 additions and 54 deletions

View file

@ -1,6 +1,7 @@
"""Support for ADS binary sensors."""
from __future__ import annotations
import pyads
import voluptuous as vol
from homeassistant.components.binary_sensor import (
@ -54,7 +55,7 @@ class AdsBinarySensor(AdsEntity, BinarySensorEntity):
async def async_added_to_hass(self):
"""Register device notification."""
await self.async_initialize_device(self._ads_var, self._ads_hub.PLCTYPE_BOOL)
await self.async_initialize_device(self._ads_var, pyads.PLCTYPE_BOOL)
@property
def is_on(self) -> bool: