fix: report a pump as running from its telemetry, not its STATUS - #39
Open
hacctarr wants to merge 1 commit into
Open
fix: report a pump as running from its telemetry, not its STATUS#39hacctarr wants to merge 1 commit into
hacctarr wants to merge 1 commit into
Conversation
The PUMP binary sensor treats STATUS == "10" as running. On both of my PUMP/VSF pumps STATUS sits at "10" whether or not the pump is turning, so both sensors read on permanently. At one moment the idle spa jets pump reports STATUS 10 with RPM 0, PWR 0 and GPM 0 while the filter pump reports STATUS 10 with RPM 3068, PWR 1300 and GPM 53. The controller never pushes STATUS for a pump either, only RPM, PWR and GPM, so a STATUS-keyed sensor is not re-evaluated when a pump starts or stops. PumpBinarySensor derives is_on from whichever of RPM, PWR and GPM the pump publishes and keys isUpdated on the same attributes. A pump that publishes none of them keeps the STATUS comparison. The unique_id is unchanged, so existing entities carry over.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The PUMP binary sensor treats
STATUS == "10"as running. On both of myPUMP/VSFpumps, STATUS sits at10whether or not the pump is turning, so both sensors readonpermanently.Two pumps read at the same moment, straight out of
/api/states:binary_sensor.filter(PMP01)binary_sensor.spa_jets(PMP02)The controller also never pushes STATUS for a pump. Only the telemetry:
So a STATUS-keyed
isUpdatednever fires when a pump starts or stops, even on a system where STATUS does move.PumpBinarySensorderivesis_onfrom whichever of RPM, PWR, and GPM the pump publishes, and keysisUpdatedon the same attributes. A pump that publishes none of them falls back to the STATUS comparison, so single speed pumps are untouched. Theunique_idis unchanged and existing entities carry over. Device class becomesRUNNING.Running on 2.0.0 against my own IntelliCenter,
binary_sensor.spa_jetsnow readsoffwhilebinary_sensor.filterstayson, and the debug log shows the entity updating off the telemetry it now keys on: