added support for home assistant postgres database and convenience function to get state of entity
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
"""Definition of dataframes."""
|
||||
|
||||
from .sensor_state import SensorStateSchema
|
||||
|
||||
__all__ = [
|
||||
"SensorStateSchema",
|
||||
]
|
||||
@@ -0,0 +1,12 @@
|
||||
"""Definition of SensorStateSchema dataframe schema."""
|
||||
|
||||
from typing import Optional
|
||||
import pandera.pandas as pa
|
||||
import pandas as pd
|
||||
|
||||
|
||||
class SensorStateSchema(pa.DataFrameModel):
|
||||
"""Schema for sensor state dataframe."""
|
||||
|
||||
time: pd.DatetimeTZDtype = pa.Field(dtype_kwargs={"tz": "UTC"})
|
||||
state: Optional[str]
|
||||
Reference in New Issue
Block a user