forked from platypush/platypush
Added common.sensors
package.
The package contains the base types and constants shared across sensor-based integrations.
This commit is contained in:
parent
42d468c895
commit
6a3ade3304
1 changed files with 11 additions and 0 deletions
11
platypush/common/sensors.py
Normal file
11
platypush/common/sensors.py
Normal file
|
@ -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``
|
||||
"""
|
Loading…
Reference in a new issue