Fix target temperature step attribute name error (#4039)

Fix wrong attribute name for the target temperature step. Correct one is target_temp_step (which is returned by the API) instead of target_temperature_step
This commit is contained in:
Paul Biester 2023-12-13 20:46:36 +01:00 committed by GitHub
parent 6b56bc579a
commit 5d779a27aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,7 +53,7 @@ object ClimateControl : HaControl {
}
val temperatureUnit = entity.attributes["temperature_unit"] ?: ""
val temperatureStepSize = (entity.attributes["target_temperature_step"] as? Number)?.toFloat()
val temperatureStepSize = (entity.attributes["target_temp_step"] as? Number)?.toFloat()
?: when (temperatureUnit) {
"°C" -> 0.5f
else -> 1f