diff --git a/homeassistant/components/sensor/octoprint.py b/homeassistant/components/sensor/octoprint.py index bb4e6973df8..4bf543f3831 100644 --- a/homeassistant/components/sensor/octoprint.py +++ b/homeassistant/components/sensor/octoprint.py @@ -93,7 +93,11 @@ class OctoPrintSensor(Entity): @property def state(self): """Return the state of the sensor.""" - return self._state + sensor_unit = self.unit_of_measurement + if sensor_unit == TEMP_CELSIUS or sensor_unit == "%": + return round(self._state, 2) + else: + return self._state @property def unit_of_measurement(self):