Skip to content

Commit

Permalink
fix uninitialized variable (#256)
Browse files Browse the repository at this point in the history
  • Loading branch information
sammessina authored Sep 2, 2024
1 parent f48279e commit 965200a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions custom_components/bhyve/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ async def async_setup_entry(
all_zones = device.get("zones")
for zone in all_zones:
# if the zone doesn't have a name, set it to the device's name if there is only one (eg a hose timer)
zone_name = zone.get("name", None)
if zone_name is None:
zone_name = (
device.get("name") if len(all_zones) == 1 else "Unnamed Zone"
Expand Down

0 comments on commit 965200a

Please sign in to comment.