Skip to content

Access to history database #268

Open
@simeneide

Description

@simeneide

Hi,
I am wondering what the best practice would be to access the history that is stored in the home assistant database? I see multiple solutions:

  1. install a sql driver and query directly
  2. use the HA api (encountered an issue when creating here client here inside pyscript, see error below)
  3. some native way of doing it in pyscript?

Anyone has any good solutions here?

Error on using api:

RuntimeError: I/O must be done in the executor; Use `await hass.async_add_executor_job()` at custom_components/pyscript/eval.py, line 1899: return func(*args, **kwargs)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions