mirror of
https://github.com/home-assistant/core.git
synced 2026-05-29 19:57:40 +01:00
d766aae436
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: frenck <195327+frenck@users.noreply.github.com>
40 lines
701 B
Python
40 lines
701 B
Python
"""Support for Automation Device Specification (ADS)."""
|
|
|
|
from enum import StrEnum
|
|
from typing import TYPE_CHECKING
|
|
|
|
from homeassistant.util.hass_dict import HassKey
|
|
|
|
if TYPE_CHECKING:
|
|
from .hub import AdsHub
|
|
|
|
DOMAIN = "ads"
|
|
|
|
DATA_ADS: HassKey[AdsHub] = HassKey(DOMAIN)
|
|
|
|
CONF_ADS_VAR = "adsvar"
|
|
|
|
STATE_KEY_STATE = "state"
|
|
|
|
|
|
class AdsType(StrEnum):
|
|
"""Supported Types."""
|
|
|
|
BOOL = "bool"
|
|
BYTE = "byte"
|
|
INT = "int"
|
|
UINT = "uint"
|
|
SINT = "sint"
|
|
USINT = "usint"
|
|
DINT = "dint"
|
|
UDINT = "udint"
|
|
WORD = "word"
|
|
DWORD = "dword"
|
|
LREAL = "lreal"
|
|
REAL = "real"
|
|
STRING = "string"
|
|
TIME = "time"
|
|
DATE = "date"
|
|
DATE_AND_TIME = "dt"
|
|
TOD = "tod"
|