diff --git a/platypush/common/sensors.py b/platypush/common/sensors.py new file mode 100644 index 00000000..f04ca5a2 --- /dev/null +++ b/platypush/common/sensors.py @@ -0,0 +1,11 @@ +from typing import Iterable, Mapping, Union + +Numeric = Union[float, int] +SensorDataType = Union[Numeric, Mapping[str, Numeric], Iterable[Numeric]] +""" +Numeric sensor data published by integrations can be either of: + + - ``int``/``float`` + - Mapping of ``str -> int/float`` + - List of ``int``/``float`` +"""