Skip to content

Commit

Permalink
Make sure temperature step size is 0.5
Browse files Browse the repository at this point in the history
Fixes #115
  • Loading branch information
tschamm committed Oct 19, 2023
1 parent b7cdcea commit f528b7a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion custom_components/bosch_shc/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
class ClimateControl(SHCEntity, ClimateEntity):
"""Representation of a SHC room climate control."""

_attr_target_temperature_step = 0.5

def __init__(
self,
device: SHCClimateControl,
Expand Down Expand Up @@ -162,7 +164,7 @@ def set_temperature(self, **kwargs):
return

if self.min_temp <= temperature <= self.max_temp:
self._device.setpoint_temperature = float(temperature)
self._device.setpoint_temperature = float(round(temperature * 2.0) / 2.0)

def set_hvac_mode(self, hvac_mode: str):
"""Set hvac mode."""
Expand Down

0 comments on commit f528b7a

Please sign in to comment.