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

Pura Max "Maintenance Mode" #20

Open
rethamazur opened this issue Aug 3, 2022 · 3 comments
Open

Pura Max "Maintenance Mode" #20

rethamazur opened this issue Aug 3, 2022 · 3 comments

Comments

@rethamazur
Copy link

thanks again for this component.
Is there a way to add the new "maintenance mode" in the Pura Max actions list?

@itschrisg
Copy link
Contributor

I managed to enable after a bit of investigation using the mobile app.

@al-one : You're welcome to incorporate this if it's suitable. Let me know if I'm off base.

There are two properties in the __init__.py file (approx. lines 743-758) for the actions shown in the select control. I've added one entry to each to reference the maintenance mode (displayed as "maintain"), with an action id of 9.

@property
def action(self):
    return {
        0: 'cleanup',
        2: 'deodorize',
        9: 'maintain',
    }.get(self.work_mode, None)

@property
def actions(self):
    return {
        'cleanup':   ['start', 0],
        'pause':     ['stop', self.work_mode],
        'end':       ['end', self.work_mode],
        'continue':  ['continue', self.work_mode],
        'deodorize': ['start', 2],
        'maintain': ['start', 9],
    }

@Devstored
Copy link

#26

@itschrisg was faster than me :) But I added some extra features.

@rethamazur
Copy link
Author

@itschrisg that worked just fine, thanks!

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

No branches or pull requests

3 participants