示例#1
0
    def runSetup(self):
        ConfigList = []
        ConfigList.append(getConfigListEntry('\c00289496' + _("*** Basic settings ***"), config.plugins.WeatherPlugin.FakeEntry))
        ConfigList.append(getConfigListEntry(_("Airly API key:"), config.plugins.WeatherPlugin.airlyAPIKEY))
        ConfigList.append(getConfigListEntry(_("Icons type:"), config.plugins.WeatherPlugin.IconsType))
        ConfigList.append(getConfigListEntry(_("Icons scaling engine:"), config.plugins.WeatherPlugin.ScalePicType))
        ConfigList.append(getConfigListEntry(_("Build histograms:"), config.plugins.WeatherPlugin.BuildHistograms))
        if config.plugins.WeatherPlugin.BuildHistograms.value:
            ConfigList.append(getConfigListEntry(_("Period:"), config.plugins.WeatherPlugin.HistoryPeriod))

        #ConfigList.append(getConfigListEntry(""))
        #ConfigList.append(getConfigListEntry('\c00289496' + _("*** Integration with Airly plugin ***")))
        #ConfigList.append(getConfigListEntry(_("Get current data from:"), config.plugins.WeatherPlugin.CurrentValuesSource))
        
        ConfigList.append(getConfigListEntry(""))
        ConfigList.append(getConfigListEntry('\c00289496' + _("*** Home air condition ***")))
        ConfigList.append(getConfigListEntry(_("1st AC system:"), config.plugins.WeatherPlugin.AC1))
        if config.plugins.WeatherPlugin.AC1.value != 'off':
            ConfigList.append(getConfigListEntry('- ' + _("IP address:"), config.plugins.WeatherPlugin.AC1_IP))
            ConfigList.append(getConfigListEntry('- ' + _("Port:"), config.plugins.WeatherPlugin.AC1_PORT))
            ConfigList.append(getConfigListEntry('- ' + _("Description:"), config.plugins.WeatherPlugin.AC1inf))
        ConfigList.append(getConfigListEntry(_("2nd AC system:"), config.plugins.WeatherPlugin.AC2))
        if config.plugins.WeatherPlugin.AC2.value != 'off':
            ConfigList.append(getConfigListEntry('- ' + _("IP address:"), config.plugins.WeatherPlugin.AC2_IP))
            ConfigList.append(getConfigListEntry('- ' + _("Port:"), config.plugins.WeatherPlugin.AC2_PORT))
            ConfigList.append(getConfigListEntry('- ' + _("Description:"), config.plugins.WeatherPlugin.AC2inf))
        if config.plugins.WeatherPlugin.AC1.value != 'off' or config.plugins.WeatherPlugin.AC2.value != 'off':
            ConfigList.append(getConfigListEntry(_("Use A/C outside temp sensor instead of MSN:"), config.plugins.WeatherPlugin.ACuseTempSensor))

        ConfigList.append(getConfigListEntry(""))
        ConfigList.append(getConfigListEntry('\c00289496' + _("*** Debuging options ***")))
        ConfigList.append(getConfigListEntry(_("Debug (require restart):"), config.plugins.WeatherPlugin.DebugEnabled))
        if config.plugins.WeatherPlugin.DebugEnabled.value:
            ConfigList.append(getConfigListEntry(_("Debug log file size:"), config.plugins.WeatherPlugin.DebugSize))
            ConfigList.append(getConfigListEntry("> MSNWeather(Source):", config.plugins.WeatherPlugin.DebugMSNWeatherSource))
            ConfigList.append(getConfigListEntry("> MSNWeather(Converter):", config.plugins.WeatherPlugin.DebugMSNWeatherConverter))
            ConfigList.append(getConfigListEntry("> MSNWeatherThingSpeak(Converter):", config.plugins.WeatherPlugin.DebugMSNWeatherThingSpeakConverter))
            ConfigList.append(getConfigListEntry("> MSNWeatherWebCurrent(Converter):", config.plugins.WeatherPlugin.DebugMSNWeatherWebCurrentConverter))
            ConfigList.append(getConfigListEntry("> MSNWeatherWebhourly(Converter):", config.plugins.WeatherPlugin.DebugMSNWeatherWebhourlyConverter))
            ConfigList.append(getConfigListEntry("> MSNWeatherWebDaily(Converter):", config.plugins.WeatherPlugin.DebugMSNWeatherWebDailyConverter))
            ConfigList.append(getConfigListEntry("> MSNWeatherPixmap(Renderer):", config.plugins.WeatherPlugin.DebugMSNWeatherPixmapRenderer))
            ConfigList.append(getConfigListEntry("> WeatherMSN updater:", config.plugins.WeatherPlugin.DebugWeatherMSNupdater))
            ConfigList.append(getConfigListEntry("> getWeather basic:", config.plugins.WeatherPlugin.DebugGetWeatherBasic))
            ConfigList.append(getConfigListEntry("> getWeather xml component:", config.plugins.WeatherPlugin.DebugGetWeatherXML))
            ConfigList.append(getConfigListEntry("> getWeather web component:", config.plugins.WeatherPlugin.DebugGetWeatherWEB))
            ConfigList.append(getConfigListEntry("> getWeather thingSpeak component:", config.plugins.WeatherPlugin.DebugGetWeatherTS))
            ConfigList.append(getConfigListEntry("> getWeather raw data:", config.plugins.WeatherPlugin.DebugGetWeatherFULL))
            ConfigList.append(getConfigListEntry("> MSNweatherHistograms:", config.plugins.WeatherPlugin.DebugMSNweatherHistograms))
            ConfigList.append(getConfigListEntry("> MSNweatherMaps:", config.plugins.WeatherPlugin.DebugMSNweatherHistograms))
            #ConfigList.append(getConfigListEntry("> :", config.plugins.WeatherPlugin.))
        try:
            self["config"].list = ConfigList
            self["config"].setList(ConfigList)
        except Exception:
            pass
