1
mirror of https://github.com/home-assistant/core synced 2024-07-12 07:21:24 +02:00

Add Home Connect CookProcessor (Bosch Cookit) (#62445)

This commit is contained in:
Nico Hirsch 2022-01-24 14:44:20 +01:00 committed by GitHub
parent c66b25229c
commit 13cfb92d06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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}