Skip to content

Commit

Permalink
add support for early 2024 rainforest eagle update
Browse files Browse the repository at this point in the history
  • Loading branch information
cmromo committed Mar 7, 2024
1 parent 86d1d57 commit ff9f2c6
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,15 @@ def get_power_meter(self) -> dict:
):
_log.info(f"found active power meter {device}")
return device
if self.device_list.get('Device'):
device = self.device_list['Device']
if (
isinstance(device, dict)
and device["ModelId"] == "electric_meter"
and device["ConnectionStatus"] == "Connected"
):
_log.info(f"found active power meter {device}")
return device

def get_point(self, point_name):
return self.get_variable(self.power_meter, point_name)
Expand Down Expand Up @@ -143,7 +152,7 @@ def scrape_power_meter(self):
if not d["Value"]:
_log.warning(f"Variable {d['Name']} has no value. skipping")
continue
values[name] = d["Value"]
values[name] = int(d["Value"])

_log.info(f"Scraped power meter: {values=}")
return values
Expand Down

0 comments on commit ff9f2c6

Please sign in to comment.