mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 15:17:35 +00:00
Add number entities to set target temp for cooling programs in ViCare (#127267)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
This commit is contained in:
parent
5fc45cd736
commit
d68da74790
@ -265,6 +265,72 @@ CIRCUIT_ENTITY_DESCRIPTIONS: tuple[ViCareNumberEntityDescription, ...] = (
|
|||||||
HeatingProgram.COMFORT_HEATING
|
HeatingProgram.COMFORT_HEATING
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
ViCareNumberEntityDescription(
|
||||||
|
key="normal_cooling_temperature",
|
||||||
|
translation_key="normal_cooling_temperature",
|
||||||
|
entity_category=EntityCategory.CONFIG,
|
||||||
|
device_class=NumberDeviceClass.TEMPERATURE,
|
||||||
|
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
||||||
|
value_getter=lambda api: api.getDesiredTemperatureForProgram(
|
||||||
|
HeatingProgram.NORMAL_COOLING
|
||||||
|
),
|
||||||
|
value_setter=lambda api, value: api.setProgramTemperature(
|
||||||
|
HeatingProgram.NORMAL_COOLING, value
|
||||||
|
),
|
||||||
|
min_value_getter=lambda api: api.getProgramMinTemperature(
|
||||||
|
HeatingProgram.NORMAL_COOLING
|
||||||
|
),
|
||||||
|
max_value_getter=lambda api: api.getProgramMaxTemperature(
|
||||||
|
HeatingProgram.NORMAL_COOLING
|
||||||
|
),
|
||||||
|
stepping_getter=lambda api: api.getProgramStepping(
|
||||||
|
HeatingProgram.NORMAL_COOLING
|
||||||
|
),
|
||||||
|
),
|
||||||
|
ViCareNumberEntityDescription(
|
||||||
|
key="reduced_cooling_temperature",
|
||||||
|
translation_key="reduced_cooling_temperature",
|
||||||
|
entity_category=EntityCategory.CONFIG,
|
||||||
|
device_class=NumberDeviceClass.TEMPERATURE,
|
||||||
|
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
||||||
|
value_getter=lambda api: api.getDesiredTemperatureForProgram(
|
||||||
|
HeatingProgram.REDUCED_COOLING
|
||||||
|
),
|
||||||
|
value_setter=lambda api, value: api.setProgramTemperature(
|
||||||
|
HeatingProgram.REDUCED_COOLING, value
|
||||||
|
),
|
||||||
|
min_value_getter=lambda api: api.getProgramMinTemperature(
|
||||||
|
HeatingProgram.REDUCED_COOLING
|
||||||
|
),
|
||||||
|
max_value_getter=lambda api: api.getProgramMaxTemperature(
|
||||||
|
HeatingProgram.REDUCED_COOLING
|
||||||
|
),
|
||||||
|
stepping_getter=lambda api: api.getProgramStepping(
|
||||||
|
HeatingProgram.REDUCED_COOLING
|
||||||
|
),
|
||||||
|
),
|
||||||
|
ViCareNumberEntityDescription(
|
||||||
|
key="comfort_cooling_temperature",
|
||||||
|
translation_key="comfort_cooling_temperature",
|
||||||
|
entity_category=EntityCategory.CONFIG,
|
||||||
|
device_class=NumberDeviceClass.TEMPERATURE,
|
||||||
|
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
||||||
|
value_getter=lambda api: api.getDesiredTemperatureForProgram(
|
||||||
|
HeatingProgram.COMFORT_COOLING
|
||||||
|
),
|
||||||
|
value_setter=lambda api, value: api.setProgramTemperature(
|
||||||
|
HeatingProgram.COMFORT_COOLING, value
|
||||||
|
),
|
||||||
|
min_value_getter=lambda api: api.getProgramMinTemperature(
|
||||||
|
HeatingProgram.COMFORT_COOLING
|
||||||
|
),
|
||||||
|
max_value_getter=lambda api: api.getProgramMaxTemperature(
|
||||||
|
HeatingProgram.COMFORT_COOLING
|
||||||
|
),
|
||||||
|
stepping_getter=lambda api: api.getProgramStepping(
|
||||||
|
HeatingProgram.COMFORT_COOLING
|
||||||
|
),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -97,13 +97,22 @@
|
|||||||
"name": "Comfort temperature"
|
"name": "Comfort temperature"
|
||||||
},
|
},
|
||||||
"normal_heating_temperature": {
|
"normal_heating_temperature": {
|
||||||
"name": "[%key:component::vicare::entity::number::normal_temperature::name%]"
|
"name": "Normal heating temperature"
|
||||||
},
|
},
|
||||||
"reduced_heating_temperature": {
|
"reduced_heating_temperature": {
|
||||||
"name": "[%key:component::vicare::entity::number::reduced_temperature::name%]"
|
"name": "Reduced heating temperature"
|
||||||
},
|
},
|
||||||
"comfort_heating_temperature": {
|
"comfort_heating_temperature": {
|
||||||
"name": "[%key:component::vicare::entity::number::comfort_temperature::name%]"
|
"name": "Comfort heating temperature"
|
||||||
|
},
|
||||||
|
"normal_cooling_temperature": {
|
||||||
|
"name": "Normal cooling temperature"
|
||||||
|
},
|
||||||
|
"reduced_cooling_temperature": {
|
||||||
|
"name": "Reduced cooling temperature"
|
||||||
|
},
|
||||||
|
"comfort_cooling_temperature": {
|
||||||
|
"name": "Comfort cooling temperature"
|
||||||
},
|
},
|
||||||
"dhw_temperature": {
|
"dhw_temperature": {
|
||||||
"name": "DHW temperature"
|
"name": "DHW temperature"
|
||||||
|
@ -25,11 +25,14 @@ class HeatingProgram(enum.StrEnum):
|
|||||||
|
|
||||||
COMFORT = "comfort"
|
COMFORT = "comfort"
|
||||||
COMFORT_HEATING = "comfortHeating"
|
COMFORT_HEATING = "comfortHeating"
|
||||||
|
COMFORT_COOLING = "comfortCooling"
|
||||||
ECO = "eco"
|
ECO = "eco"
|
||||||
NORMAL = "normal"
|
NORMAL = "normal"
|
||||||
NORMAL_HEATING = "normalHeating"
|
NORMAL_HEATING = "normalHeating"
|
||||||
|
NORMAL_COOLING = "normalCooling"
|
||||||
REDUCED = "reduced"
|
REDUCED = "reduced"
|
||||||
REDUCED_HEATING = "reducedHeating"
|
REDUCED_HEATING = "reducedHeating"
|
||||||
|
REDUCED_COOLING = "reducedCooling"
|
||||||
STANDBY = "standby"
|
STANDBY = "standby"
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
Loading…
x
Reference in New Issue
Block a user