From efcae8bece5bc6b25b8de886f003cfad001ae51a Mon Sep 17 00:00:00 2001 From: Brave Chicken <46161394+BraveChicken1@users.noreply.github.com> Date: Wed, 19 Jan 2022 05:45:12 +0100 Subject: [PATCH] Add HomeConnect Freezer (#63851) --- homeassistant/components/home_connect/api.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/homeassistant/components/home_connect/api.py b/homeassistant/components/home_connect/api.py index b525ced3dc1..b73d5416830 100644 --- a/homeassistant/components/home_connect/api.py +++ b/homeassistant/components/home_connect/api.py @@ -79,6 +79,8 @@ class ConfigEntryAuth(homeconnect.HomeConnectAPI): device = FridgeFreezer(self.hass, app) elif app.type == "Refrigerator": device = Refrigerator(self.hass, app) + elif app.type == "Freezer": + device = Freezer(self.hass, app) elif app.type == "Oven": device = Oven(self.hass, app) elif app.type == "CoffeeMaker": @@ -514,6 +516,15 @@ class Refrigerator(DeviceWithDoor): return {"binary_sensor": [door_entity]} +class Freezer(DeviceWithDoor): + """Freezer class.""" + + def get_entity_info(self): + """Get a dictionary with infos about the associated entities.""" + door_entity = self.get_door_entity() + return {"binary_sensor": [door_entity]} + + class Hob(DeviceWithOpState, DeviceWithPrograms, DeviceWithRemoteControl): """Hob class."""