petkit icon indicating copy to clipboard operation
petkit copied to clipboard

Pura Max "Maintenance Mode"

Open rethamazur opened this issue 2 years ago • 3 comments

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

rethamazur avatar Aug 03 '22 16:08 rethamazur

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],
    }

itschrisg avatar Oct 18 '22 06:10 itschrisg

#26

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

Devstored avatar Oct 18 '22 20:10 Devstored

@itschrisg that worked just fine, thanks!

rethamazur avatar Oct 22 '22 22:10 rethamazur