Compare commits

...

2 Commits

Author SHA1 Message Date
Lukas Svoboda 9b9fd16513
Merge pull request #27 from schizza/chill_index_fix
Chill index fix
2024-06-17 14:40:23 +02:00
schizza fb9830cc1e Chill index fix
Fix chill index formula as suggested by @facko79.
Chill index is computed only for temperatures  less then 10°C (50°F). Otherwise real temperature is returned.
2024-06-17 14:37:50 +02:00
2 changed files with 3 additions and 3 deletions

View File

@ -10,6 +10,6 @@
"issue_tracker": "https://github.com/schizza/SWS-12500-custom-component/issues",
"requirements": [],
"ssdp": [],
"version": "0.1.3",
"version": "0.1.3.4",
"zeroconf": []
}

View File

@ -201,7 +201,7 @@ def chill_index(data: Any) -> UnitOfTemperature:
temp = float(data[OUTSIDE_TEMP])
wind = float(data[WIND_SPEED])
return round(
(
(35.7 + (0.6215 * temp))
@ -209,4 +209,4 @@ def chill_index(data: Any) -> UnitOfTemperature:
+ (0.4275 * (temp * (wind**0.16)))
),
2,
)
) if temp < 50 and wind > 3 else temp