Skip to content

Commit c1b575b

Browse files
committed
Feat - New version v.0.5.4
1 parent 63b3772 commit c1b575b

File tree

8 files changed

+62
-52
lines changed

8 files changed

+62
-52
lines changed

.devcontainer/devcontainer.json

Lines changed: 22 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,24 @@
11
{
2-
"name": "Add-on",
3-
"image": "ghcr.io/home-assistant/devcontainer:addons",
4-
"appPort": [
5-
"7123:8123",
6-
"7357:4357"
7-
],
8-
"postStartCommand": "bash devcontainer_bootstrap",
9-
"runArgs": [
10-
"-e",
11-
"GIT_EDITOR=code --wait",
12-
"--privileged"
13-
],
14-
"remoteUser":"root",
15-
"containerEnv": {
16-
"WORKSPACE_DIRECTORY": "${containerWorkspaceFolder}"
17-
},
18-
"customizations": {
19-
"vscode": {
20-
"extensions": [
21-
"timonwong.shellcheck",
22-
"esbenp.prettier-vscode"
23-
],
24-
"settings": {
25-
"terminal.integrated.profiles.linux": {
26-
"zsh": {
27-
"path": "/usr/bin/zsh"
28-
}
29-
},
30-
"terminal.integrated.defaultProfile.linux": "zsh"
31-
}
32-
}
33-
},
34-
"mounts": [
35-
"type=volume,target=/var/lib/docker"
36-
]
2+
"name": "Example devcontainer for add-on repositories",
3+
"image": "ghcr.io/home-assistant/devcontainer:addons",
4+
"appPort": ["7123:8123", "7357:4357"],
5+
"postStartCommand": "bash devcontainer_bootstrap",
6+
"runArgs": ["-e", "GIT_EDITOR=code --wait", "--privileged"],
7+
"containerEnv": {
8+
"WORKSPACE_DIRECTORY": "${containerWorkspaceFolder}"
9+
},
10+
"extensions": ["timonwong.shellcheck", "esbenp.prettier-vscode"],
11+
"mounts": [ "type=volume,target=/var/lib/docker" ],
12+
"settings": {
13+
"terminal.integrated.profiles.linux": {
14+
"zsh": {
15+
"path": "/usr/bin/zsh"
16+
}
17+
},
18+
"terminal.integrated.defaultProfile.linux": "zsh",
19+
"editor.formatOnPaste": false,
20+
"editor.formatOnSave": true,
21+
"editor.formatOnType": true,
22+
"files.trimTrailingWhitespace": true
23+
}
3724
}

.vscode/tasks.json

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
{
22
"version": "2.0.0",
33
"tasks": [
4-
{
5-
"label": "Start Home Assistant",
6-
"type": "shell",
7-
"command": "supervisor_run",
8-
"group": {
9-
"kind": "test",
10-
"isDefault": true
11-
},
12-
"presentation": {
13-
"reveal": "always",
14-
"panel": "new"
15-
},
16-
"problemMatcher": []
17-
}
4+
{
5+
"label": "Start Home Assistant",
6+
"type": "shell",
7+
"command": "supervisor_run",
8+
"group": {
9+
"kind": "test",
10+
"isDefault": true
11+
},
12+
"presentation": {
13+
"reveal": "always",
14+
"panel": "new"
15+
},
16+
"problemMatcher": []
17+
}
1818
]
19-
}
19+
}
20+

emhass/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## [0.5.4] - 2023-12-19
4+
Following update of EMHASS code v0.6.2
5+
### Improvement
6+
- Added option to pass additional weight for battery usage
7+
- Improved coverage
8+
### Fix
9+
- Updated optimization constraints to solve conflict for `set_def_constant` and `treat_def_as_semi_cont` cases
10+
311
## [0.5.3] - 2023-12-19
412
### Fix
513
- Stepping down to Python 3.9 for ARMHF architectures.

