From 5aad65e537f70b002a8e7809b3043fb4f8209926 Mon Sep 17 00:00:00 2001 From: Jack Simbach Date: Tue, 20 Jul 2021 14:08:59 -0400 Subject: [PATCH] - updated cooktop detection in oven device --- custom_components/ge_home/devices/oven.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/custom_components/ge_home/devices/oven.py b/custom_components/ge_home/devices/oven.py index 1e0c84d..d1067a0 100644 --- a/custom_components/ge_home/devices/oven.py +++ b/custom_components/ge_home/devices/oven.py @@ -31,7 +31,10 @@ class OvenApi(ApplianceApi): def get_all_entities(self) -> List[Entity]: base_entities = super().get_all_entities() oven_config: OvenConfiguration = self.appliance.get_erd_value(ErdCode.OVEN_CONFIGURATION) - cooktop_config: ErdCooktopConfig = self.appliance.get_erd_value(ErdCode.COOKTOP_CONFIG) + + cooktop_config = ErdCooktopConfig.NONE + if self.has_erd_code(ErdCode.COOKTOP_CONFIG): + cooktop_config: ErdCooktopConfig = self.appliance.get_erd_value(ErdCode.COOKTOP_CONFIG) _LOGGER.debug(f"Oven Config: {oven_config}") _LOGGER.debug(f"Cooktop Config: {cooktop_config}")