Use PEP 695 for simple type aliases (#117633)
This commit is contained in:
parent
4edee94a81
commit
87bb7ced79
78 changed files with 139 additions and 140 deletions
|
@ -19,7 +19,7 @@ CONF_TOPIC_IN_PREFIX: Final = "topic_in_prefix"
|
|||
CONF_TOPIC_OUT_PREFIX: Final = "topic_out_prefix"
|
||||
CONF_VERSION: Final = "version"
|
||||
CONF_GATEWAY_TYPE: Final = "gateway_type"
|
||||
ConfGatewayType = Literal["Serial", "TCP", "MQTT"]
|
||||
type ConfGatewayType = Literal["Serial", "TCP", "MQTT"]
|
||||
CONF_GATEWAY_TYPE_SERIAL: ConfGatewayType = "Serial"
|
||||
CONF_GATEWAY_TYPE_TCP: ConfGatewayType = "TCP"
|
||||
CONF_GATEWAY_TYPE_MQTT: ConfGatewayType = "MQTT"
|
||||
|
@ -55,16 +55,16 @@ class NodeDiscoveryInfo(TypedDict):
|
|||
|
||||
SERVICE_SEND_IR_CODE: Final = "send_ir_code"
|
||||
|
||||
SensorType = str
|
||||
type SensorType = str
|
||||
# S_DOOR, S_MOTION, S_SMOKE, ...
|
||||
|
||||
ValueType = str
|
||||
type ValueType = str
|
||||
# V_TRIPPED, V_ARMED, V_STATUS, V_PERCENTAGE, ...
|
||||
|
||||
GatewayId = str
|
||||
type GatewayId = str
|
||||
# a unique id generated by config_flow.py and stored in the ConfigEntry as the entry id.
|
||||
|
||||
DevId = tuple[GatewayId, int, int, int]
|
||||
type DevId = tuple[GatewayId, int, int, int]
|
||||
# describes the backend of a hass entity.
|
||||
# Contents are: GatewayId, node_id, child_id, v_type as int
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue