I regret to inform you that, based on the design you've shared, our current bot model isn't compatible with that type of switch. I apologize for any inconvenience this may cause.
import requests
#WeatherFlow Better Forecast GET
url = "https://swd.weatherflow.com/swd/rest/better_forecast?station_id=12345&units_temp=f&units_wind=mph&units_pressure=mb&units_precip=in&units_distance=mi&token=1ab1234-01a1-1ab1-a123-12ab345678ab"
body = {}
headers = {}
response_01 = requests.request("GET", url, data=body, headers=headers)
response_02 = response_01.json()
better_forecast_air_temp_high_01 = response_02["forecast"]["daily"][0]["air_temp_high"]
better_forecast_air_temp_low_01 = response_02["forecast"]["daily"][0]["air_temp_low"]
better_forecast_air_temp_high_02 = response_02["forecast"]["daily"][1]["air_temp_high"]
better_forecast_air_temp_low_02 = response_02["forecast"]["daily"][1]["air_temp_low"]
indigo.variable.updateValue(1965927598, u"{0:.0f}".format(better_forecast_air_temp_high_01)) # Indigo Variable ID for High Temp Today
indigo.variable.updateValue(261445057, u"{0:.0f}".format(better_forecast_air_temp_low_01)) # Indigo Variable ID for Low Temp Today
indigo.variable.updateValue(1786425257, u"{0:.0f}".format(better_forecast_air_temp_high_02)) # Indigo Variable ID for High Temp Tomorrow
indigo.variable.updateValue(1123217000, u"{0:.0f}".format(better_forecast_air_temp_low_02)) # Indigo Variable ID for Low Temp Tomorrow
WeatherFlow Smart Weather Error Error in plugin execution runConcurrentThread:
Traceback (most recent call last):
File "plugin.py", line 717, in runConcurrentThread
File "plugin.py", line 645, in _process_message
File "plugin.py", line 945, in process_obs_tempest
TypeError: list indices must be integers, not float
WeatherFlow Smart Weather Error Error in plugin execution runConcurrentThread:
Traceback (most recent call last):
File "plugin.py", line 717, in runConcurrentThread
File "plugin.py", line 645, in _process_message
File "plugin.py", line 945, in process_obs_tempest
TypeError: list indices must be integers, not float
WeatherFlow Smart Weather Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
except:
0000 006B 0000 0022 015B 00AD 0015 0015 0015 0041 0015 0041 0015 0041 0015 0015 0015 0041 0015 0041 0015 0041 0015 0041 0015 0041 0015 0041 0015 0015 0015 0015 0015 0015 0015 0015 0015 0041 0015 0041 0015 0015 0015 0015 0015 0041 0015 0041 0015 0015 0015 0015 0015 0015 0015 0015 0015 0041 0015 0041 0015 0015 0015 0041 0015 0015 0015 0015 0015 0041 0015 05D3
Reloading plugin "WeatherFlow Smart Weather 0.2.1"
Stopping plugin "WeatherFlow Smart Weather 0.2.1" (pid 76101)
Stopped plugin "WeatherFlow Smart Weather 0.2.1"
Starting plugin "WeatherFlow Smart Weather 0.2.1" (pid 92106)
Started plugin "WeatherFlow Smart Weather 0.2.1"
Korey wrote:I am supposed to be getting a Tempest as I signed up to be a beta tester, I will let you and everyone else know if Bruces current plugin will work with it once I have it set up.
jltnol wrote:
And as much trouble as KPL's can be, I love the fact they can be so customized, and can do so much, it's going to really hard to give them all up
degreeC = u"\u00b0C"
degreeF = u"\u00b0F"
dev.updateStateOnServer("displayState", str(varValue), uiValue=str(varValue) + u"\u00b0F")
or
dev.updateStateOnServer("displayState", str(varValue), uiValue=str(varValue) + degreeC)