Skip to content

Commit

Permalink
fix: restore alexa_entity_id attribute
Browse files Browse the repository at this point in the history
closes #1830
  • Loading branch information
alandtse committed Jan 14, 2023
1 parent 0a0788e commit 7ca77d9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions custom_components/alexa_media/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ class TemperatureSensor(SensorEntity, CoordinatorEntity):
def __init__(self, coordinator, entity_id, name, media_player_device_id):
"""Initialize temperature sensor."""
super().__init__(coordinator)
self.alexa_entity_id = entity_id
self._attr_name = name + " Temperature"
self._attr_device_class = SensorDeviceClass.TEMPERATURE
self._attr_state_class = SensorStateClass.MEASUREMENT
Expand Down Expand Up @@ -280,6 +281,7 @@ def __init__(
unit,
):
super().__init__(coordinator)
self.alexa_entity_id = entity_id
self._sensor_name = sensor_name
# tidy up name
self._sensor_name = self._sensor_name.replace("Alexa.AirQuality.", "")
Expand Down

0 comments on commit 7ca77d9

Please sign in to comment.