From 3896b4a31d993587aeb432a16f0b8627217ccb44 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Thu, 10 Feb 2022 15:49:19 +0100 Subject: [PATCH] Add additional switches to Plugwise (#66261) --- homeassistant/components/plugwise/switch.py | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/plugwise/switch.py b/homeassistant/components/plugwise/switch.py index e7fb0b6f3db..45a10297ed5 100644 --- a/homeassistant/components/plugwise/switch.py +++ b/homeassistant/components/plugwise/switch.py @@ -3,9 +3,14 @@ from __future__ import annotations 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.core import HomeAssistant +from homeassistant.helpers.entity import EntityCategory from homeassistant.helpers.entity_platform import AddEntitiesCallback from .const import DOMAIN @@ -14,10 +19,22 @@ from .entity import PlugwiseEntity from .util import plugwise_command 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( key="relay", name="Relay", - icon="mdi:electric-switch", + device_class=SwitchDeviceClass.SWITCH, ), )