mirror of
https://github.com/Andre0512/hon.git
synced 2026-05-09 18:37:24 +02:00
Add all wm and td sensors to wd
This commit is contained in:
@@ -10,7 +10,7 @@ from pyhon.appliance import HonAppliance
|
||||
from pyhon.parameter.range import HonParameterRange
|
||||
|
||||
from .const import DOMAIN
|
||||
from .hon import HonCoordinator, HonEntity
|
||||
from .hon import HonCoordinator, HonEntity, unique_entities
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
@@ -168,7 +168,7 @@ SWITCHES: dict[str, tuple[HonSwitchEntityDescription, ...]] = {
|
||||
"WD": (
|
||||
HonSwitchEntityDescription(
|
||||
key="active",
|
||||
name="Washing Machine",
|
||||
name="Washer Dryer",
|
||||
icon="mdi:washing-machine",
|
||||
turn_on_key="startProgram",
|
||||
turn_off_key="stopProgram",
|
||||
@@ -176,7 +176,7 @@ SWITCHES: dict[str, tuple[HonSwitchEntityDescription, ...]] = {
|
||||
),
|
||||
HonSwitchEntityDescription(
|
||||
key="pause",
|
||||
name="Pause Washing Machine",
|
||||
name="Pause Washer Dryer",
|
||||
icon="mdi:pause",
|
||||
turn_on_key="pauseProgram",
|
||||
turn_off_key="resumeProgram",
|
||||
@@ -296,6 +296,9 @@ SWITCHES: dict[str, tuple[HonSwitchEntityDescription, ...]] = {
|
||||
),
|
||||
}
|
||||
|
||||
SWITCHES["WD"] = unique_entities(SWITCHES["WD"], SWITCHES["WM"])
|
||||
SWITCHES["WD"] = unique_entities(SWITCHES["WD"], SWITCHES["TD"])
|
||||
|
||||
|
||||
async def async_setup_entry(hass, entry: ConfigEntry, async_add_entities) -> None:
|
||||
hon: Hon = hass.data[DOMAIN][entry.unique_id]
|
||||
|
||||
Reference in New Issue
Block a user