Remove CONF_PRECISION remainder from dsmr (#104919)
This commit is contained in:
parent
edb52bb364
commit
5d6791e412
6 changed files with 3 additions and 27 deletions
|
@ -46,7 +46,6 @@ from homeassistant.util import Throttle
|
|||
|
||||
from .const import (
|
||||
CONF_DSMR_VERSION,
|
||||
CONF_PRECISION,
|
||||
CONF_PROTOCOL,
|
||||
CONF_SERIAL_ID,
|
||||
CONF_SERIAL_ID_GAS,
|
||||
|
@ -790,9 +789,7 @@ class DSMREntity(SensorEntity):
|
|||
return self.translate_tariff(value, self._entry.data[CONF_DSMR_VERSION])
|
||||
|
||||
with suppress(TypeError):
|
||||
value = round(
|
||||
float(value), self._entry.data.get(CONF_PRECISION, DEFAULT_PRECISION)
|
||||
)
|
||||
value = round(float(value), DEFAULT_PRECISION)
|
||||
|
||||
# Make sure we do not return a zero value for an energy sensor
|
||||
if not value and self.state_class == SensorStateClass.TOTAL_INCREASING:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue