Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add capability 104047 (boost timeout max) #38

Merged
merged 8 commits into from
Feb 24, 2025
Merged
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
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
Loading