Compare commits
2 Commits
v0.7.3-bet
...
v0.7
Author | SHA1 | Date | |
---|---|---|---|
0afbfe997d | |||
6828f3e9a8 |
@ -83,5 +83,5 @@ class HonFeatureRequestButton(HonEntity, ButtonEntity):
|
|||||||
|
|
||||||
async def async_press(self) -> None:
|
async def async_press(self) -> None:
|
||||||
pyhon_version = pkg_resources.get_distribution("pyhon").version
|
pyhon_version = pkg_resources.get_distribution("pyhon").version
|
||||||
info = f"Device Info:\n{self._device.diagnose}pyhOnVersion: {pyhon_version}"
|
info = f"Device Info:\n{self._device.diagnose()}pyhOnVersion: {pyhon_version}"
|
||||||
_LOGGER.error(info)
|
_LOGGER.error(info)
|
||||||
|
@ -7,5 +7,5 @@
|
|||||||
"iot_class": "cloud_polling",
|
"iot_class": "cloud_polling",
|
||||||
"issue_tracker": "https://github.com/Andre0512/hon/issues",
|
"issue_tracker": "https://github.com/Andre0512/hon/issues",
|
||||||
"requirements": ["pyhOn==0.10.6"],
|
"requirements": ["pyhOn==0.10.6"],
|
||||||
"version": "0.7.3-beta.1"
|
"version": "0.7.3"
|
||||||
}
|
}
|
||||||
|
@ -323,16 +323,18 @@ async def async_setup_entry(hass, entry: ConfigEntry, async_add_entities) -> Non
|
|||||||
|
|
||||||
if descriptions := SWITCHES.get(device.appliance_type):
|
if descriptions := SWITCHES.get(device.appliance_type):
|
||||||
for description in descriptions:
|
for description in descriptions:
|
||||||
if (
|
if description.entity_category == EntityCategory.CONFIG:
|
||||||
description.entity_category == EntityCategory.CONFIG
|
if description.key not in device.available_settings:
|
||||||
and description.key not in device.available_settings
|
continue
|
||||||
or not any(
|
else:
|
||||||
device.get(description.key) is not None
|
if not any(
|
||||||
or description.turn_on_key in list(device.commands)
|
[
|
||||||
or description.turn_off_key in list(device.commands)
|
device.get(description.key) is not None,
|
||||||
)
|
description.turn_on_key in list(device.commands),
|
||||||
):
|
description.turn_off_key in list(device.commands),
|
||||||
continue
|
]
|
||||||
|
):
|
||||||
|
continue
|
||||||
appliances.extend(
|
appliances.extend(
|
||||||
[HonSwitchEntity(hass, coordinator, entry, device, description)]
|
[HonSwitchEntity(hass, coordinator, entry, device, description)]
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user