Skip to content

Commit f5858b8

Browse files
authored
Merge branch 'main' into main
2 parents f7a5acf + 7070c76 commit f5858b8

37 files changed

+1171
-329
lines changed

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuring-dependabot-version-updates
2+
3+
version: 2
4+
updates:
5+
- package-ecosystem: github-actions
6+
directory: "/
7+
schedule:
8+
interval: "weekly"
9+
- package-ecosystem: pip
10+
directory: "/"
11+
schedule:
12+
interval: "weekly"

.github/workflows/hassfest.yaml

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/workflows/hassfest.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Validate with hassfest
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 * * 0"
6+
workflow_dispatch:
7+
8+
jobs:
9+
hassfest:
10+
runs-on: ubuntu-latest
11+
name: Hassfest
12+
steps:
13+
- uses: "actions/checkout@v4"
14+
- uses: "home-assistant/actions/hassfest@master"

.github/workflows/linter.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# This workflow executes several linters
2+
# disable email notifications in your settings:
3+
# https://github.com/settings/notifications
4+
name: Linter
5+
6+
# Ruff and PyLint appear to be the most commonly used linters for home assistant.
7+
# consider applying to all branches on pre-commit to help people find issues sooner
8+
9+
on:
10+
push:
11+
branches:
12+
- "main"
13+
pull_request:
14+
workflow_dispatch:
15+
16+
jobs:
17+
# Ruff format is a comprehensive formatting
18+
run-ruff:
19+
name: Ruff
20+
runs-on: ubuntu-latest
21+
strategy:
22+
fail-fast: false # complete all jobs
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@v4
26+
- name: Ruff setup
27+
uses: astral-sh/ruff-action@v3
28+
with:
29+
args: "--version" # replace default "check" to do setup only.
30+
github-token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} # optional to reduce api calls
31+
- name: Ruff auto format
32+
run: ruff format # auto format
33+
- name: Ruff auto fix
34+
run: ruff check --fix-only # auto-fix
35+
- name: Commit changes # auto commit format changes.
36+
uses: stefanzweifel/git-auto-commit-action@v5
37+
with:
38+
commit_message: "chore: format code with ruff"
39+
- name: Ruff check # report remaining issues
40+
uses: astral-sh/ruff-action@v3
41+
42+
# This pylint configuration works but has too many issues to run repeatedly.
43+
# It should be run on-demand or scheduled until most issues are fixed.
44+
# run-pylint:
45+
# runs-on: ubuntu-latest
46+
# strategy:
47+
# fail-fast: false
48+
# steps:
49+
# - name: Checkout code
50+
# uses: actions/checkout@v4
51+
# - name: Install dependencies
52+
# run: |
53+
# python -m pip install --upgrade pip
54+
# python -m pip install pylint homeassistant luxtronik==0.3.14 requests>=2.28.2 getmac==0.8.2
55+
# if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
56+
# - name: pylint
57+
# run: |
58+
# pylint $(git ls-files '*.py')
59+
60+
# CodeSpell performs a spellcheck. English only.
61+
run-codespell:
62+
name: CodeSpell
63+
runs-on: ubuntu-latest
64+
strategy:
65+
fail-fast: false # complete all jobs
66+
steps:
67+
- name: Checkout code
68+
uses: actions/checkout@v4
69+
- name: CodeSpell
70+
uses: codespell-project/actions-codespell@v2
71+
with:
72+
skip: cs.json,de.json,nl.json,pl.json # skip these files
73+
ignore_words_list: hass # skip these words

.github/workflows/python-package.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
python-version: ["3.9", "3.10"]
19+
python-version: ["3.13"]
2020

2121
steps:
2222
- uses: actions/checkout@v3
@@ -27,8 +27,10 @@ jobs:
2727
- name: Install dependencies
2828
run: |
2929
python -m pip install --upgrade pip
30-
python -m pip install flake8 pytest
30+
python -m pip install flake8 pytest homeassistant luxtronik==0.3.14 requests>=2.28.2 getmac==0.8.2
3131
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
32+
- name: Set PYTHONPATH
33+
run: echo "PYTHONPATH=$PYTHONPATH:$(pwd)" >> $GITHUB_ENV
3234
- name: Lint with flake8
3335
run: |
3436
# stop the build if there are Python syntax errors or undefined names

.github/workflows/validate-hacs.yaml renamed to .github/workflows/validate-hacs.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
name: HACS Action
1+
name: HACS
22

33
on:
44
push:
5+
branches:
6+
- main
57
pull_request:
68
schedule:
79
- cron: "0 0 * * *"
@@ -11,7 +13,7 @@ jobs:
1113
validate-hacs:
1214
runs-on: "ubuntu-latest"
1315
steps:
14-
- uses: "actions/checkout@v3"
16+
- uses: "actions/checkout@v4"
1517
- name: HACS validation
1618
uses: "hacs/action@main"
1719
with:

