esphome/esphome/types.py

20 lines
430 B
Python
Raw Normal View History

"""This helper module tracks commonly used types in the esphome python codebase."""
2022-10-05 09:09:27 +02:00
from typing import Union
from esphome.core import ID, EsphomeCore, Lambda
ConfigFragmentType = Union[
str,
int,
float,
None,
2022-10-05 09:09:27 +02:00
dict[Union[str, int], "ConfigFragmentType"],
list["ConfigFragmentType"],
ID,
Lambda,
]
2022-10-05 09:09:27 +02:00
ConfigType = dict[str, ConfigFragmentType]
CoreType = EsphomeCore
ConfigPathType = Union[str, int]