Skip to content

Commit

Permalink
fix(updater::forecast): use const form HA for attributes names (#117)
Browse files Browse the repository at this point in the history
* fix(updater::forecast): use consts form HA for attributes names

Fix #116
  • Loading branch information
IATkachenko authored Apr 9, 2024
1 parent ec1f4f1 commit f0a56af
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions custom_components/yandex_weather/updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
ATTR_FORECAST_NATIVE_TEMP_LOW,
ATTR_FORECAST_NATIVE_WIND_SPEED,
ATTR_FORECAST_PRECIPITATION_PROBABILITY,
ATTR_FORECAST_TEMP,
ATTR_FORECAST_TEMP_LOW,
ATTR_FORECAST_WIND_BEARING,
Forecast,
)
Expand Down Expand Up @@ -114,9 +116,9 @@ def dst(self) -> str:
"wind_dir", ATTR_FORECAST_WIND_BEARING, mapping=WIND_DIRECTION_MAPPING
),
AttributeMapper("temp_avg", ATTR_FORECAST_NATIVE_TEMP),
AttributeMapper("temp_avg", "temperature"),
AttributeMapper("temp_avg", ATTR_FORECAST_TEMP),
AttributeMapper("temp_min", ATTR_FORECAST_NATIVE_TEMP_LOW),
AttributeMapper("temp_min", "templow"),
AttributeMapper("temp_min", ATTR_FORECAST_TEMP_LOW),
AttributeMapper("pressure_pa", ATTR_FORECAST_NATIVE_PRESSURE),
AttributeMapper("wind_speed", ATTR_FORECAST_NATIVE_WIND_SPEED, default=0),
AttributeMapper("prec_mm", ATTR_FORECAST_NATIVE_PRECIPITATION, default=0),
Expand Down

0 comments on commit f0a56af

Please sign in to comment.