Reduce missed coverage in zwave_js (#79571)
* Reduce missed coverage in zwave_js.climate and cover * Add switch platform coverage * Add select platform * Add lock platform * Remove one line of coverage from number platform * update docstring
This commit is contained in:
parent
c717fd19de
commit
d4c28e04e4
8 changed files with 160 additions and 28 deletions
|
@ -113,10 +113,7 @@ class ZwaveVolumeNumberEntity(ZWaveBaseEntity, NumberEntity):
|
|||
super().__init__(config_entry, driver, info)
|
||||
max_value = cast(int, self.info.primary_value.metadata.max)
|
||||
min_value = cast(int, self.info.primary_value.metadata.min)
|
||||
self.correction_factor = max_value - min_value
|
||||
# Fallback in case we can't properly calculate correction factor
|
||||
if self.correction_factor == 0:
|
||||
self.correction_factor = 1
|
||||
self.correction_factor = (max_value - min_value) or 1
|
||||
|
||||
# Entity class attributes
|
||||
self._attr_native_min_value = 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue