Re: [weewx-user] simple python question, while adopting current.inc

2020-12-03 Thread Vetti52
Right! That works nicely. Well, I could have realized it. But perfect, that there is somone, that understands, what I have written. Thanks a lot! tke...@gmail.com schrieb am Donnerstag, 3. Dezember 2020 um 18:47:33 UTC+1: > Silly me. You need a .raw suffix: > > #if $varExists('day.windSpeed') a

Re: [weewx-user] simple python question, while adopting current.inc

2020-12-03 Thread Tom Keffer
Silly me. You need a .raw suffix: #if $varExists('day.windSpeed') and $current.windSpeed.raw is not None #if $current.windSpeed.beaufort.raw == 0 #set $word_current_beaufort = 'Calm' #elif $current.windSpeed.beaufort.raw == 1 #set $word_current_beaufort = 'Light Air' ... #else #s

Re: [weewx-user] simple python question, while adopting current.inc

2020-12-03 Thread Vetti52
I tried the integer version already, with the same result. So, I assumed, that Beaufort is a string. Still no success. At least current.windGust.beaufort works fine! Thanks for the hint. Showing wind gust is just to compare the values to the red line in the windspeed/gust graph. When sailing, I

Re: [weewx-user] simple python question, while adopting current.inc

2020-12-03 Thread Tom Keffer
Your main problem is that $current.windSpeed.beaufort returns a number, not a string. So, you want #if $varExists('day.windSpeed') and $current.windSpeed.raw is not None #if $current.windSpeed.beaufort == 0 #set $word_current_beaufort = 'Calm' #elif $current.windSpeed.beaufort == 1 #se

[weewx-user] simple python question, while adopting current.inc

2020-12-03 Thread Vetti52
After upgrading to Weewx version 4.2.0 I want to replace the deprecated type Beaufort by the new unit $current.windSpeed.beaufort. First, I replaced the previous evaluation in my accomodated current.inc, where I want to express the beaufort value by a literal description: #if $varExists('day.win