Add config flow step user to dsmr (#50318)
Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
parent
0714ee68eb
commit
aa56a21b45
7 changed files with 490 additions and 9 deletions
|
@ -344,7 +344,9 @@ class DSMREntity(SensorEntity):
|
|||
return self.translate_tariff(value, self._config[CONF_DSMR_VERSION])
|
||||
|
||||
with suppress(TypeError):
|
||||
value = round(float(value), self._config[CONF_PRECISION])
|
||||
value = round(
|
||||
float(value), self._config.get(CONF_PRECISION, DEFAULT_PRECISION)
|
||||
)
|
||||
|
||||
if value is not None:
|
||||
return value
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue