Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TEMP_CELSIUS is deprecated, changed it to UnitOfTemperature #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from datetime import timedelta
from homeassistant.helpers.event import track_time_interval

from homeassistant.const import TEMP_CELSIUS
from homeassistant.const import UnitOfTemperature

from . import (DOHOME_GATEWAY, DoHomeDevice)

Expand Down Expand Up @@ -84,7 +84,7 @@ def state(self):
def unit_of_measurement(self):
"""Return the unit of measurement of this entity, if any."""
if self._is_temperature and self.current_value != 100:
return TEMP_CELSIUS
return UnitOfTemperature.CELSIUS
elif self._is_humidity and self.current_value != 0:
return '%'
elif self._is_illumination and self.current_value != -1:
Expand Down