Skip to content

Commit

Permalink
Merge pull request #502 from CJNE/hotfix/fix-num-phases-eddi
Browse files Browse the repository at this point in the history
  • Loading branch information
CJNE authored Mar 13, 2024
2 parents 9edbc32 + 035bdda commit 0a7fa66
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 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.26"
VERSION = "0.0.27"

ATTRIBUTION = "Data provided by myenergi"
ISSUE_URL = "https://github.com/CJNE/ha-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
Expand Up @@ -8,5 +8,5 @@
"iot_class": "cloud_polling",
"issue_tracker": "https://github.com/cjne/ha-myenergi/issues",
"requirements": ["pymyenergi==0.1.1"],
"version": "0.0.26"
"version": "0.0.27"
}
18 changes: 10 additions & 8 deletions custom_components/myenergi/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,14 +305,6 @@ async def async_setup_entry(hass, entry, async_add_devices):

# Sensors common to Zapi and Eddi
if device.kind in [ZAPPI, EDDI]:
sensors.append(
MyenergiSensor(
coordinator,
device,
entry,
create_meta("Number of phases", "num_phases", ENTITY_CATEGORY_DIAGNOSTIC),
)
)
sensors.append(
MyenergiSensor(
coordinator,
Expand Down Expand Up @@ -351,6 +343,16 @@ async def async_setup_entry(hass, entry, async_add_devices):
)
# Zappi only sensors
if device.kind == ZAPPI:
sensors.append(
MyenergiSensor(
coordinator,
device,
entry,
create_meta(
"Number of phases", "num_phases", ENTITY_CATEGORY_DIAGNOSTIC
),
)
)
sensors.append(
MyenergiSensor(
coordinator,
Expand Down

0 comments on commit 0a7fa66

Please sign in to comment.