Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a DysonFilterLifePercentage class for the Pure Cool link #219

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rclarkmorrow
Copy link

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.

@dotvezz
Copy link
Member

dotvezz commented Feb 20, 2025

Hi @rclarkmorrow! I think the logic here looks good. The one thing I'm not super sure about is how long the different models expect their filters to last. It might all be the same. I'll try to scrub as much documentation as I can find.

I don't mean to sit on this PR for too long, but I've been preoccupied with work and family for the past few months. Please feel free to ping me if I don't follow up in a reasonable time!

@rclarkmorrow
Copy link
Author

I'll see if I can find anything out about other models as well, but as I only have this particular model (and newer models that already report %) I won't be able to test against the app like I did here.

@rclarkmorrow
Copy link
Author

rclarkmorrow commented Mar 6, 2025

Hi, @dotvezz, I am checking back in. The only thing I'm really finding out there is what I saw before -- because Dyson claims filters will last a year based on 12 hours usage a day, there are forum posts that suggest it should be filter_life / 365 / 12 or filter_life/4380; this is what I saw when I was first adding this bit of code.

It's incorrect and calculates a higher percentage than what the official Dyson app shows me for the 3 TP02s I have. I think I remember seeing someone also say that the filter life was more like 4300 hours. So I plugged that number in, and it happens to continue to calculate the same percentage as the Dyson app shows for my TP02s still.

The only thing I haven't observed (yet) is rounding behavior -- it's possible they could be doing something like rounding to floor and I haven't noticed yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants