From 13cfb92d063ecb04632cc041bbab9e2fe01b3cde Mon Sep 17 00:00:00 2001 From: Nico Hirsch <30938717+noxhirsch@users.noreply.github.com> Date: Mon, 24 Jan 2022 14:44:20 +0100 Subject: [PATCH] Add Home Connect CookProcessor (Bosch Cookit) (#62445) --- homeassistant/components/home_connect/api.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/homeassistant/components/home_connect/api.py b/homeassistant/components/home_connect/api.py index 4572911fb135..f3c98e618b81 100644 --- a/homeassistant/components/home_connect/api.py +++ b/homeassistant/components/home_connect/api.py @@ -90,6 +90,8 @@ class ConfigEntryAuth(homeconnect.HomeConnectAPI): device = Hood(self.hass, app) elif app.type == "Hob": device = Hob(self.hass, app) + elif app.type == "CookProcessor": + device = CookProcessor(self.hass, app) else: _LOGGER.warning("Appliance type %s not implemented", app.type) continue @@ -543,3 +545,14 @@ class Hob(DeviceWithOpState, DeviceWithPrograms, DeviceWithRemoteControl): "switch": program_switches, "sensor": program_sensors + op_state_sensor, } + + +class CookProcessor(DeviceWithOpState): + """CookProcessor class.""" + + power_off_state = BSH_POWER_STANDBY + + def get_entity_info(self): + """Get a dictionary with infos about the associated entities.""" + op_state_sensor = self.get_opstate_sensor() + return {"sensor": op_state_sensor}