Fix humidity check in curweather.go

Check for HumidityRelative instead of Dewpoint in the HumidityRelative() function to return correct "not available" status.
This commit is contained in:
Winni Neessen 2023-06-27 15:19:41 +02:00
parent 8cb9754f69
commit 681c53c23d
Signed by: wneessen
GPG key ID: 385AC9889632126E

View file

@ -148,7 +148,7 @@ func (cw CurrentWeather) Dewpoint() Temperature {
// If the data point is not available in the CurrentWeather it will return
// Humidity in which the "not available" field will be true.
func (cw CurrentWeather) HumidityRelative() Humidity {
if cw.Data.Dewpoint == nil {
if cw.Data.HumidityRelative == nil {
return Humidity{na: true}
}
v := Humidity{