Skip to content

Commit

Permalink
airzone: webserver: fix sensors unique ID
Browse files Browse the repository at this point in the history
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
  • Loading branch information
Noltari committed Apr 26, 2022
1 parent c953d60 commit 68f21a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions homeassistant/components/airzone/__init__.py
Expand Up @@ -71,6 +71,9 @@ def __init__(
"name": self.get_airzone_value(AZD_FULL_NAME),
"sw_version": self.get_airzone_value(AZD_FIRMWARE),
}
self._attr_unique_id = (
entry.entry_id if entry.unique_id is None else entry.unique_id
)

def get_airzone_value(self, key) -> Any:
"""Return system value by key."""
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/airzone/sensor.py
Expand Up @@ -119,7 +119,7 @@ def __init__(
"""Initialize."""
super().__init__(coordinator, entry)
self._attr_name = f"WebServer {description.name}"
self._attr_unique_id = f"{entry.entry_id}_ws_{description.key}"
self._attr_unique_id = f"{self._attr_unique_id}_ws_{description.key}"
self.entity_description = description


Expand Down

0 comments on commit 68f21a0

Please sign in to comment.