mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Add unique_id to cert_expiry (#27140)
* Add unique_id to cert_expiry * Simplify ID
This commit is contained in:
parent
69bdce768c
commit
2307cac942
@ -67,6 +67,11 @@ class SSLCertificate(Entity):
|
|||||||
"""Return the name of the sensor."""
|
"""Return the name of the sensor."""
|
||||||
return self._name
|
return self._name
|
||||||
|
|
||||||
|
@property
|
||||||
|
def unique_id(self):
|
||||||
|
"""Return a unique id for the sensor."""
|
||||||
|
return f"{self.server_name}:{self.server_port}"
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def unit_of_measurement(self):
|
def unit_of_measurement(self):
|
||||||
"""Return the unit this state is expressed in."""
|
"""Return the unit this state is expressed in."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user