Skip to content

Commit

Permalink
feat: Add temperature control numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
alepee committed Nov 19, 2024
1 parent d414924 commit 9498572
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 14 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ The integration automatically detects your heat pump model and available feature
| eco_mode | switch | Enable/disable ECO mode which applies a temperature offset to save energy | on/off |
| heat_eco_offset | number | Temperature offset applied in ECO mode for heating | °C (1-10) |
| cool_eco_offset | number | Temperature offset applied in ECO mode for cooling | °C (1-10) |
| thermostat | switch | Enable/disable the thermostat function for this circuit | on/off |
| thermostat_temp | number | Target room temperature when using the thermostat function | °C (5.0-35.0) |
| thermostat | switch | Enable/disable the Modbus thermostat function for this circuit | on/off |
| target_temp | number | Target room temperature when using the thermostat function | °C (5.0-35.0) |
| current_temp | number | Current measured room temperature | °C (0.0-50.0) |

### Domestic Hot Water Device (if configured)

Expand Down
8 changes: 4 additions & 4 deletions custom_components/hitachi_yutaki/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@
"circuit1_heat_eco_offset": 1008,
"circuit1_cool_eco_offset": 1009,
"circuit1_thermostat": 1010,
"circuit1_thermostat_temp": 1011,
"circuit1_room_temp": 1012,
"circuit1_target_temp": 1011,
"circuit1_current_temp": 1012,
"circuit2_power": 1013,
"circuit2_water_heating_temp_control": 1014,
"circuit2_water_cooling_temp_control": 1015,
Expand All @@ -82,8 +82,8 @@
"circuit2_heat_eco_offset": 1019,
"circuit2_cool_eco_offset": 1020,
"circuit2_thermostat": 1021,
"circuit2_thermostat_temp": 1022,
"circuit2_room_temp": 1023,
"circuit2_target_temp": 1022,
"circuit2_current_temp": 1023,
"dhw_power": 1024,
"dhw_temp": 1025,
"dhw_boost": 1026,
Expand Down
22 changes: 19 additions & 3 deletions custom_components/hitachi_yutaki/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,32 @@ class HitachiYutakiNumberEntityDescription(NumberEntityDescription):
entity_category=EntityCategory.CONFIG,
),
HitachiYutakiNumberEntityDescription(
key="thermostat_temp",
translation_key="thermostat_temp",
key="target_temp",
translation_key="target_temp",
description="Target room temperature when using the thermostat function",
native_min_value=5.0,
native_max_value=35.0,
native_step=0.5,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
register_key="thermostat_temp",
register_key="target_temp",
mode=NumberMode.BOX,
multiplier=10,
entity_category=EntityCategory.CONFIG,
entity_registry_visible_default=False,
),
HitachiYutakiNumberEntityDescription(
key="current_temp",
translation_key="current_temp",
description="Measured room temperature for this circuit",
native_min_value=0.0,
native_max_value=50.0,
native_step=0.5,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
register_key="current_temp",
mode=NumberMode.BOX,
multiplier=10,
entity_category=EntityCategory.CONFIG,
entity_registry_visible_default=False,
),
)

Expand Down
2 changes: 1 addition & 1 deletion custom_components/hitachi_yutaki/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class HitachiYutakiSwitchEntityDescription(SwitchEntityDescription):
HitachiYutakiSwitchEntityDescription(
key="thermostat",
translation_key="thermostat",
description="Enable/disable the thermostat function for this circuit",
description="Enable/disable the Modbus thermostat function for this circuit",
register_key="thermostat",
entity_category=EntityCategory.CONFIG,
),
Expand Down
7 changes: 5 additions & 2 deletions custom_components/hitachi_yutaki/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,17 @@
"cool_eco_offset": {
"name": "Cool ECO Offset"
},
"thermostat_temp": {
"name": "Thermostat Temperature"
"target_temp": {
"name": "Target Temperature"
},
"temperature": {
"name": "Temperature"
},
"antilegionella_temp": {
"name": "Anti-legionella Temperature"
},
"current_temp": {
"name": "Current Temperature"
}
}
}
Expand Down
7 changes: 5 additions & 2 deletions custom_components/hitachi_yutaki/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,17 @@
"cool_eco_offset": {
"name": "Décalage ECO Refroidissement"
},
"thermostat_temp": {
"name": "Température Thermostat"
"target_temp": {
"name": "Température Cible"
},
"temperature": {
"name": "Température"
},
"antilegionella_temp": {
"name": "Température Anti-légionelle"
},
"current_temp": {
"name": "Température Ambiante"
}
}
}
Expand Down

0 comments on commit 9498572

Please sign in to comment.