Skip to content

Commit

Permalink
fix: fix temperature showing in Celsius (#1682)
Browse files Browse the repository at this point in the history
  • Loading branch information
kdvlr authored Aug 6, 2022
1 parent 3a12819 commit 13afaa8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions custom_components/alexa_media/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,15 +206,19 @@ def device_info(self):
return None

@property
def unit_of_measurement(self):
def native_unit_of_measurement(self):
return TEMP_CELSIUS

@property
def state(self):
def native_value(self):
return parse_temperature_from_coordinator(
self.coordinator, self.alexa_entity_id
)

@property
def device_class(self):
return "temperature"

@property
def unique_id(self):
# This includes "_temperature" because the Alexa entityId is for a physical device
Expand Down

0 comments on commit 13afaa8

Please sign in to comment.