Skip to content

Commit

Permalink
fix error : Deprecation TEMP_CELSIUS to UnitOfTemperature.CELSIUS
Browse files Browse the repository at this point in the history
  • Loading branch information
yusri salleh committed Jan 4, 2025
1 parent d8dbfd6 commit 34d3235
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/malaysia_weather/weather.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
TEMP_CELSIUS,
UnitOfTemperature,
)
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
Expand Down Expand Up @@ -69,7 +69,7 @@ class MalaysiaWeather(CoordinatorEntity, WeatherEntity):
"""Implementation of Malaysia Weather."""

_attr_has_entity_name = True
_attr_native_temperature_unit = TEMP_CELSIUS
_attr_native_temperature_unit = UnitOfTemperature.CELSIUS
_attr_supported_features = WeatherEntityFeature.FORECAST_DAILY
_attr_attribution = ATTRIBUTION

Expand Down

0 comments on commit 34d3235

Please sign in to comment.