Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation instructions #13

Open
rien opened this issue Jul 26, 2024 · 1 comment
Open

Installation instructions #13

rien opened this issue Jul 26, 2024 · 1 comment

Comments

@rien
Copy link

rien commented Jul 26, 2024

Hi, I have just set up my Home Assistant and we're using Brunata Online to track water usage and heating.

I've tried to enable this integration by linking the https://github.com/YukiElectronics/ha-brunata/tree/main/custom_components/brunata_online folder in my <config>/custom_components folder, HASS does not seem to pick it up correctly:

2024-07-26 16:52:33.264 WARNING (MainThread) [homeassistant.helpers.translation] Failed to load integration for translation: Integration 'brunata_online' not found.
2024-07-26 16:52:34.164 ERROR (MainThread) [homeassistant.setup] Setup failed for 'brunata_online': Integration not found.

Can you provide installation instructions how to test this integration? Thanks!

@YukiElectronics-YT
Copy link
Contributor

YukiElectronics-YT commented Jul 30, 2024

Good afternoon,

So far, only the API portion is in a functional state, as I haven't quite learned the ins and outs of HA Integration development (still struggling a bit with async/await, hence the use of requests instead of aiohttp)

If you'd like to test the API portion, you could do the following:

  1. Clone the repository and open it in your terminal of choice
  2. cd ./custom_components/brunata_online
  3. Replace from .const import ( with from const import ( in api.py:13
  4. python3 -i ./api.py
  5. Create an instance of BrunataOnlineApiClient with your username and password, let's call it CLIENT for now
  6. Call CLIENT.get_meters(), then CLIENT.get_consumption(ConsumptionType.WATER, Interval.DAY)
    This should store your daily water consumption for the current month in CLIENT._water
  7. Finally, you can run import json and json.dumps(CLIENT._water, indent=2)
    This should print out your water consumption in the Python REPL.

Sadly, I haven't had much time recently, so the development is progressing slower than I would've liked... If you have any experience in writing integrations or Python tests, I'm more than open to reviewing pull requests 🙂

In any case, I'll keep this issue open so I can add comments as functionality improves. I'll also tag the first commit in which the integration works as a release build; that way, even if I forget to comment here, you'll know it's ready to be installed in Home Assistant then 😅

Kind regards,
Yuki

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants