mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Add additional switches to Plugwise (#66261)
This commit is contained in:
parent
4cad29d7d4
commit
3896b4a31d
@ -3,9 +3,14 @@ from __future__ import annotations
|
|||||||
|
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
from homeassistant.components.switch import SwitchEntity, SwitchEntityDescription
|
from homeassistant.components.switch import (
|
||||||
|
SwitchDeviceClass,
|
||||||
|
SwitchEntity,
|
||||||
|
SwitchEntityDescription,
|
||||||
|
)
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
|
from homeassistant.helpers.entity import EntityCategory
|
||||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
|
|
||||||
from .const import DOMAIN
|
from .const import DOMAIN
|
||||||
@ -14,10 +19,22 @@ from .entity import PlugwiseEntity
|
|||||||
from .util import plugwise_command
|
from .util import plugwise_command
|
||||||
|
|
||||||
SWITCHES: tuple[SwitchEntityDescription, ...] = (
|
SWITCHES: tuple[SwitchEntityDescription, ...] = (
|
||||||
|
SwitchEntityDescription(
|
||||||
|
key="dhw_cm_switch",
|
||||||
|
name="DHW Comfort Mode",
|
||||||
|
icon="mdi:water-plus",
|
||||||
|
entity_category=EntityCategory.CONFIG,
|
||||||
|
),
|
||||||
|
SwitchEntityDescription(
|
||||||
|
key="lock",
|
||||||
|
name="Lock",
|
||||||
|
icon="mdi:lock",
|
||||||
|
entity_category=EntityCategory.CONFIG,
|
||||||
|
),
|
||||||
SwitchEntityDescription(
|
SwitchEntityDescription(
|
||||||
key="relay",
|
key="relay",
|
||||||
name="Relay",
|
name="Relay",
|
||||||
icon="mdi:electric-switch",
|
device_class=SwitchDeviceClass.SWITCH,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user