esphome/esphome/types.py
2022-10-05 20:09:27 +13:00

19 lines
429 B
Python

"""This helper module tracks commonly used types in the esphome python codebase."""
from typing import Union
from esphome.core import ID, Lambda, EsphomeCore
ConfigFragmentType = Union[
str,
int,
float,
None,
dict[Union[str, int], "ConfigFragmentType"],
list["ConfigFragmentType"],
ID,
Lambda,
]
ConfigType = dict[str, ConfigFragmentType]
CoreType = EsphomeCore
ConfigPathType = Union[str, int]