mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Don't create unsupported pump sensors (#51828)
* Don't create unsupported pump sensors * Remove old code and simplify new statements. * Address notes
This commit is contained in:
parent
c0d311473c
commit
515bd18ddd
@ -68,11 +68,17 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
|
|||||||
# Pump sensors
|
# Pump sensors
|
||||||
for pump_num, pump_data in coordinator.data[SL_DATA.KEY_PUMPS].items():
|
for pump_num, pump_data in coordinator.data[SL_DATA.KEY_PUMPS].items():
|
||||||
if pump_data["data"] != 0 and "currentWatts" in pump_data:
|
if pump_data["data"] != 0 and "currentWatts" in pump_data:
|
||||||
entities.extend(
|
for pump_key in pump_data:
|
||||||
ScreenLogicPumpSensor(coordinator, pump_num, pump_key)
|
# Considerations for Intelliflow VF
|
||||||
for pump_key in pump_data
|
if pump_data["pumpType"] == 1 and pump_key == "currentRPM":
|
||||||
if pump_key in SUPPORTED_PUMP_SENSORS
|
continue
|
||||||
)
|
# Considerations for Intelliflow VS
|
||||||
|
if pump_data["pumpType"] == 2 and pump_key == "currentGPM":
|
||||||
|
continue
|
||||||
|
if pump_key in SUPPORTED_PUMP_SENSORS:
|
||||||
|
entities.append(
|
||||||
|
ScreenLogicPumpSensor(coordinator, pump_num, pump_key)
|
||||||
|
)
|
||||||
|
|
||||||
# IntelliChem sensors
|
# IntelliChem sensors
|
||||||
if equipment_flags & EQUIPMENT.FLAG_INTELLICHEM:
|
if equipment_flags & EQUIPMENT.FLAG_INTELLICHEM:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user