Cleanup ADS constants and add type hints (#63390)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
55143e240b
commit
0042bb68d9
6 changed files with 50 additions and 54 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue