Add a DysonFilterLifePercentage class for the Pure Cool link #219
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.
You might not like this as it's a calculated sensor value and not a raw value, and you can make calculated sensor values with the templating integration -- this is fair, cause it makes me a little squishy myself.
But I didn't like either option provided by the integration. Defining the sensor in
configuration.yaml
means it can't be added to the air purifier device, and defining the sensor using the integration's UI tool lets you add the sensor to the air purifier device but it's in the Sensors section not the Diagnostic section. I didn't like having a sensor that should be a diagnostic out of place, so I did this for myself, and thought I'd at least give you the opportunity to decide if you think it'd be useful for anyone else.I have 3 of these that seem to confirm that the math here matches the math being used in how the % is displayed in the official Dyson app.