ha-core/homeassistant/components/smhi
Christer Vestermark fca56993c6
Add smhi wind gust speed and thunder probability (#50328)
* Added some extra attributes

Added the extra attributes
wind_gust_speed and
thunder_probability
that were already implemented in the underlaying library (joysoftware
/
pypi_smhi).

Also for the existing extra attribute cloudiness, it is added if "is not None" instead of just "if self.cloudiness" which would make it False (and therefore not available) if cloudiness = 0.

* Trying to solve the style issues

Removed white spaces and changed order of list as suggested by the tests.

* New try to solve the style issues

Removed some more white spaces...

* Changed dictionary handling as suggested

Changed dictionary handling as suggested by MartinHjelmare.

* Updated test

Updated test_weather.py to include the new attributes wind_gust_speed and thunder_probability.

* Added missing imports

Added the missing imports
ATTR_SMHI_THUNDER_PROBABILITY,
ATTR_SMHI_WIND_GUST_SPEED,

* Renaming self.thunder to self.thunder_probability and correcting test valuesfor

Renamed the new internal attribute
thunder to thunder_probability, same as the exposed attribute for improved consistency.
Corrected test values according to smhi.json.

* Forgot to change to self.thunder_probability in one place.

sorry.
2021-05-10 16:44:08 +02:00
..
translations [ci skip] Translation update 2021-03-16 00:04:36 +00:00
__init__.py Reduce config entry setup/unload boilerplate Q-S (#49778) 2021-04-27 22:10:04 +02:00
config_flow.py Clean up connection classes in integrations P-S (#49893) 2021-04-30 21:04:44 -10:00
const.py Add smhi wind gust speed and thunder probability (#50328) 2021-05-10 16:44:08 +02:00
manifest.json Update smhi package to 1.0.15 (#49987) 2021-05-03 10:21:57 +02:00
strings.json Add name to base strings for config flows (#40947) 2020-10-03 15:28:42 +02:00
weather.py Add smhi wind gust speed and thunder probability (#50328) 2021-05-10 16:44:08 +02:00