Skip to content

Commit cc6b0f7

Browse files
committed
chore: improve Home Assistant adapter
Add documentation for home assistant adapter. Make adapter correctly set the measurement keys for PV production. Add adapter configuration for grid import and export measurements. Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
1 parent 0cfed67 commit cc6b0f7

10 files changed

Lines changed: 367 additions & 80 deletions

File tree

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ DOCKER_COMPOSE_DATA_DIR=${HOME}/.local/share/net.akkudoktor.eos
1111
# -----------------------------------------------------------------------------
1212
# Image / build
1313
# -----------------------------------------------------------------------------
14-
VERSION=0.2.0.dev81236039
14+
VERSION=0.2.0.dev40329975
1515
PYTHON_VERSION=3.13.9
1616

1717
# -----------------------------------------------------------------------------

config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# the root directory (no add-on folder as usual).
77

88
name: "Akkudoktor-EOS"
9-
version: "0.2.0.dev81236039"
9+
version: "0.2.0.dev40329975"
1010
slug: "eos"
1111
description: "Akkudoktor-EOS add-on"
1212
url: "https://github.com/Akkudoktor-EOS/EOS"

docs/_generated/configadapter.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
"homeassistant": {
2929
"config_entity_ids": null,
3030
"load_emr_entity_ids": null,
31+
"grid_export_emr_entity_ids": null,
32+
"grid_import_emr_entity_ids": null,
3133
"pv_production_emr_entity_ids": null,
3234
"device_measurement_entity_ids": null,
3335
"device_instruction_entity_ids": null,
@@ -59,6 +61,8 @@
5961
"homeassistant": {
6062
"config_entity_ids": null,
6163
"load_emr_entity_ids": null,
64+
"grid_export_emr_entity_ids": null,
65+
"grid_import_emr_entity_ids": null,
6266
"pv_production_emr_entity_ids": null,
6367
"device_measurement_entity_ids": null,
6468
"device_instruction_entity_ids": null,
@@ -142,9 +146,11 @@ E.g. The instruction for device id 'battery1' becomes the entity_id 'sensor.eos_
142146
| device_measurement_entity_ids | `Optional[dict[str, str]]` | `rw` | `None` | Mapping of EOS measurement keys used by device (resource) simulations to Home Assistant entity IDs. |
143147
| eos_device_instruction_entity_ids | `list[str]` | `ro` | `N/A` | Entity IDs for energy management instructions available at EOS. |
144148
| eos_solution_entity_ids | `list[str]` | `ro` | `N/A` | Entity IDs for optimization solution available at EOS. |
149+
| grid_export_emr_entity_ids | `Optional[list[str]]` | `rw` | `None` | Entity ID(s) of export to grid energy meter readings [kWh] |
150+
| grid_import_emr_entity_ids | `Optional[list[str]]` | `rw` | `None` | Entity ID(s) of import from grid energy meter readings [kWh] |
145151
| homeassistant_entity_ids | `list[str]` | `ro` | `N/A` | Entity IDs available at Home Assistant. |
146-
| load_emr_entity_ids | `Optional[list[str]]` | `rw` | `None` | Entity ID(s) of load energy meter reading [kWh] |
147-
| pv_production_emr_entity_ids | `Optional[list[str]]` | `rw` | `None` | Entity ID(s) of PV production energy meter reading [kWh] |
152+
| load_emr_entity_ids | `Optional[list[str]]` | `rw` | `None` | Entity ID(s) of load energy meter readings [kWh] |
153+
| pv_production_emr_entity_ids | `Optional[list[str]]` | `rw` | `None` | Entity ID(s) of PV production energy meter readings [kWh] |
148154
| solution_entity_ids | `Optional[list[str]]` | `rw` | `None` | Entity IDs for optimization solution keys to be updated by EOS.
149155
The solution keys have to be prepended by 'sensor.eos_' to build the entity_id.
150156
E.g. solution key 'battery1_idle_op_mode' becomes the entity_id 'sensor.eos_battery1_idle_op_mode'. |
@@ -166,6 +172,12 @@ E.g. solution key 'battery1_idle_op_mode' becomes the entity_id 'sensor.eos_batt
166172
"load_emr_entity_ids": [
167173
"sensor.load_energy_total_kwh"
168174
],
175+
"grid_export_emr_entity_ids": [
176+
"sensor.grid_export_energy_total_kwh"
177+
],
178+
"grid_import_emr_entity_ids": [
179+
"sensor.grid_import_energy_total_kwh"
180+
],
169181
"pv_production_emr_entity_ids": [
170182
"sensor.pv_energy_total_kwh"
171183
],
@@ -200,6 +212,12 @@ E.g. solution key 'battery1_idle_op_mode' becomes the entity_id 'sensor.eos_batt
200212
"load_emr_entity_ids": [
201213
"sensor.load_energy_total_kwh"
202214
],
215+
"grid_export_emr_entity_ids": [
216+
"sensor.grid_export_energy_total_kwh"
217+
],
218+
"grid_import_emr_entity_ids": [
219+
"sensor.grid_import_energy_total_kwh"
220+
],
203221
"pv_production_emr_entity_ids": [
204222
"sensor.pv_energy_total_kwh"
205223
],

docs/_generated/configexample.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
"homeassistant": {
1111
"config_entity_ids": null,
1212
"load_emr_entity_ids": null,
13+
"grid_export_emr_entity_ids": null,
14+
"grid_import_emr_entity_ids": null,
1315
"pv_production_emr_entity_ids": null,
1416
"device_measurement_entity_ids": null,
1517
"device_instruction_entity_ids": null,
@@ -136,7 +138,7 @@
136138
}
137139
},
138140
"general": {
139-
"version": "0.2.0.dev81236039",
141+
"version": "0.2.0.dev40329975",
140142
"data_folder_path": null,
141143
"data_output_subpath": "output",
142144
"latitude": 52.52,

docs/_generated/configgeneral.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
| latitude | `EOS_GENERAL__LATITUDE` | `Optional[float]` | `rw` | `52.52` | Latitude in decimal degrees between -90 and 90. North is positive (ISO 19115) (°) |
1717
| longitude | `EOS_GENERAL__LONGITUDE` | `Optional[float]` | `rw` | `13.405` | Longitude in decimal degrees within -180 to 180 (°) |
1818
| timezone | | `Optional[str]` | `ro` | `N/A` | Computed timezone based on latitude and longitude. |
19-
| version | `EOS_GENERAL__VERSION` | `str` | `rw` | `0.2.0.dev81236039` | Configuration file version. Used to check compatibility. |
19+
| version | `EOS_GENERAL__VERSION` | `str` | `rw` | `0.2.0.dev40329975` | Configuration file version. Used to check compatibility. |
2020
:::
2121
<!-- pyml enable line-length -->
2222

@@ -28,7 +28,7 @@
2828
```json
2929
{
3030
"general": {
31-
"version": "0.2.0.dev81236039",
31+
"version": "0.2.0.dev40329975",
3232
"data_folder_path": null,
3333
"data_output_subpath": "output",
3434
"latitude": 52.52,
@@ -46,7 +46,7 @@
4646
```json
4747
{
4848
"general": {
49-
"version": "0.2.0.dev81236039",
49+
"version": "0.2.0.dev40329975",
5050
"data_folder_path": null,
5151
"data_output_subpath": "output",
5252
"latitude": 52.52,

docs/_generated/openapi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Akkudoktor-EOS
22

3-
**Version**: `v0.2.0.dev81236039`
3+
**Version**: `v0.2.0.dev40329975`
44

55
<!-- pyml disable line-length -->
66
**Description**: This project provides a comprehensive solution for simulating and optimizing an energy system based on renewable energy sources. With a focus on photovoltaic (PV) systems, battery storage (batteries), load management (consumer requirements), heat pumps, electric vehicles, and consideration of electricity price data, this system enables forecasting and optimization of energy flow and costs over a specified period.

0 commit comments

Comments
 (0)