diff --git a/custom_components/traeger/climate.py b/custom_components/traeger/climate.py index a111214..7634ea1 100644 --- a/custom_components/traeger/climate.py +++ b/custom_components/traeger/climate.py @@ -243,14 +243,16 @@ def current_temperature(self): """Return the current temperature.""" if self.grill_accessory is None: return 0 - return self.grill_accessory["probe"]["get_temp"] + acc_type = self.grill_accessory["type"] + return self.grill_accessory[acc_type]["get_temp"] @property def target_temperature(self): """Return the temperature we try to reach.""" if self.grill_accessory is None: return 0 - return self.grill_accessory["probe"]["set_temp"] + acc_type = self.grill_accessory["type"] + return self.grill_accessory[acc_type]["set_temp"] @property def max_temp(self): diff --git a/custom_components/traeger/const.py b/custom_components/traeger/const.py index a5c22e6..59df7c1 100644 --- a/custom_components/traeger/const.py +++ b/custom_components/traeger/const.py @@ -5,7 +5,7 @@ NAME = "Traeger" DOMAIN = "traeger" DOMAIN_DATA = f"{DOMAIN}_data" -VERSION = "2023.06.11" +VERSION = "2023.06.16" ATTRIBUTION = "" ISSUE_URL = "https://github.com/njobrien1006/hass_traeger/issues" diff --git a/custom_components/traeger/entity.py b/custom_components/traeger/entity.py index e9514d2..67cbfcc 100644 --- a/custom_components/traeger/entity.py +++ b/custom_components/traeger/entity.py @@ -103,7 +103,7 @@ def grill_add_accessories(self): if self.device_state is None: return for accessory in self.device_state["acc"]: - if accessory["type"] == "probe": + if accessory["type"] in ["probe", "btprobe", "hob"]: if accessory["uuid"] not in self.accessory_status: if self.probe_entity: self.async_add_devices([ diff --git a/custom_components/traeger/manifest.json b/custom_components/traeger/manifest.json index 7f5f5c2..54bf31a 100644 --- a/custom_components/traeger/manifest.json +++ b/custom_components/traeger/manifest.json @@ -13,5 +13,5 @@ "documentation": "https://github.com/njobrien1006/hass_traeger", "iot_class": "cloud_push", "issue_tracker": "https://github.com/njobrien1006/hass_traeger/issues", - "version": "2023.06.11" -} + "version": "2023.06.16" +} \ No newline at end of file diff --git a/custom_components/traeger/sensor.py b/custom_components/traeger/sensor.py index 97ba353..2814bcd 100644 --- a/custom_components/traeger/sensor.py +++ b/custom_components/traeger/sensor.py @@ -323,14 +323,17 @@ def state(self): if self.grill_accessory is None: return "idle" - target_temp = self.grill_accessory["probe"]["set_temp"] - probe_temp = self.grill_accessory["probe"]["get_temp"] + acc_type = self.grill_accessory["type"] + target_temp = self.grill_accessory[acc_type]["set_temp"] + probe_temp = self.grill_accessory[acc_type]["get_temp"] target_changed = target_temp != self.previous_target_temp grill_mode = self.grill_state["system_status"] fell_out_temp = 102 if self.grill_units == TEMP_CELSIUS else 215 # Latch probe alarm, reset if target changed or grill leaves active modes - if self.grill_accessory["probe"]["alarm_fired"]: + if "alarm_fired" not in self.grill_accessory[acc_type]: + self.probe_alarm = False + elif self.grill_accessory[acc_type]["alarm_fired"]: self.probe_alarm = True elif ((target_changed and target_temp != 0) or (grill_mode not in self.active_modes)):