Fix whois expiration date (#51868)

pull/51945/head
Konstantin Antselovich 2021-06-16 20:57:46 -07:00 committed by GitHub
parent 986c4a8f29
commit c8329032b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -118,6 +118,7 @@ class WhoisSensor(SensorEntity):
expiration_date = response["expiration_date"]
if isinstance(expiration_date, list):
attrs[ATTR_EXPIRES] = expiration_date[0].isoformat()
expiration_date = expiration_date[0]
else:
attrs[ATTR_EXPIRES] = expiration_date.isoformat()