home-assistant core 源码粗读--对设备历史的处理(三)

我们已经知道User 等保存是直接以json的形式直接保存到文件中。

先说结论:设备的检测历史默认保存在sqlite中

The default, and recommended, database engine is SQLite which does not require any configuration. The database is stored in your Home Assistant configuration directory (’/config/’) and is named home-assistant_v2.db.

https://www.home-assistant.io/integrations/history/

https://www.home-assistant.io/integrations/recorder/

与历史相关的文件: homeassistant/components/filter # 在dashboard中显示历史曲线的上层逻辑。(可以通过line-chart 等关键词定位到这个文件)

 

posted @ 2024-02-21 16:51  xunhanliu  阅读(14)  评论(0编辑  收藏  举报