Add unique_id to cert_expiry (#27140)
* Add unique_id to cert_expiry * Simplify ID
This commit is contained in:
parent
69bdce768c
commit
2307cac942
1 changed files with 5 additions and 0 deletions
|
@ -67,6 +67,11 @@ class SSLCertificate(Entity):
|
|||
"""Return the name of the sensor."""
|
||||
return self._name
|
||||
|
||||
@property
|
||||
def unique_id(self):
|
||||
"""Return a unique id for the sensor."""
|
||||
return f"{self.server_name}:{self.server_port}"
|
||||
|
||||
@property
|
||||
def unit_of_measurement(self):
|
||||
"""Return the unit this state is expressed in."""
|
||||
|
|
Loading…
Add table
Reference in a new issue