README.md

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ If you like 🩷 this project, [sponsor it (click)](https://github.com/sponsors/
77
> :warning: **New Code-Base - PLEASE READ!** :warning:
88
* Backup your data before update (different config structure!). If you make a downgrade of this integration (<2023.9) restore your data backup (The entries for Luxtronik in ./storage/core.config_entries + core.device_registry + core.entity_registry should be enough.)! If not you get double entities!
99
* This release has no more language selection. The HA backend language is used.
10-
* Some entities which can not detected automaticly are hidden or disabled by default. In the devices you can find them and activate it. Please check this list before creating issues with entity whiches.
10+
* Some entities which can not detected automatically are hidden or disabled by default. In the devices you can find them and activate it. Please check this list before creating issues with entity whiches.
1111
* The RBE Room Temperature Sensor is currently not implemented.
1212
* The update sensor "rings" for new firmware versions, but the "Install"-Button has no function. The Firmware has to be installed manually. An the Install-Button is necessary to get notified.
1313
* In the integration configuration you can set a ha sensor id for the indoor temperature value.
@@ -49,8 +49,11 @@ This integration works locally. It's only necessary to connect the Luxtronik con
4949

5050
### 1.1 HACS (recommended)
5151

52-
Add the custom repo to HACS
52+
Add the custom repo to HACS:
5353

54+
[![Open your Home Assistant instance and show the add HACS repository dialog with a specific repository pre-filled.](https://my.home-assistant.io/badges/hacs_repository.svg)](https://my.home-assistant.io/redirect/hacs_repository/?owner=BenPru&repository=Luxtronik&category=integration)
55+
56+
Or:
5457
1. Go to 'HACS > Integration'
5558
2. Select 'Custom repositories' from the top right menu
5659
3. Under Repository, enter '<https://github.com/BenPru/luxtronik>'
@@ -104,31 +107,31 @@ Select Configure and review the settings.
104107
It's not always clear from the name alone what an entity exactly means and how it effects your heatpump. The main source of information is ofcourse the [Luxtronik Operating Manual](https://mw.ait-group.net/files/docs/EN/A0220/83055400.pdf).
105108

106109
Another great source is [FHEM - Luxtronik 2.0](https://wiki.fhem.de/wiki/Luxtronik_2.0). It's in German so use Google Translate.
107-
It contains details about the various parameters and how to use them to optimize your heatpump efficiency. Read carfully though. Make small incremental changes and monitor your progress in Home Assistant. You don't want to miss out on this information.
110+
It contains details about the various parameters and how to use them to optimize your heatpump efficiency. Read carefully though. Make small incremental changes and monitor your progress in Home Assistant. You don't want to miss out on this information.
108111

109112
### 3.1 Energy use
110113

111-
Not all heatpumps have build in electrical energy metering and instead only show the energy produced in heat, not the energy consumed in electricity. Adding a (strong) energy meter is a nice addition to measure the SCOP of your device. Shelly energy meters are recommended since they offer offer a [16A power plug](https://www.shelly.com/en-nl/products/product-overview/1xplug) and a [variety of in-line or clamp energy meters](https://www.shelly.com/en-nl/products/energy-metering-energy-efficiency) with various protection mechanisms.
114+
Not all heatpumps have build in electrical electrical energy metering and instead only show the energy produced in heat, not the energy consumed in electricity. Adding a (strong) energy meter is a nice addition to measure the SCOP of your device. Shelly energy meters are recommended since they offer offer a [16A power plug](https://www.shelly.com/en-nl/products/product-overview/1xplug) and a [variety of in-line or clamp energy meters](https://www.shelly.com/en-nl/products/energy-metering-energy-efficiency) with various protection mechanisms.
112115

113116
### 3.2 Additional sensors (advanced)
114117

115118
If you miss a sensor please have a look in the devices under "+n entities not shown". Not all entities can autodetect by the integration. You can enable the entities by your self.
116119

117-
The most usefull sensors and parameters are created automaticly. But if you miss a sensor you can add it manually via yaml configuration like the original module from [Bouni/luxtronik](https://github.com/Bouni/luxtronik).
120+
The most useful sensors and parameters are created automatically. But if you miss a sensor you can add it manually via yaml configuration like the original module from [Bouni/luxtronik](https://github.com/Bouni/luxtronik).
118121

119122
A short description of many of the available sensors can be found here [Loxwiki - Luxtronik Java Web Interface](https://loxwiki.atlassian.net/wiki/spaces/LOX/pages/1533935933/Java+Webinterface)
120123

121124
#### Parameter IDs
122125

123-
Take these files as a reference to figure ot which IDs to use:
126+
Take these files as a reference to figure out which IDs to use:
124127

125128
- <https://github.com/Bouni/python-luxtronik/blob/master/luxtronik/parameters.py>
126129
- <https://github.com/Bouni/python-luxtronik/blob/master/luxtronik/calculations.py>
127130
- <https://github.com/Bouni/python-luxtronik/blob/master/luxtronik/visibilities.py>
128131

129132
#### Service
130133

131-
In order to change parameters on the Luxtronik conroller, you can use the following service:
134+
In order to change parameters on the Luxtronik controller, you can use the following service:
132135

133136
```yaml
134137
Domain: luxtronik2
@@ -143,13 +146,13 @@ Service Data: {"parameter": "ID_Ba_Hz_akt", "value": "Automatic"}
143146
- description: Value you want to set the parameter to.
144147
- type: [string, float]
145148
146-
Only a small number of the over 1100 parameters have a known funtion and only these can be written, these are:
149+
Only a small number of the over 1100 parameters have a known function and only these can be written, these are:
147150
148151
- `ID_Ba_Hz_akt` The mode of operation of the heating circuit, possible values are "Automatic", "Second heatsource", "Party", "Holidays", "Off"
149-
- `ID_Ba_Bw_akt` The mode of operation of the hot water circuit, possible valus are "Automatic", "Second heatsource", "Party", "Holidays", "Off"
152+
- `ID_Ba_Bw_akt` The mode of operation of the hot water circuit, possible values are "Automatic", "Second heatsource", "Party", "Holidays", "Off"
150153
- `ID_Soll_BWS_akt` The set point for hot water generation, for example 50.0 for 50.0°C
151154
- `ID_Einst_BA_Kuehl_akt` The mode of operation of the cooling circuit, possible values are "Automatic", "Off"
152-
- `ID_Einst_KuehlFreig_akt` The outdoor temprature from wher on the cooling should start to operate, for example 24.0
155+
- `ID_Einst_KuehlFreig_akt` The outdoor temperature from where on the cooling should start to operate, for example 24.0
153156
- `ID_Ba_Sw_akt` The mode of operation of the swimming pool heating circuit, possible values are "Automatic", "Party", "Holidays", "Off"
154157
- `ID_Einst_TDC_Max_akt` Max. temperature difference of the hot water buffer tank, for example 70.0
155158
- `ID_Sollwert_KuCft1_akt` Cooling set point for mixer circuit 1, for example 19.0
@@ -167,12 +170,27 @@ Only a small number of the over 1100 parameters have a known funtion and only th
167170
> ℹ️ Before changing a parameter it smart to first read the current value and note it somewhere in case you want to set it back to its original value.
168171
All parameters can be configured as sensors and read that way.
169172

170-
171-
### 4 Support Tickets
172-
If you create a ticket please provide always a diagnostic file as issue attachment:
173+
## 4 Troubleshooting
174+
175+
In case of issues, perform the following steps first.
176+
1. *Restart the heatpump*. Perform a full powercycle. This solves most connectivity issues.
177+
2. *Download the latest (beta) version if this integration*.
178+
1. Go to `HACS` > `Luxtronik`.
179+
2. From the 3-dot menu, select `Redownload`.
180+
3. Expend `Need a different version` and select the latest pre-release.
181+
4. Select `Download`
182+
5. Restart Home Assistant.
183+
3. *Check the system logs*. If the integration isn't working, check the system logs first.
184+
185+
### Asking for help
186+
If you can't figure it out on your own, consult the community. Do a thorough search first before asking for help.
187+
1. *Use the HA Community Forum*. For basic questions regarding the functionality of your heatpump or the integration, the [HA community forum](https://community.home-assistant.io/t/writing-a-component-for-luxtronik-heatpumps/35796) is the best place to start.
188+
2. *Use the Discussions*. For more in-depth questions, check the [GitHub Discussions](https://github.com/BenPru/luxtronik/discussions).
189+
190+
### Support Tickets
191+
If something is broken and you can't fix it with the help of the community, [create a support issue](https://github.com/BenPru/luxtronik/issues). Always include a diagnostic file as issue attachment:
173192
![image](https://github.com/BenPru/luxtronik/assets/32298537/89c26414-0304-438f-9204-79cf0a338db3)
174193

175-
176194
## Some Screenshots
177195

178196
![image](https://user-images.githubusercontent.com/32298537/178588098-09e960f0-f849-475c-9afa-cf4a78e5d76d.png)

custom_components/luxtronik/__init__.py

Lines changed: 80 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""The Luxtronik heatpump integration."""
2+
23
# region Imports
34
from __future__ import annotations
45

@@ -226,17 +227,17 @@ def _up(ident: str, new_id: SK, platform: P = P.SENSOR) -> None:
226227
)
227228
_up(
228229
"heating_circuit_curve1_temperature",
229-
SK.HEATING_CIRCUIT_CURVE1_TEMPERATURE,
230+
SK.HEATING_CURVE_END_TEMPERATURE,
230231
P.NUMBER,
231232
)
232233
_up(
233234
"heating_circuit_curve2_temperature",
234-
SK.HEATING_CIRCUIT_CURVE2_TEMPERATURE,
235+
SK.HEATING_CURVE_PARALLEL_SHIFT_TEMPERATURE,
235236
P.NUMBER,
236237
)
237238
_up(
238239
"heating_circuit_curve_night_temperature",
239-
SK.HEATING_CIRCUIT_CURVE_NIGHT_TEMPERATURE,
240+
SK.HEATING_CURVE_NIGHT_TEMPERATURE,
240241
P.NUMBER,
241242
)
242243
_up(
@@ -289,7 +290,82 @@ def _up(ident: str, new_id: SK, platform: P = P.SENSOR) -> None:
289290
_up("cooling_stop_delay_hours", SK.COOLING_STOP_DELAY_HOURS, P.NUMBER)
290291

291292
new_data = {**config_entry.data}
292-
config_entry.version = 7
293+
hass.config_entries.async_update_entry(config_entry, data=new_data)
294+
295+
if config_entry.version == 7:
296+
# harmonize naming
297+
_up(
298+
"flow_in_circuit2_temperature",
299+
SK.FLOW_IN_CIRCUIT1_TEMPERATURE,
300+
P.NUMBER,
301+
)
302+
_up(
303+
"flow_in_circuit3_temperature",
304+
SK.FLOW_IN_CIRCUIT2_TEMPERATURE,
305+
P.NUMBER,
306+
)
307+
_up(
308+
"flow_in_circuit2_target_temperature",
309+
SK.FLOW_IN_CIRCUIT1_TARGET_TEMPERATURE,
310+
P.NUMBER,
311+
)
312+
_up(
313+
"flow_in_circuit3_target_temperature",
314+
SK.FLOW_IN_CIRCUIT2_TARGET_TEMPERATURE,
315+
P.NUMBER,
316+
)
317+
318+
# main circuit
319+
_up(
320+
"heating_circuit_curve1_temperature",
321+
SK.HEATING_CURVE_END_TEMPERATURE,
322+
P.NUMBER,
323+
)
324+
_up(
325+
"heating_circuit_curve2_temperature",
326+
SK.HEATING_CURVE_PARALLEL_SHIFT_TEMPERATURE,
327+
P.NUMBER,
328+
)
329+
_up(
330+
"heating_circuit_curve_night_temperature",
331+
SK.HEATING_CURVE_NIGHT_TEMPERATURE,
332+
P.NUMBER,
333+
)
334+
335+
# circuit 1
336+
_up(
337+
"heating_circuit2_curve1_temperature",
338+
SK.HEATING_CURVE_CIRCUIT1_END_TEMPERATURE,
339+
P.NUMBER,
340+
)
341+
_up(
342+
"heating_circuit2_curve2_temperature",
343+
SK.HEATING_CURVE_CIRCUIT1_PARALLEL_SHIFT_TEMPERATURE,
344+
P.NUMBER,
345+
)
346+
_up(
347+
"heating_circuit2_curve_night_temperature",
348+
SK.HEATING_CURVE_CIRCUIT1_NIGHT_TEMPERATURE,
349+
P.NUMBER,
350+
)
351+
# circuit 3
352+
_up(
353+
"heating_circuit3_curve1_temperature",
354+
SK.HEATING_CURVE_CIRCUIT3_END_TEMPERATURE,
355+
P.NUMBER,
356+
)
357+
_up(
358+
"heating_circuit3_curve2_temperature",
359+
SK.HEATING_CURVE_CIRCUIT3_PARALLEL_SHIFT_TEMPERATURE,
360+
P.NUMBER,
361+
)
362+
_up(
363+
"heating_circuit3_curve_night_temperature",
364+
SK.HEATING_CURVE_CIRCUIT3_NIGHT_TEMPERATURE,
365+
P.NUMBER,
366+
)
367+
368+
new_data = {**config_entry.data}
293369
hass.config_entries.async_update_entry(config_entry, data=new_data)
294370

295371
LOGGER.info("Migration to version %s successful", config_entry.version)

0 commit comments

Comments
 (0)