2021-06-17 21:54:14 +02:00
|
|
|
"""This helper module tracks commonly used types in the esphome python codebase."""
|
2024-02-21 03:53:50 +01:00
|
|
|
|
2022-10-05 09:09:27 +02:00
|
|
|
from typing import Union
|
2021-06-17 21:54:14 +02:00
|
|
|
|
2024-07-29 04:07:44 +02:00
|
|
|
from esphome.core import ID, EsphomeCore, Lambda
|
2021-06-17 21:54:14 +02:00
|
|
|
|
|
|
|
ConfigFragmentType = Union[
|
|
|
|
str,
|
|
|
|
int,
|
|
|
|
float,
|
|
|
|
None,
|
2022-10-05 09:09:27 +02:00
|
|
|
dict[Union[str, int], "ConfigFragmentType"],
|
|
|
|
list["ConfigFragmentType"],
|
2021-06-17 21:54:14 +02:00
|
|
|
ID,
|
|
|
|
Lambda,
|
|
|
|
]
|
2022-10-05 09:09:27 +02:00
|
|
|
ConfigType = dict[str, ConfigFragmentType]
|
2021-06-17 21:54:14 +02:00
|
|
|
CoreType = EsphomeCore
|
|
|
|
ConfigPathType = Union[str, int]
|