robmarkcole / HASS-data-detective

Explore and analyse your Home Assistant data
https://data.home-assistant.io/
MIT License
183 stars 34 forks source link

Problem with View States section in Getting Started : 'HassDatabase' object has no attribute 'fetch_all_data' #137

Closed dmshimself closed 3 years ago

dmshimself commented 3 years ago

I have a problem using the Home Assistant addon referred to here: https://github.com/hassio-addons/addon-jupyterlab/issues/241 which I was asked to report here.

When the home-assistant/GETTING_STARTED notebook is run, the first sections run fine, but the section:

db.fetch_all_data()

returns an error:

AttributeError Traceback (most recent call last) in AttributeError: 'HassDatabase' object has no attribute 'fetch_all_data'

robmarkcole commented 3 years ago

Can you fix the link to the issue?

It should be calling fetch_all_sensor_data

dmshimself commented 3 years ago

Whoops:

https://github.com/hassio-addons/addon-jupyterlab/issues/241

I manually changed the fetch_all_data to fetch_all_sensor_data and that part went through very nicely. Many thanks Rob.

Would you have any comments on the next section which produces an assertion error?

assert 'binary_sensor' and 'sensor' in db.domains

AttributeError Traceback (most recent call last)

in ----> 1 assert 'binary_sensor' and 'sensor' in db.domains AttributeError: 'HassDatabase' object has no attribute 'domains'
robmarkcole commented 3 years ago

My guess is you have updated the detective dependency, but are still using a version of the getting started notebook from and old verison of detective. Please use Getting started with detective.ipynb from this repo

dmshimself commented 3 years ago

Thanks Rob - I'll pass that on to the developer of the Home Assistant Add on.

robmarkcole commented 3 years ago

Created https://github.com/home-assistant/home-assistant-notebooks/issues/20

robmarkcole commented 3 years ago

PR merged, closing