Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Keypad Plugin -WHat broke that Manual Program isnt an option
#1
Edited for clarity - what broke that made this not work - want to fix but not looking to start from scratch
Html snippet:
Code:
                  <option value="-1" ${"selected" if 'dkeyfn' in settings and settings['dkeyfn'] == '-1' else ""}>None</option>
                  <option value="0" ${"selected" if 'dkeyfn' in settings and settings['dkeyfn'] == '0' else ""}>Start Manual Station</option>
                  <option value="2" ${"selected" if 'dkeyfn' in settings and settings['dkeyfn'] == '2' else ""}>Set Water Level</option>
                  <option value="3" ${"selected" if 'dkeyfn' not in settings or settings['dkeyfn'] == '3' else ""}>Set Default Manual Station Time (minutes)</option>
                  <option value="4" ${"selected" if 'dkeyfn' in settings and settings['dkeyfn'] == '4' else ""}>Set Default Rain Delay Time (hours)</option>
                  <option value="5" ${"selected" if 'dkeyfn' in settings and settings['dkeyfn'] == '5' else ""}>Start Rain Delay (hours)</option>

option value 1 is omitted but found in the python code:
Code:
    # Value functions
    FN_NONE = -1
    FN_MANUAL_STATION = 0
    FN_MANUAL_PROGRAM = 1
    FN_WATER_LEVEL = 2
    FN_MANUAL_STATION_TIME = 3
    FN_RAIN_DELAY_TIME = 4
    FN_START_RAIN_DELAY = 5
    # Function text must be 9 chars or less
    FUNCTION_TEXT = {FN_MANUAL_STATION:      u"Station",
                     FN_MANUAL_PROGRAM:      u"Program",
                     FN_WATER_LEVEL:         u"Water Lvl",
                     FN_MANUAL_STATION_TIME: u"Sta Time",
                     FN_RAIN_DELAY_TIME:     u"RDly Time",
                     FN_START_RAIN_DELAY:    u"Rain Dly"}

and later in the same keypad.py:
Code:
        elif self.selected_function == KeypadPlugin.FN_MANUAL_PROGRAM:
            programID = value
            # Execute program and provide feedback
            return programID >= 0 and KeypadPlugin._set_runonce_program(programID)
Reply


Messages In This Thread
Keypad Plugin -WHat broke that Manual Program isnt an option - by gdgeist@chickenmad.com - 2021 Jun 24, 02:08 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)