mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +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
|
||||
for pump_num, pump_data in coordinator.data[SL_DATA.KEY_PUMPS].items():
|
||||
if pump_data["data"] != 0 and "currentWatts" in pump_data:
|
||||
entities.extend(
|
||||
ScreenLogicPumpSensor(coordinator, pump_num, pump_key)
|
||||
for pump_key in pump_data
|
||||
if pump_key in SUPPORTED_PUMP_SENSORS
|
||||
)
|
||||
for pump_key in pump_data:
|
||||
# Considerations for Intelliflow VF
|
||||
if pump_data["pumpType"] == 1 and pump_key == "currentRPM":
|
||||
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
|
||||
if equipment_flags & EQUIPMENT.FLAG_INTELLICHEM:
|
||||
|
Loading…
x
Reference in New Issue
Block a user