Skip to content

Commit 738d956

Browse files
committed
Fix linter issues
Signed-off-by: Ian Brown <[email protected]>
1 parent bbcd619 commit 738d956

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

custom_components/sensus_analytics/sensor.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry, async_add_e
4242
class UsageConversionMixin:
4343
"""Mixin to provide usage conversion."""
4444

45+
# pylint: disable=too-many-return-statements
4546
def _convert_usage(self, usage, usage_unit=None):
4647
"""Convert usage based on configuration and native unit."""
4748
if usage is None:
@@ -72,9 +73,9 @@ def _get_usage_unit(self):
7273

7374
if usage_unit == "CF" and config_unit_type == "gal":
7475
return "gal"
75-
elif usage_unit == "GAL" and config_unit_type == "CF":
76+
if usage_unit == "GAL" and config_unit_type == "CF":
7677
return "CF"
77-
elif usage_unit == "GAL" and config_unit_type == "gal":
78+
if usage_unit == "GAL" and config_unit_type == "gal":
7879
return "gal"
7980
return usage_unit
8081

0 commit comments

Comments
 (0)