Create but disable-by-default RPM and GPM sensors (#56549)

This commit is contained in:
Kevin Worrel 2021-09-23 11:00:33 -07:00 committed by GitHub
parent a5c6a65161
commit b43d377b53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,15 +69,16 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
for pump_num, pump_data in coordinator.data[SL_DATA.KEY_PUMPS].items():
if pump_data["data"] != 0 and "currentWatts" in pump_data:
for pump_key in pump_data:
# Considerations for Intelliflow VF
enabled = True
# Assumptions for Intelliflow VF
if pump_data["pumpType"] == 1 and pump_key == "currentRPM":
continue
# Considerations for Intelliflow VS
enabled = False
# Assumptions for Intelliflow VS
if pump_data["pumpType"] == 2 and pump_key == "currentGPM":
continue
enabled = False
if pump_key in SUPPORTED_PUMP_SENSORS:
entities.append(
ScreenLogicPumpSensor(coordinator, pump_num, pump_key)
ScreenLogicPumpSensor(coordinator, pump_num, pump_key, enabled)
)
# IntelliChem sensors