Home Assistant Unofficial Reference 2024.12.1
const.py
Go to the documentation of this file.
1 """Support for Automation Device Specification (ADS)."""
2 
3 from __future__ import annotations
4 
5 from enum import StrEnum
6 from typing import TYPE_CHECKING
7 
8 from homeassistant.util.hass_dict import HassKey
9 
10 if TYPE_CHECKING:
11  from .hub import AdsHub
12 
13 DOMAIN = "ads"
14 
15 DATA_ADS: HassKey[AdsHub] = HassKey(DOMAIN)
16 
17 CONF_ADS_VAR = "adsvar"
18 
19 STATE_KEY_STATE = "state"
20 
21 
22 class AdsType(StrEnum):
23  """Supported Types."""
24 
25  BOOL = "bool"
26  BYTE = "byte"
27  INT = "int"
28  UINT = "uint"
29  SINT = "sint"
30  USINT = "usint"
31  DINT = "dint"
32  UDINT = "udint"
33  WORD = "word"
34  DWORD = "dword"
35  LREAL = "lreal"
36  REAL = "real"
37  STRING = "string"
38  TIME = "time"
39  DATE = "date"
40  DATE_AND_TIME = "dt"
41  TOD = "tod"