Franck Nijhof fa0d653216
Update python-homewizard-energy to 1.5.0 (#85966)
* Update python-homewizard-energy to 1.5.0

* Remove strict typing for now

* Revert "Remove strict typing for now"

This reverts commit ebcd327fdf3e10abcaabd6cd86a0bfc101b32fb1.

* Adjust typing to resolve upstream changes
2023-01-16 09:23:03 +01:00

35 lines
801 B
Python

"""Constants for the Homewizard integration."""
from __future__ import annotations
from dataclasses import dataclass
from datetime import timedelta
# Set up.
from homewizard_energy.models import Data, Device, State, System
from homeassistant.const import Platform
DOMAIN = "homewizard"
PLATFORMS = [Platform.BUTTON, Platform.NUMBER, Platform.SENSOR, Platform.SWITCH]
# Platform config.
CONF_API_ENABLED = "api_enabled"
CONF_DATA = "data"
CONF_DEVICE = "device"
CONF_PATH = "path"
CONF_PRODUCT_NAME = "product_name"
CONF_PRODUCT_TYPE = "product_type"
CONF_SERIAL = "serial"
UPDATE_INTERVAL = timedelta(seconds=5)
@dataclass
class DeviceResponseEntry:
"""Dict describing a single response entry."""
device: Device
data: Data
state: State | None
system: System | None = None