Fix whois expiration date (#51868)
parent
986c4a8f29
commit
c8329032b2
|
@ -118,6 +118,7 @@ class WhoisSensor(SensorEntity):
|
||||||
expiration_date = response["expiration_date"]
|
expiration_date = response["expiration_date"]
|
||||||
if isinstance(expiration_date, list):
|
if isinstance(expiration_date, list):
|
||||||
attrs[ATTR_EXPIRES] = expiration_date[0].isoformat()
|
attrs[ATTR_EXPIRES] = expiration_date[0].isoformat()
|
||||||
|
expiration_date = expiration_date[0]
|
||||||
else:
|
else:
|
||||||
attrs[ATTR_EXPIRES] = expiration_date.isoformat()
|
attrs[ATTR_EXPIRES] = expiration_date.isoformat()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue