From b7785eb1881abdd2d32b87af87b053d2d31e4244 Mon Sep 17 00:00:00 2001 From: Brave Chicken <46161394+BraveChicken1@users.noreply.github.com> Date: Sat, 15 Jan 2022 18:24:35 +0100 Subject: [PATCH] Add HomeConnect Refrigerator (#63850) --- 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 380688ba6ff..72c3851071a 100644 --- a/homeassistant/components/home_connect/api.py +++ b/homeassistant/components/home_connect/api.py @@ -77,6 +77,8 @@ class ConfigEntryAuth(homeconnect.HomeConnectAPI): device = Dishwasher(self.hass, app) elif app.type == "FridgeFreezer": device = FridgeFreezer(self.hass, app) + elif app.type == "Refrigerator": + device = Refrigerator(self.hass, app) elif app.type == "Oven": device = Oven(self.hass, app) elif app.type == "CoffeeMaker": @@ -501,6 +503,15 @@ class FridgeFreezer(DeviceWithDoor): return {"binary_sensor": [door_entity]} +class Refrigerator(DeviceWithDoor): + """Refrigerator 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."""