Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ __pycache__/
# Intellij IDEA stores project information in this directory
.idea
apex-ha-venv
.env
2 changes: 2 additions & 0 deletions custom_components/apex/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"dos": {"icon": "mdi:test-tube"},
"virtual": {"icon": "mdi:monitor-account"},
"iotaPump|Sicce|Syncra": {"icon" : "mdi:pump"},
"cor|20": {"icon" : "mdi:pump" },
"Feed" : {"icon": "mdi:shaker"},
"gph" : {"icon": "mdi:waves-arrow-right"},
"vortech" : {"icon": "mdi:pump"},
Expand Down Expand Up @@ -40,6 +41,7 @@
"mg" : {"icon" : "mdi:test-tube", "measurement": "ppm"},
"dos" : {"icon" : "mdi:pump", "measurement": "ml"},
"iotaPump|Sicce|Syncra": {"icon" : "mdi:pump", "measurement": "%"},
"cor|20": {"icon" : "mdi:pump", "measurement": "%"},
"variable" : {"icon" : "mdi:cog-outline"},
"virtual" : {"icon" : "mdi:cog-outline"},
"feed" : {"icon": "mdi:timer", "measurement": "mins"},
Expand Down
6 changes: 3 additions & 3 deletions custom_components/apex/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
sensor = ApexSensor(entry, value, config_entry.options)
async_add_entities([sensor], True)
for value in entry.data["outputs"]:
if value["type"] in ("dos", "variable", "virtual", "vortech", "iotaPump|Sicce|Syncra"):
if value["type"] in ("dos", "variable", "virtual", "vortech", "iotaPump|Sicce|Syncra", "cor|20"):
sensor = ApexSensor(entry, value, config_entry.options)
async_add_entities([sensor], True)

Expand Down Expand Up @@ -105,7 +105,7 @@ def get_value(self, ftype):
return value["status"][1]
if self.sensor["type"] == "vortech":
return f"{value["status"][0]} {value["status"][1]} {value["status"][2]}"
if self.sensor["type"] == "virtual" or self.sensor["type"] == "variable":
if self.sensor["type"] == "virtual" or self.sensor["type"] == "variable" or self.sensor["type"] == "cor|20":
if "config" in self.coordinator.data:
config_data = self.coordinator.data["config"]
if "oconf" in config_data:
Expand All @@ -131,7 +131,7 @@ def get_value(self, ftype):
return value
if self.sensor["type"] == "iotaPump|Sicce|Syncra":
return value
if self.sensor["type"] == "virtual" or self.sensor["type"] == "variable":
if self.sensor["type"] == "virtual" or self.sensor["type"] == "variable" or self.sensor["type"] == "cor|20":
if "config" in self.coordinator.data:
config_data = self.coordinator.data["config"]
if "oconf" in config_data:
Expand Down