示例#2
0
 def runSetup(self):
     ConfigList = []
     ConfigList.append(
         getConfigListEntry(_("Icons type:"),
                            config.plugins.WeatherPlugin.IconsType))
     ConfigList.append(
         getConfigListEntry(_("Icons scaling engine:"),
                            config.plugins.WeatherPlugin.ScalePicType))
     ConfigList.append(
         getConfigListEntry(_("Build histograms:"),
                            config.plugins.WeatherPlugin.BuildHistograms))
     if config.plugins.WeatherPlugin.BuildHistograms.value:
         ConfigList.append(
             getConfigListEntry(_("Period:"),
                                config.plugins.WeatherPlugin.HistoryPeriod))
     ConfigList.append(
         getConfigListEntry(_("Debug (require restart):"),
                            config.plugins.WeatherPlugin.DebugEnabled))
     if config.plugins.WeatherPlugin.DebugEnabled.value:
         ConfigList.append(
             getConfigListEntry(_("Debug log file size:"),
                                config.plugins.WeatherPlugin.DebugSize))
         ConfigList.append(
             getConfigListEntry(
                 "> MSNWeather(Source):",
                 config.plugins.WeatherPlugin.DebugMSNWeatherSource))
         ConfigList.append(
             getConfigListEntry(
                 "> MSNWeather(Converter):",
                 config.plugins.WeatherPlugin.DebugMSNWeatherConverter))
         ConfigList.append(
             getConfigListEntry(
                 "> MSNWeatherThingSpeak(Converter):", config.plugins.
                 WeatherPlugin.DebugMSNWeatherThingSpeakConverter))
         ConfigList.append(
             getConfigListEntry(
                 "> MSNWeatherWebCurrent(Converter):", config.plugins.
                 WeatherPlugin.DebugMSNWeatherWebCurrentConverter))
         ConfigList.append(
             getConfigListEntry(
                 "> MSNWeatherWebhourly(Converter):", config.plugins.
                 WeatherPlugin.DebugMSNWeatherWebhourlyConverter))
         ConfigList.append(
             getConfigListEntry(
                 "> MSNWeatherWebDaily(Converter):", config.plugins.
                 WeatherPlugin.DebugMSNWeatherWebDailyConverter))
         ConfigList.append(
             getConfigListEntry(
                 "> MSNWeatherPixmap(Renderer):", config.plugins.
                 WeatherPlugin.DebugMSNWeatherPixmapRenderer))
         ConfigList.append(
             getConfigListEntry(
                 "> WeatherMSN updater:",
                 config.plugins.WeatherPlugin.DebugWeatherMSNupdater))
         ConfigList.append(
             getConfigListEntry(
                 "> getWeather basic:",
                 config.plugins.WeatherPlugin.DebugGetWeatherBasic))
         ConfigList.append(
             getConfigListEntry(
                 "> getWeather xml component:",
                 config.plugins.WeatherPlugin.DebugGetWeatherXML))
         ConfigList.append(
             getConfigListEntry(
                 "> getWeather web component:",
                 config.plugins.WeatherPlugin.DebugGetWeatherWEB))
         ConfigList.append(
             getConfigListEntry(
                 "> getWeather thingSpeak component:",
                 config.plugins.WeatherPlugin.DebugGetWeatherTS))
         ConfigList.append(
             getConfigListEntry(
                 "> getWeather raw data:",
                 config.plugins.WeatherPlugin.DebugGetWeatherFULL))
         ConfigList.append(
             getConfigListEntry(
                 "> MSNweatherHistograms:",
                 config.plugins.WeatherPlugin.DebugMSNweatherHistograms))
         ConfigList.append(
             getConfigListEntry(
                 "> MSNweatherMaps:",
                 config.plugins.WeatherPlugin.DebugMSNweatherHistograms))
         #ConfigList.append(getConfigListEntry("> :", config.plugins.WeatherPlugin.))
     try:
         self["config"].list = ConfigList
         self["config"].setList(ConfigList)
     except Exception:
         pass