Skip to content

Commit

Permalink
Fixed another eddi ct issue
Browse files Browse the repository at this point in the history
  • Loading branch information
CJNE committed Sep 7, 2021
1 parent 7e69314 commit 458ea10
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion custom_components/myenergi/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
NAME = "myenergi"
DOMAIN = "myenergi"
DOMAIN_DATA = f"{DOMAIN}_data"
VERSION = "0.0.9"
VERSION = "0.0.10"

ATTRIBUTION = "Data provided by http://jsonplaceholder.typicode.com/"
ISSUE_URL = "https://github.com/cjne/myenergi/issues"
Expand Down
2 changes: 1 addition & 1 deletion custom_components/myenergi/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"domain": "myenergi",
"name": "myenergi",
"version": "0.0.9",
"version": "0.0.10",
"documentation": "https://github.com/cjne/ha-myenergi",
"issue_tracker": "https://github.com/cjne/ha-myenergi/issues",
"dependencies": [],
Expand Down
24 changes: 13 additions & 11 deletions custom_components/myenergi/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,17 +185,6 @@ async def async_setup_entry(hass, entry, async_add_devices):
),
)
)
sensors.append(
MyenergiSensor(
coordinator,
device,
entry,
create_power_meta(
f"{device.ct3.name} CT3",
"ct3.power",
),
)
)

# Sensors common to Zapi and Eddi
if device.kind in ["zappi", "eddi"]:
Expand All @@ -222,6 +211,19 @@ async def async_setup_entry(hass, entry, async_add_devices):
)
for key in device.ct_keys:
sensors.append(MyenergiCTEnergySensor(coordinator, device, entry, key))
# Zappi and harvi
if device.kind in ["zappi", "harvi"]:
sensors.append(
MyenergiSensor(
coordinator,
device,
entry,
create_power_meta(
f"{device.ct3.name} CT3",
"ct3.power",
),
)
)
# Zappi only sensors
if device.kind == "zappi":
sensors.append(
Expand Down

0 comments on commit 458ea10

Please sign in to comment.