Skip to content

Commit

Permalink
Merge pull request #182 from mxr/platofrm
Browse files Browse the repository at this point in the history
Use `Platform.CLIMATE` / `Platform.SENSOR` instead of 'domain' constants
  • Loading branch information
dlarrick authored Dec 27, 2024
2 parents ed9dcd6 + 4b9053e commit 05e04bb
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions custom_components/kumo/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
from datetime import timedelta
from typing import Final

from homeassistant.components.climate import DOMAIN as CLIMATE_DOMAIN
from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN
from homeassistant.const import Platform

DEFAULT_NAME = "Kumo"
DOMAIN = "kumo"
Expand All @@ -16,10 +15,6 @@
CONF_RESPONSE_TIMEOUT = "response_timeout"
MAX_AVAILABILITY_TRIES = 3 # How many times we will attempt to update from a kumo before marking it unavailable

PLATFORMS: Final = [CLIMATE_DOMAIN, SENSOR_DOMAIN]

# This is the new way of important platforms, but isn't public yet
# from homeassistant.const import Platform
# PLATFORMS: Final = [Platform.CLIMATE, Platform.SENSOR]
PLATFORMS: Final = [Platform.CLIMATE, Platform.SENSOR]

SCAN_INTERVAL = timedelta(seconds=60)

0 comments on commit 05e04bb

Please sign in to comment.