having predictable trouble with this formula -- currently compiler doesn't like the exp notation (well, it compiles, but runtime no like). i can't sort out how to do it properly in py. any thoughts, mainly on the final line?
adding this handler because in this heat, for some reason, often getting -data unavailable- back from the noaa plugin query, the db on the noaa side is not doing the calculations to F for some reason, or populating the text strings. but the C values seem to be updated regularly, so i'm trying to fallback on that in these cases:
- Code: Select all
##use other vars if '- data unavailable -'
if cnttemp == "- data unavailable -":
cnttemp = (wthrStation.states['temperatureC']-32)*5/9
if cnthumid == "- data unavailable -":
cnthumid = 100 * {exp[17.625 * wthrStation.states['dewPointC']/(243.04 + wthrStation.states['dewPointC'])]/exp[17.625 * wthrStation.states['temperatureC']/(243.04 + wthrStation.states['temperatureC'])]}
thanks for any thoughts!