Skip to content

Commit

Permalink
Version 2024.11.0 (#140)
Browse files Browse the repository at this point in the history
* Version 2024.11.0.dev_a:
integrate several kinds of heatpumps

* Version 2024.11.0:
Fixed a db-error when getting Tibber-data with the default sqlite-db
  • Loading branch information
corneel27 authored Nov 1, 2024
1 parent 16cb3c5 commit 72fc865
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 2 additions & 0 deletions dao/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Changelog 刀 DAO
# Day Ahead Optimizer
## [V2024.11.0]
- Fixed a db-error when getting Tibber-data with the default sqlite-db

## [V2024.10.6]
- Fixed a few errors in the graphics for users with more than one battery
Expand Down
2 changes: 1 addition & 1 deletion dao/config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: 刀 Day Ahead Optimizer
version: "2024.10.6"
version: "2024.11.0"
slug: day_ahead_opt
description: Docker used by Home Assistant Community Add-ons for day ahead optimizations
url: https://github.com/corneel27/day-ahead/
Expand Down
13 changes: 9 additions & 4 deletions dao/prog/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,18 @@ def generate_hourly_timestamps(start_gen: float, end_gen: float) -> list:
url = config.get(["api url"], tibber_options, "https://api.tibber.com/v1-beta/gql")
db_da_engine = config.get(['database da', "engine"], None, "mysql")
db_da_server = config.get(['database da', "server"], None, "core-mariadb")
db_da_port = int(config.get(['database da', "port"], None, 3306))
db_da_name = config.get(['database da', "database"], None, "day_ahead")
db_da_port = int(config.get(['database da', "port"], None, 0))
if db_da_engine == "sqlite":
db_da_name = config.get(['database da', "database"], None, "day_ahead.db")
else:
db_da_name = config.get(['database da', "database"], None, "day_ahead")
db_da_user = config.get(['database da', "username"], None, "day_ahead")
db_da_password = config.get(['database da', "password"])
db_da_path = config.get(['database da', "db_path"], None, "../data")
db_time_zone = config.get(["time_zone"])
db_da = DBmanagerObj(db_dialect=db_da_engine, db_name=db_da_name, db_server=db_da_server, db_port=db_da_port,
db_user=db_da_user, db_password=db_da_password, db_time_zone=db_time_zone)
db_da = DBmanagerObj(db_dialect=db_da_engine, db_name=db_da_name, db_server=db_da_server,
db_port=db_da_port, db_user=db_da_user, db_password=db_da_password,
db_path=db_da_path, db_time_zone=db_time_zone)
prices_options = config.get(["prices"])
headers = {
"Authorization": "Bearer " + tibber_options["api_token"],
Expand Down

0 comments on commit 72fc865

Please sign in to comment.