Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Ongoing

- Add/update model-data for Jip, Tom and Floor via PR [#842](https://github.com/plugwise/python-plugwise/pull/842)

## v1.11.1

- Code optimizations via PR [#837](https://github.com/plugwise/python-plugwise/pull/837), [#838](https://github.com/plugwise/python-plugwise/pull/838), [#839](https://github.com/plugwise/python-plugwise/pull/839), [#840](https://github.com/plugwise/python-plugwise/pull/840), and [#841](https://github.com/plugwise/python-plugwise/pull/841)
Expand Down
8 changes: 4 additions & 4 deletions fixtures/adam_jip/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"firmware": "2020-11-04T01:00:00+01:00",
"hardware": "1",
"location": "d58fec52899f4f1c92e4f8fad6d8c48c",
"model": "Tom/Floor",
"model": "Tom",
"model_id": "106-03",
"name": "Tom Logeerkamer",
"sensors": {
Expand All @@ -109,7 +109,7 @@
"firmware": "2020-11-04T01:00:00+01:00",
"hardware": "1",
"location": "06aecb3d00354375924f50c47af36bd2",
"model": "Tom/Floor",
"model": "Tom",
"model_id": "106-03",
"name": "Tom Slaapkamer",
"sensors": {
Expand Down Expand Up @@ -176,7 +176,7 @@
"firmware": "2020-11-04T01:00:00+01:00",
"hardware": "1",
"location": "13228dab8ce04617af318a2888b3c548",
"model": "Tom/Floor",
"model": "Tom",
"model_id": "106-03",
"name": "Tom Woonkamer",
"sensors": {
Expand Down Expand Up @@ -276,7 +276,7 @@
"firmware": "2020-11-04T01:00:00+01:00",
"hardware": "1",
"location": "d27aede973b54be484f6842d1b2802ad",
"model": "Tom/Floor",
"model": "Tom",
"model_id": "106-03",
"name": "Tom Kinderkamer",
"sensors": {
Expand Down
10 changes: 5 additions & 5 deletions fixtures/adam_multiple_devices_per_zone/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
"firmware": "2019-03-27T01:00:00+01:00",
"hardware": "1",
"location": "08963fec7c53423ca5680aa4cb502c63",
"model": "Tom/Floor",
"model": "Tom",
"model_id": "106-03",
"name": "Thermostatic Radiator Badkamer 1",
"sensors": {
Expand Down Expand Up @@ -334,7 +334,7 @@
"firmware": "2019-03-27T01:00:00+01:00",
"hardware": "1",
"location": "12493538af164a409c6a1c79e38afe1c",
"model": "Tom/Floor",
"model": "Tom",
"model_id": "106-03",
"name": "Bios Cv Thermostatic Radiator ",
"sensors": {
Expand All @@ -359,7 +359,7 @@
"firmware": "2019-03-27T01:00:00+01:00",
"hardware": "1",
"location": "c50f167537524366a5af7aa3942feb1e",
"model": "Tom/Floor",
"model": "Tom",
"model_id": "106-03",
"name": "Floor kraan",
"sensors": {
Expand Down Expand Up @@ -467,7 +467,7 @@
"firmware": "2019-03-27T01:00:00+01:00",
"hardware": "1",
"location": "82fa13f017d240daa0d0ea1775420f24",
"model": "Tom/Floor",
"model": "Tom",
"model_id": "106-03",
"name": "Thermostatic Radiator Jessie",
"sensors": {
Expand Down Expand Up @@ -535,7 +535,7 @@
"firmware": "2019-03-27T01:00:00+01:00",
"hardware": "1",
"location": "446ac08dd04d4eff8ac57489757b7314",
"model": "Tom/Floor",
"model": "Tom",
"model_id": "106-03",
"name": "CV Kraan Garage",
"sensors": {
Expand Down
2 changes: 1 addition & 1 deletion fixtures/adam_plus_anna_new/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"firmware": "2020-11-04T01:00:00+01:00",
"hardware": "1",
"location": "f871b8c4d63549319221e294e4f88074",
"model": "Tom/Floor",
"model": "Tom",
"model_id": "106-03",
"name": "Tom Badkamer",
"sensors": {
Expand Down
2 changes: 1 addition & 1 deletion fixtures/adam_plus_anna_new_regulation_off/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"firmware": "2020-11-04T01:00:00+01:00",
"hardware": "1",
"location": "f871b8c4d63549319221e294e4f88074",
"model": "Tom/Floor",
"model": "Tom",
"model_id": "106-03",
"name": "Tom Badkamer",
"sensors": {
Expand Down
10 changes: 5 additions & 5 deletions fixtures/adam_zone_per_device/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
"firmware": "2019-03-27T01:00:00+01:00",
"hardware": "1",
"location": "08963fec7c53423ca5680aa4cb502c63",
"model": "Tom/Floor",
"model": "Tom",
"model_id": "106-03",
"name": "Thermostatic Radiator Badkamer",
"sensors": {
Expand Down Expand Up @@ -331,7 +331,7 @@
"firmware": "2019-03-27T01:00:00+01:00",
"hardware": "1",
"location": "12493538af164a409c6a1c79e38afe1c",
"model": "Tom/Floor",
"model": "Tom",
"model_id": "106-03",
"name": "Bios Cv Thermostatic Radiator ",
"sensors": {
Expand All @@ -356,7 +356,7 @@
"firmware": "2019-03-27T01:00:00+01:00",
"hardware": "1",
"location": "c50f167537524366a5af7aa3942feb1e",
"model": "Tom/Floor",
"model": "Tom",
"model_id": "106-03",
"name": "Floor kraan",
"sensors": {
Expand Down Expand Up @@ -464,7 +464,7 @@
"firmware": "2019-03-27T01:00:00+01:00",
"hardware": "1",
"location": "82fa13f017d240daa0d0ea1775420f24",
"model": "Tom/Floor",
"model": "Tom",
"model_id": "106-03",
"name": "Thermostatic Radiator Jessie",
"sensors": {
Expand Down Expand Up @@ -532,7 +532,7 @@
"firmware": "2019-03-27T01:00:00+01:00",
"hardware": "1",
"location": "446ac08dd04d4eff8ac57489757b7314",
"model": "Tom/Floor",
"model": "Tom",
"model_id": "106-03",
"name": "CV Kraan Garage",
"sensors": {
Expand Down
2 changes: 1 addition & 1 deletion fixtures/m_adam_cooling/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"firmware": "2020-11-04T01:00:00+01:00",
"hardware": "1",
"location": "f871b8c4d63549319221e294e4f88074",
"model": "Tom/Floor",
"model": "Tom",
"model_id": "106-03",
"name": "Tom Badkamer",
"sensors": {
Expand Down
2 changes: 1 addition & 1 deletion fixtures/m_adam_heating/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"firmware": "2020-11-04T01:00:00+01:00",
"hardware": "1",
"location": "f871b8c4d63549319221e294e4f88074",
"model": "Tom/Floor",
"model": "Tom",
"model_id": "106-03",
"name": "Tom Badkamer",
"sensors": {
Expand Down
8 changes: 4 additions & 4 deletions fixtures/m_adam_jip/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"firmware": "2020-11-04T01:00:00+01:00",
"hardware": "1",
"location": "d58fec52899f4f1c92e4f8fad6d8c48c",
"model": "Tom/Floor",
"model": "Tom",
"model_id": "106-03",
"name": "Tom Logeerkamer",
"sensors": {
Expand All @@ -108,7 +108,7 @@
"firmware": "2020-11-04T01:00:00+01:00",
"hardware": "1",
"location": "06aecb3d00354375924f50c47af36bd2",
"model": "Tom/Floor",
"model": "Tom",
"model_id": "106-03",
"name": "Tom Slaapkamer",
"sensors": {
Expand Down Expand Up @@ -175,7 +175,7 @@
"firmware": "2020-11-04T01:00:00+01:00",
"hardware": "1",
"location": "13228dab8ce04617af318a2888b3c548",
"model": "Tom/Floor",
"model": "Tom",
"model_id": "106-03",
"name": "Tom Woonkamer",
"sensors": {
Expand Down Expand Up @@ -275,7 +275,7 @@
"firmware": "2020-11-04T01:00:00+01:00",
"hardware": "1",
"location": "d27aede973b54be484f6842d1b2802ad",
"model": "Tom/Floor",
"model": "Tom",
"model_id": "106-03",
"name": "Tom Kinderkamer",
"sensors": {
Expand Down
10 changes: 5 additions & 5 deletions fixtures/m_adam_multiple_devices_per_zone/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
"firmware": "2019-03-27T01:00:00+01:00",
"hardware": "1",
"location": "08963fec7c53423ca5680aa4cb502c63",
"model": "Tom/Floor",
"model": "Tom",
"model_id": "106-03",
"name": "Thermostatic Radiator Badkamer 1",
"sensors": {
Expand Down Expand Up @@ -327,7 +327,7 @@
"firmware": "2019-03-27T01:00:00+01:00",
"hardware": "1",
"location": "12493538af164a409c6a1c79e38afe1c",
"model": "Tom/Floor",
"model": "Tom",
"model_id": "106-03",
"name": "Bios Cv Thermostatic Radiator ",
"sensors": {
Expand All @@ -352,7 +352,7 @@
"firmware": "2019-03-27T01:00:00+01:00",
"hardware": "1",
"location": "c50f167537524366a5af7aa3942feb1e",
"model": "Tom/Floor",
"model": "Tom",
"model_id": "106-03",
"name": "Floor kraan",
"sensors": {
Expand Down Expand Up @@ -460,7 +460,7 @@
"firmware": "2019-03-27T01:00:00+01:00",
"hardware": "1",
"location": "82fa13f017d240daa0d0ea1775420f24",
"model": "Tom/Floor",
"model": "Tom",
"model_id": "106-03",
"name": "Thermostatic Radiator Jessie",
"sensors": {
Expand Down Expand Up @@ -528,7 +528,7 @@
"firmware": "2019-03-27T01:00:00+01:00",
"hardware": "1",
"location": "446ac08dd04d4eff8ac57489757b7314",
"model": "Tom/Floor",
"model": "Tom",
"model_id": "106-03",
"name": "CV Kraan Garage",
"sensors": {
Expand Down
4 changes: 3 additions & 1 deletion plugwise/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,12 @@
"159.2": "Adam",
# "?????": "Emma Essential",
"170.1": "Emma Pro wired",
"106-03": "Tom/Floor",
"106-03": "Tom",
"158-01": "Lisa",
"160-01": "Plug",
"165-01": "Floor",
"168-01": "Jip",
"168-02": "Jip",
"170-01": "Emma Pro",
"038500": "Stick",
"070085": "Stick",
Expand Down
8 changes: 4 additions & 4 deletions tests/data/adam/adam_jip.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"firmware": "2020-11-04T01:00:00+01:00",
"hardware": "1",
"location": "d58fec52899f4f1c92e4f8fad6d8c48c",
"model": "Tom/Floor",
"model": "Tom",
"model_id": "106-03",
"name": "Tom Logeerkamer",
"sensors": {
Expand All @@ -109,7 +109,7 @@
"firmware": "2020-11-04T01:00:00+01:00",
"hardware": "1",
"location": "06aecb3d00354375924f50c47af36bd2",
"model": "Tom/Floor",
"model": "Tom",
"model_id": "106-03",
"name": "Tom Slaapkamer",
"sensors": {
Expand Down Expand Up @@ -176,7 +176,7 @@
"firmware": "2020-11-04T01:00:00+01:00",
"hardware": "1",
"location": "13228dab8ce04617af318a2888b3c548",
"model": "Tom/Floor",
"model": "Tom",
"model_id": "106-03",
"name": "Tom Woonkamer",
"sensors": {
Expand Down Expand Up @@ -276,7 +276,7 @@
"firmware": "2020-11-04T01:00:00+01:00",
"hardware": "1",
"location": "d27aede973b54be484f6842d1b2802ad",
"model": "Tom/Floor",
"model": "Tom",
"model_id": "106-03",
"name": "Tom Kinderkamer",
"sensors": {
Expand Down
10 changes: 5 additions & 5 deletions tests/data/adam/adam_multiple_devices_per_zone.json
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
"firmware": "2019-03-27T01:00:00+01:00",
"hardware": "1",
"location": "08963fec7c53423ca5680aa4cb502c63",
"model": "Tom/Floor",
"model": "Tom",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# First, let's check the target file and verify the model field changes at specified lines
cat -n tests/data/adam/adam_multiple_devices_per_zone.json | sed -n '190,200p'

Repository: plugwise/python-plugwise

Length of output: 476


🏁 Script executed:

# Check other specified line ranges
cat -n tests/data/adam/adam_multiple_devices_per_zone.json | sed -n '333,340p'

Repository: plugwise/python-plugwise

Length of output: 398


🏁 Script executed:

# Search for any remaining "Tom/Floor" references in the codebase
rg "Tom/Floor" --type=json --type=py

Repository: plugwise/python-plugwise

Length of output: 128


🏁 Script executed:

# Check HW_MODELS mapping in constants.py for model_id "106-03"
fd constants.py | head -5

Repository: plugwise/python-plugwise

Length of output: 89


🏁 Script executed:

# Check remaining line ranges
cat -n tests/data/adam/adam_multiple_devices_per_zone.json | sed -n '360,365p'

Repository: plugwise/python-plugwise

Length of output: 272


🏁 Script executed:

# Check line 470
cat -n tests/data/adam/adam_multiple_devices_per_zone.json | sed -n '468,473p'

Repository: plugwise/python-plugwise

Length of output: 289


🏁 Script executed:

# Check line 538
cat -n tests/data/adam/adam_multiple_devices_per_zone.json | sed -n '536,541p'

Repository: plugwise/python-plugwise

Length of output: 276


🏁 Script executed:

# Search for Tom/Floor more comprehensively
rg "Tom/Floor" --type=json --type=py -B 2 -A 2

Repository: plugwise/python-plugwise

Length of output: 387


🏁 Script executed:

# Check HW_MODELS mapping in constants.py
wc -l plugwise/constants.py

Repository: plugwise/python-plugwise

Length of output: 93


🏁 Script executed:

# Get the HW_MODELS section from constants.py
rg -n "HW_MODELS" plugwise/constants.py -A 30

Repository: plugwise/python-plugwise

Length of output: 1063


Update the comment in constants.py to reflect the Tom/Floor separation.

All model field changes from "Tom/Floor" to "Tom" in the JSON test data are confirmed across lines 196, 337, 362, 470, and 538. The HW_MODELS mapping correctly reflects the separation with "106-03" mapped to "Tom" and "165-01" mapped to "Floor" as distinct entries.

However, the comment at line 26 of constants.py (# Specific for a Lisa or Tom/Floor) is outdated and should be updated to reflect the separated device types, or removed if no longer applicable. This comment may confuse future maintainers about the current model structure.

🤖 Prompt for AI Agents
In constants.py around line 26, the inline comment "# Specific for a Lisa or
Tom/Floor" is outdated because test JSON now uses separate model names "Tom" and
"Floor" (see tests/data/adam/adam_multiple_devices_per_zone.json lines 196, 337,
362, 470, 538); update the comment to reflect the separated device types (e.g.,
"# Specific for a Lisa, Tom, or Floor" or a clearer phrase describing distinct
models) or remove the comment entirely to avoid confusion, ensuring it matches
the HW_MODELS mapping that maps "106-03" -> "Tom" and "165-01" -> "Floor".

"model_id": "106-03",
"name": "Thermostatic Radiator Badkamer 1",
"sensors": {
Expand Down Expand Up @@ -334,7 +334,7 @@
"firmware": "2019-03-27T01:00:00+01:00",
"hardware": "1",
"location": "12493538af164a409c6a1c79e38afe1c",
"model": "Tom/Floor",
"model": "Tom",
"model_id": "106-03",
"name": "Bios Cv Thermostatic Radiator ",
"sensors": {
Expand All @@ -359,7 +359,7 @@
"firmware": "2019-03-27T01:00:00+01:00",
"hardware": "1",
"location": "c50f167537524366a5af7aa3942feb1e",
"model": "Tom/Floor",
"model": "Tom",
"model_id": "106-03",
"name": "Floor kraan",
"sensors": {
Expand Down Expand Up @@ -467,7 +467,7 @@
"firmware": "2019-03-27T01:00:00+01:00",
"hardware": "1",
"location": "82fa13f017d240daa0d0ea1775420f24",
"model": "Tom/Floor",
"model": "Tom",
"model_id": "106-03",
"name": "Thermostatic Radiator Jessie",
"sensors": {
Expand Down Expand Up @@ -535,7 +535,7 @@
"firmware": "2019-03-27T01:00:00+01:00",
"hardware": "1",
"location": "446ac08dd04d4eff8ac57489757b7314",
"model": "Tom/Floor",
"model": "Tom",
"model_id": "106-03",
"name": "CV Kraan Garage",
"sensors": {
Expand Down
2 changes: 1 addition & 1 deletion tests/data/adam/adam_plus_anna_new.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"firmware": "2020-11-04T01:00:00+01:00",
"hardware": "1",
"location": "f871b8c4d63549319221e294e4f88074",
"model": "Tom/Floor",
"model": "Tom",
"model_id": "106-03",
"name": "Tom Badkamer",
"sensors": {
Expand Down
2 changes: 1 addition & 1 deletion tests/data/adam/adam_plus_anna_new_regulation_off.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"firmware": "2020-11-04T01:00:00+01:00",
"hardware": "1",
"location": "f871b8c4d63549319221e294e4f88074",
"model": "Tom/Floor",
"model": "Tom",
"model_id": "106-03",
"name": "Tom Badkamer",
"sensors": {
Expand Down
Loading