Add data update coordinator to Whois (#64846)

Co-authored-by: Joakim Sørensen <joasoe@gmail.com>
This commit is contained in:
Franck Nijhof 2022-01-24 18:50:07 +01:00 committed by GitHub
parent b07f4ba398
commit d15d081646
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 80 additions and 57 deletions

View file

@ -1,6 +1,7 @@
"""Constants for the Whois integration."""
from __future__ import annotations
from datetime import timedelta
import logging
from typing import Final
@ -11,6 +12,8 @@ PLATFORMS = [Platform.SENSOR]
LOGGER = logging.getLogger(__package__)
SCAN_INTERVAL = timedelta(hours=24)
DEFAULT_NAME = "Whois"
ATTR_EXPIRES = "expires"