Skip to content

Commit

Permalink
Merge pull request #17 from itchannel/1.08
Browse files Browse the repository at this point in the history
1.08
  • Loading branch information
itchannel authored Aug 25, 2022
2 parents 53f5a9d + d02ae21 commit 71c4d14
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions custom_components/apex/apex.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ def config(self):

if self.version == "old":
result = {}
return result
if self.sid is None:
_LOGGER.debug("We are none")
self.auth()
Expand Down
2 changes: 1 addition & 1 deletion custom_components/apex/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"config_flow": true,
"documentation": "https://github.com/itchannel/apex-ha",
"issue_tracker": "https://github.com/itchannel/apex-ha/issues",
"version": "1.0.7",
"version": "1.0.8",
"requirements": [],
"ssdp": [],
"zeroconf": [],
Expand Down
11 changes: 6 additions & 5 deletions custom_components/apex/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,12 @@ def extra_state_attributes(self):

@property
def unit_of_measurement(self):
for value in self.coordinator.data["config"]["iconf"]:
if value["did"] == self.sensor["did"]:
if "range" in value["extra"]:
if value["extra"]["range"] in MEASUREMENTS:
return MEASUREMENTS[value["extra"]["range"]]
if "iconf" in self.coordinator.data["config"]:
for value in self.coordinator.data["config"]["iconf"]:
if value["did"] == self.sensor["did"]:
if "range" in value["extra"]:
if value["extra"]["range"] in MEASUREMENTS:
return MEASUREMENTS[value["extra"]["range"]]
if self.sensor["type"] in SENSORS:
if "measurement" in SENSORS[self.sensor["type"]]:
return SENSORS[self.sensor["type"]]["measurement"]
Expand Down
2 changes: 2 additions & 0 deletions info.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
## **Changelog**
## Version 1.08
- Bug fix for config error on old status.xml file
### Version 1.07
- Change naming scheme for entities to start with apex_ **Breaking change: This will create duplicate entities as the naming scheme has changed and any existing automations will need to be updated to the new format**
- Add retrieval of measurements from Apex config e.g. temp probes report correct Celcius or Fahrenheit
Expand Down

0 comments on commit 71c4d14

Please sign in to comment.