(self)
return self.request.get(f'https://{self.BASE_URL}/hmsweb/users/devices/automation/active')
This is the newer API for getting the "mode". This method also returns the schedules.
        Set a non-schedule mode to be active: {"activeAutomations":[{"deviceId":"XXXXXXXXXXXXX","timestamp":1532015622105,"activeModes":["mode1"],"activeSchedules":[]}]}
        Set a schedule to be active: {"activeAutomations":[{"deviceId":"XXXXXXXXXXXXX","timestamp":1532015790139,"activeModes":[],"activeSchedules":["schedule.1"]}]}
This is the newer API for getting the "mode". This method also returns the schedules.
        Set a non-schedule mode to be active: {"activeAutomations":[{"deviceId":"XXXXXXXXXXXXX","timestamp":1532015622105,"activeModes":["mode1"],"activeSchedules":[]}]}
        Set a schedule to be active: {"activeAutomations":[{"deviceId":"XXXXXXXXXXXXX","timestamp":1532015790139,"activeModes":[],"activeSchedules":["schedule.1"]}]}
This is the newer API for getting the mode . This method also returns the schedules . Set a non - schedule mode to be active : { activeAutomations : [ { deviceId : XXXXXXXXXXXXX timestamp : 1532015622105 activeModes : [ mode1 ] activeSchedules : [] } ] } Set a schedule to be active : { activeAutomations : [ { deviceId : XXXXXXXXXXXXX timestamp : 1532015790139 activeModes : [] activeSchedules : [ schedule . 1 ] } ] }
def GetModesV2(self):
        """
        This is the newer API for getting the "mode". This method also returns the schedules.
        Set a non-schedule mode to be active: {"activeAutomations":[{"deviceId":"XXXXXXXXXXXXX","timestamp":1532015622105,"activeModes":["mode1"],"activeSchedules":[]}]}
        Set a schedule to be active: {"activeAutomations":[{"deviceId":"XXXXXXXXXXXXX","timestamp":1532015790139,"activeModes":[],"activeSchedules":["schedule.1"]}]}
        """
        return self.request.get(f'https://{self.BASE_URL}/hmsweb/users/devices/automation/active')
def GetModesV2 ( self ) : return self . request . get ( f'https://{self.BASE_URL}/hmsweb/users/devices/automation/active' )