Skip to content

Commit

Permalink
Merge pull request #54 from njobrien1006/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
njobrien1006 authored Jun 16, 2023
2 parents 9e42626 + 8e9875b commit 8dffb89
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
6 changes: 4 additions & 2 deletions custom_components/traeger/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion custom_components/traeger/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion custom_components/traeger/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -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([
Expand Down
4 changes: 2 additions & 2 deletions custom_components/traeger/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
9 changes: 6 additions & 3 deletions custom_components/traeger/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)):
Expand Down

0 comments on commit 8dffb89

Please sign in to comment.