Code Monkey home page Code Monkey logo

Comments (5)

bernikr avatar bernikr commented on July 3, 2024 1

I have the same problem. Also the fetch_all_sensor_data function returns None for every sensor in the last_updated field. I think both of these errors come from a recent change in database schema. last_updated for example was replaced by last_updated_ts.

from hass-data-detective.

robmarkcole avatar robmarkcole commented on July 3, 2024

Hmm to debug need to understand what is wrong with the data you are trying to access. You can see the queries being run in https://github.com/robmarkcole/HASS-data-detective/blob/master/detective/core.py so try and debug where this error is coming from

from hass-data-detective.

quito96 avatar quito96 commented on July 3, 2024

Hi, I started the core.py in jupyter lab (right?) and get this:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
Cell In [1], line 10
      7 import pandas as pd
      8 from sqlalchemy import create_engine, text
---> 10 from . import config, functions
     13 def db_from_hass_config(path=None, **kwargs):
     14     """Initialize a database from HASS config."""

ImportError: attempted relative import with no known parent package

from hass-data-detective.

jaeti01 avatar jaeti01 commented on July 3, 2024

I am having the exact same issue.
Did anyone get this solved? Thanks!

from hass-data-detective.

ZZDDD avatar ZZDDD commented on July 3, 2024

I have the same problem. Also the fetch_all_sensor_data function returns None for every sensor in the last_updated field. I think both of these errors come from a recent change in database schema. last_updated for example was replaced by last_updated_ts.
@bernikr

Wow, thanks! I just substituted all the occurrences of last_updated into last_updated_ts in all code and reinstalled the detective and it worked! Now, Instead of getting None for the the field you get timestamp numbers.
Conversion can be easily done by:
df['last_updated_ts'] = pd.to_datetime(df['last_updated_ts'], unit='s')

from hass-data-detective.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.