added support for home assistant postgres database and convenience function to get state of entity

This commit is contained in:
Brian Bjarke Jensen
2026-01-24 19:48:13 +01:00
parent aaa724164c
commit d59f7d2e2d
20 changed files with 504 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
"""SQLAlchemy model for the 'state_attributes' table in the Home Assistant PostgreSQL database."""
from sqlalchemy import Column, BigInteger, Text
from .base import Base
class StateAttributes(Base):
"""SQLAlchemy model for the 'state_attributes' table."""
__tablename__ = "state_attributes"
__table_args__ = {"schema": "public"}
attributes_id = Column(BigInteger, primary_key=True, autoincrement=True)
hash = Column(BigInteger, nullable=True)
shared_attrs = Column(Text, nullable=True)