Skip to content
Open
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions custom_components/monitor_docker/button.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,17 @@ def __init__(
)
self._name = name_format.format(name=alias_name)
self._removed = False
self._attr_unique_id = slugify(f"{self._instance}_{self._cname}_restart")

@property
def entity_id(self) -> str:
"""Return the entity id of the button."""
return self._entity_id

@entity_id.setter
def entity_id(self, value: str) -> None:
self._entity_id = value

@property
def name(self) -> str:
"""Return the name of the sensor."""
Expand Down
5 changes: 5 additions & 0 deletions custom_components/monitor_docker/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,17 @@ def __init__(
)
self._name = name_format.format(name=alias_name)
self._removed = False
self._attr_unique_id = slugify(f"{self._instance}_{self._cname}_switch")

@property
def entity_id(self) -> str:
"""Return the entity id of the switch."""
return self._entity_id

@entity_id.setter
def entity_id(self, value: str) -> None:
self._entity_id = value

@property
def name(self) -> str:
"""Return the name of the sensor."""
Expand Down
Loading