add hysteresis entity

This commit is contained in:
Christopher Fenner
2024-08-19 19:15:47 +02:00
parent 50f3c891fa
commit dcb5680d0c
2 changed files with 15 additions and 1 deletions

View File

@@ -63,9 +63,20 @@ DEVICE_ENTITY_DESCRIPTIONS: tuple[ViCareNumberEntityDescription, ...] = (
native_max_value=60,
native_step=1,
),
ViCareNumberEntityDescription(
key="dhw_hysteresis",
translation_key="dhw_hysteresis",
entity_category=EntityCategory.CONFIG,
device_class=NumberDeviceClass.TEMPERATURE,
native_unit_of_measurement=UnitOfTemperature.KELVIN,
value_getter=lambda api: api.getDomesticHotWaterHysteresis(),
value_setter=lambda api, value: api.setDomesticHotWaterHysteresis(value),
min_value_getter=lambda api: api.getDomesticHotWaterHysteresisMin(),
max_value_getter=lambda api: api.getDomesticHotWaterHysteresisMax(),
stepping_getter=lambda api: api.getDomesticHotWaterHysteresisStepping(),
),
)
CIRCUIT_ENTITY_DESCRIPTIONS: tuple[ViCareNumberEntityDescription, ...] = (
ViCareNumberEntityDescription(
key="heating curve shift",

View File

@@ -107,6 +107,9 @@
},
"dhw_secondary_temperature": {
"name": "DHW secondary temperature"
},
"dhw_hysteresis": {
"name": "DHW hysteresis"
}
},
"sensor": {