mirror of
https://github.com/Andre0512/hon.git
synced 2025-05-12 22:25:36 -04:00
New pyhOn version
This commit is contained in:
parent
e1a2af70e9
commit
7e9202ef38
9 changed files with 31 additions and 32 deletions
|
@ -1,7 +1,7 @@
|
|||
import logging
|
||||
from dataclasses import dataclass
|
||||
|
||||
from pyhon import HonConnection
|
||||
from pyhon import Hon
|
||||
|
||||
from homeassistant.components.binary_sensor import BinarySensorEntityDescription, BinarySensorDeviceClass, \
|
||||
BinarySensorEntity
|
||||
|
@ -123,10 +123,10 @@ BINARY_SENSORS: dict[str, tuple[HonBinarySensorEntityDescription, ...]] = {
|
|||
|
||||
|
||||
async def async_setup_entry(hass, entry: ConfigEntry, async_add_entities) -> None:
|
||||
hon: HonConnection = hass.data[DOMAIN][entry.unique_id]
|
||||
hon: Hon = hass.data[DOMAIN][entry.unique_id]
|
||||
coordinators = hass.data[DOMAIN]["coordinators"]
|
||||
appliances = []
|
||||
for device in hon.devices:
|
||||
for device in hon.appliances:
|
||||
if device.mac_address in coordinators:
|
||||
coordinator = hass.data[DOMAIN]["coordinators"][device.mac_address]
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue