mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 09:47:13 +00:00
Fix whois error, check expiration_date for list and pick first (#27930)
This commit is contained in:
parent
e01562ceea
commit
9571f869d1
@ -119,6 +119,9 @@ class WhoisSensor(Entity):
|
|||||||
attrs = {}
|
attrs = {}
|
||||||
|
|
||||||
expiration_date = response["expiration_date"]
|
expiration_date = response["expiration_date"]
|
||||||
|
if isinstance(expiration_date, list):
|
||||||
|
attrs[ATTR_EXPIRES] = expiration_date[0].isoformat()
|
||||||
|
else:
|
||||||
attrs[ATTR_EXPIRES] = expiration_date.isoformat()
|
attrs[ATTR_EXPIRES] = expiration_date.isoformat()
|
||||||
|
|
||||||
if "nameservers" in response:
|
if "nameservers" in response:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user