Skip to content

Commit

Permalink
Add holiday extensions to F1155, F1255 (#178)
Browse files Browse the repository at this point in the history
Fixes #175
Related to #174 

Verified that the field value of 10 is invalid on F1155, so it likely is
the same problem on the F750.
  • Loading branch information
yozik04 authored Oct 13, 2024
2 parents 9431e9a + c09fb08 commit a596a57
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 8 deletions.
5 changes: 4 additions & 1 deletion nibe/console_scripts/convert_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
def update_dict(d: MutableMapping, u: Mapping, removeExplicitNulls: bool) -> Mapping:
for k, v in u.items():
if v is None and removeExplicitNulls:
d.pop(k, None)
try:
d.pop(k)
except (IndexError, KeyError):
pass
elif isinstance(v, Mapping):
update_dict(d.setdefault(k, {}), v, removeExplicitNulls)
else:
Expand Down
18 changes: 17 additions & 1 deletion nibe/data/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -499,8 +499,24 @@
},
{
"description": "Holiday settings",
"files": ["f750.json"],
"files": ["f750.json", "f1155_f1255.json"],
"data": {
"48043": {
"title": "Holiday - Activated",
"info": "0=inactive, 1=active",
"size": "u8",
"factor": 1,
"min": 0.0,
"max": 1.0,
"default": 0.0,
"name": "holiday-activated-48043",
"write": true,
"mappings": {
"0": "inactive",
"1": "active",
"10": null
}
},
"48044": {
"title": "Holiday - Start Date",
"info": "Days since 1 January 2007",
Expand Down
70 changes: 67 additions & 3 deletions nibe/data/f1155_f1255.json
Original file line number Diff line number Diff line change
Expand Up @@ -5395,17 +5395,17 @@
},
"48043": {
"title": "Holiday - Activated",
"info": "0=inactive, 10=active",
"info": "0=inactive, 1=active",
"size": "u8",
"factor": 1,
"min": 0.0,
"max": 10.0,
"max": 1.0,
"default": 0.0,
"name": "holiday-activated-48043",
"write": true,
"mappings": {
"0": "inactive",
"10": "active"
"1": "active"
}
},
"48053": {
Expand Down Expand Up @@ -9579,6 +9579,70 @@
"name": "aux-ers-fire-place-guard-49430",
"write": true
},
"48044": {
"title": "Holiday - Start Date",
"info": "Days since 1 January 2007",
"size": "u16",
"factor": 1,
"name": "holiday-start-date-48044",
"write": true,
"type": "date"
},
"48045": {
"title": "Holiday - End Date",
"info": "Days since 1 January 2007",
"size": "u16",
"factor": 1,
"name": "holiday-end-date-48045",
"write": true,
"type": "date"
},
"48047": {
"title": "Holiday - HW Comfort Mode",
"info": "-1=Off 0=Economy 1=Normal 2=Luxury",
"size": "s8",
"factor": 1,
"min": -1,
"max": 2,
"default": 1,
"name": "holiday-hot-water-comfort-mode-48047",
"write": true,
"mappings": {
"-1": "Off",
"0": "Economy",
"1": "Normal",
"2": "Luxury"
}
},
"48048": {
"title": "Holiday - Fan Mode",
"info": "0=Normal 1=Fan speed 1, 2=Fan speed 2, 3=Fan speed 3, 4=Fan speed 4",
"size": "u8",
"factor": 1,
"min": 0,
"max": 4,
"default": 0,
"name": "holiday-fan-mode-48048",
"write": true,
"mappings": {
"0": "Normal",
"1": "Fan mode 1",
"2": "Fan mode 2",
"3": "Fan mode 3",
"4": "Fan mode 4"
}
},
"48051": {
"title": "Holiday - Room Temperature",
"size": "s16",
"factor": 10,
"name": "holiday-room-temperature-48051",
"write": true,
"unit": "\u00b0C",
"min": 50,
"max": 300,
"default": 200
},
"40152": {
"title": "BT71 Ext. Return Temp",
"info": "External return temperature, BT71",
Expand Down
6 changes: 3 additions & 3 deletions nibe/data/f750.json
Original file line number Diff line number Diff line change
Expand Up @@ -4447,17 +4447,17 @@
},
"48043": {
"title": "Holiday - Activated",
"info": "0=inactive, 10=active",
"info": "0=inactive, 1=active",
"size": "u8",
"factor": 1,
"min": 0.0,
"max": 10.0,
"max": 1.0,
"default": 0.0,
"name": "holiday-activated-48043",
"write": true,
"mappings": {
"0": "inactive",
"10": "active"
"1": "active"
}
},
"48044": {
Expand Down

0 comments on commit a596a57

Please sign in to comment.