Skip to content

Commit

Permalink
Add self.api to energy entities
Browse files Browse the repository at this point in the history
  • Loading branch information
Bre77 committed Feb 4, 2024
1 parent 77e868c commit 708b8c5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions custom_components/teslemetry/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ def __init__(
"""Initialize common aspects of a Teslemetry entity."""
super().__init__(energysite.live_coordinator, key)
self._attr_unique_id = f"{energysite.id}-{key}"
self.api = energysite.api

self._attr_device_info = DeviceInfo(
identifiers={(DOMAIN, str(energysite.id))},
Expand All @@ -141,6 +142,7 @@ def __init__(
"""Initialize common aspects of a Teslemetry entity."""
super().__init__(energysite.info_coordinator, key)
self._attr_unique_id = f"{energysite.id}-{key}"
self.api = energysite.api

self._attr_device_info = DeviceInfo(
identifiers={(DOMAIN, str(energysite.id))},
Expand Down

0 comments on commit 708b8c5

Please sign in to comment.