emhass/DOCS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ These are the configuration parameters needed to correctly use this module.
5454
- set_battery_dynamic: Set a power dynamic limiting condition to the battery power. This is an additional constraint on the battery dynamic in power per unit of time.
5555
- battery_dynamic_max: The maximum positive battery power dynamic. This is the power variation in percentage of battery maximum power.
5656
- battery_dynamic_min: The minimum negative battery power dynamic. This is the power variation in percentage of battery maximum power.
57+
- weight_battery_discharge: An additional weight applied in cost function to battery usage for discharge.
58+
- weight_battery_charge: An additional weight applied in cost function to battery usage for charge.
5759
- load_forecast_method: The load forecast method. This defaults to 'naive'. The available options are 'csv', 'list' or 'mlforecaster' to use the machine learning forecaster.
5860
- sensor_power_photovoltaics: This is the name of the photovoltaic produced power sensor in Watts from Home Assistant. For example: 'sensor.power_photovoltaics'.
5961
- sensor_power_load_no_var_loads: The name of the household power consumption sensor in Watts from Home Assistant. The deferrable loads that we will want to include in the optimization problem should be substracted from this sensor in HASS. For example: 'sensor.power_load_no_var_loads'

emhass/config.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: EMHASS
22
description: Energy Management for Home Assistant
33
url: https://github.com/davidusb-geek/emhass
4-
version: 0.5.3
4+
version: 0.5.4
55
slug: emhass
66
arch:
77
- aarch64
@@ -39,6 +39,8 @@ options:
3939
set_battery_dynamic: false
4040
battery_dynamic_max: 0.9
4141
battery_dynamic_min: -0.9
42+
weight_battery_discharge: 1.0
43+
weight_battery_charge: 1.0
4244
load_forecast_method: "naive"
4345
sensor_power_photovoltaics: sensor.power_photovoltaics
4446
sensor_power_load_no_var_loads: sensor.power_load_no_var_loads
@@ -99,6 +101,8 @@ schema:
99101
set_battery_dynamic: bool
100102
battery_dynamic_max: float(0.0,1.0)
101103
battery_dynamic_min: float
104+
weight_battery_discharge: float
105+
weight_battery_charge: float
102106
load_forecast_method: str
103107
sensor_power_photovoltaics: str
104108
sensor_power_load_no_var_loads: str

emhass/config_emhass.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ optim_conf:
5252
- set_battery_dynamic: False # add a constraint to limit the dynamic of the battery power in power per time unit
5353
- battery_dynamic_max: 0.9 # maximum dynamic positive power variation in percentage of battery maximum power
5454
- battery_dynamic_min: -0.9 # minimum dynamic negative power variation in percentage of battery maximum power
55+
- weight_battery_discharge: 1.0 # weight applied in cost function to battery usage for discharge
56+
- weight_battery_charge: 1.0 # weight applied in cost function to battery usage for charge
5557

5658
plant_conf:
5759
- P_grid_max: 9000 # The maximum power that can be supplied by the utility grid in Watts

emhass/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ skforecast==0.11.0
1414
flask>=2.0.3
1515
waitress>=2.1.1
1616
plotly>=5.6.0
17-
emhass==0.6.1
17+
emhass==0.6.2
1818
#git+https://github.com/davidusb-geek/emhass

emhass/translations/en.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ configuration:
4444
battery_dynamic_min:
4545
name: The minimum negative battery power dynamic
4646
description: This is the power variation in percentage of battery maximum power.
47+
weight_battery_discharge:
48+
name: A weight to the cost function for battery discharge
49+
description: This is an additional weight applied in cost function to battery usage for discharge.
50+
weight_battery_charge:
51+
name: A weight to the cost function for battery charge
52+
description: This is an additional weight applied in cost function to battery usage for charge.
4753
load_forecast_method:
4854
name: The load forecast method
4955
description: This defaults to 'naive'. The available options are 'csv', 'list' or 'mlforecaster' to use the machine learning forecaster.

0 commit comments

Comments
 (0)