Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 983 Bytes

README.md

File metadata and controls

32 lines (23 loc) · 983 Bytes

Home Assistant - SQLite - Testing

Test repo for SQLite and Home Assistant

TODO List:

  • Upload test database from:

  • Create a Python program to read database

  • Get latest temperature from Home Assistant SQLite DB

  • We need to find a way to ignore following states:

    - unavailable

    - unknown

  • Get the data from statistics table to get the mean value

  • Append the values to a list

  • Calculate the average temperature for the last n = 7 x 24 measurements

  • Write new data to

    • The database
    • A sensor in Home Assistant

Home Assistant stuff:

  • Get snapshot of HA database

  • We get this data from the database statistics_meta table

    • metadata_id: 71 for Outside temperature
  • Based on that, we can find the temperature values from statistics table

    • metadata_id: 71
    • mean: mean_temperature, FLOAT