Skip to content

Commit

Permalink
Merge pull request #38 from hobbe/capability-104047
Browse files Browse the repository at this point in the history
Add capability 104047 (boost timeout max)
  • Loading branch information
gduteil authored Feb 24, 2025
2 parents 030ff86 + e937932 commit ef08e00
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 0 deletions.
10 changes: 10 additions & 0 deletions custom_components/cozytouch/capability.py
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,16 @@ def get_capability_infos(modelInfos: dict, capabilityId: int, capabilityValue: s
capability["category"] = "sensor"
capability["icon"] = "mdi:heat-wave"

elif capabilityId == 104047:
# Boost timeout max. in minutes
capability["name"] = "boost_timeout_max"
capability["type"] = "minutes_adjustment_number"
capability["category"] = "diag"
capability["icon"] = "mdi:clock-outline"
capability["lowest_value"] = 5
capability["highest_value"] = 60
capability["step"] = 5

elif capabilityId == 105906:
capability["name"] = "Target 105906"
capability["type"] = "temperature_percent_adjustment_number"
Expand Down
2 changes: 2 additions & 0 deletions custom_components/cozytouch/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from homeassistant.components.number import NumberDeviceClass, NumberEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import UnitOfTime
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback

Expand Down Expand Up @@ -331,6 +332,7 @@ def __init__(
)
self._attr_device_class = None
self._attr_mode = "auto"
self._attr_native_unit_of_measurement = UnitOfTime.MINUTES
self._attr_native_step = capability.get("step", 1)
self._attr_native_min_value = capability.get("lowest_value", 0)
self._attr_native_max_value = capability.get("highest_value", 60)
Expand Down
1 change: 1 addition & 0 deletions custom_components/cozytouch/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
},
"number": {
"away_mode_temperature": { "name": "Away Mode Temperature" },
"boost_timeout_max": { "name": "Boost Timeout Max." },
"override_total_time": { "name": "Override Total Time" },
"override_total_time_z1": { "name": "Override Total Time Z1" },
"override_total_time_z2": { "name": "Override Total Time Z2" },
Expand Down
1 change: 1 addition & 0 deletions custom_components/cozytouch/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
},
"number": {
"away_mode_temperature": { "name": "Away Mode Temperature" },
"boost_timeout_max": { "name": "Boost Timeout Max." },
"override_total_time": { "name": "Override Total Time" },
"override_total_time_z1": { "name": "Override Total Time Z1" },
"override_total_time_z2": { "name": "Override Total Time Z2" },
Expand Down
1 change: 1 addition & 0 deletions custom_components/cozytouch/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
},
"number": {
"away_mode_temperature": { "name": "Température Absence" },
"boost_timeout_max": { "name": "Temporisation Max. Boost" },
"override_total_time": { "name": "Durée Délégation" },
"override_total_time_z1": { "name": "Durée Délégation Z1" },
"override_total_time_z2": { "name": "Durée Délégation Z2" },
Expand Down

0 comments on commit ef08e00

Please sign in to comment.