Skip to content

Commit

Permalink
Merge pull request #332 from dougiteixeira/fix-update-bs
Browse files Browse the repository at this point in the history
Fix update sensor availability available for packages
  • Loading branch information
dougiteixeira authored Jun 24, 2024
2 parents 2c57aa9 + 0e03faf commit 3e4cf7a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions custom_components/proxmoxve/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ async def async_setup_binary_sensors_nodes(
# unfound node case
if coordinator.data is not None:
for description in PROXMOX_BINARYSENSOR_NODES:
if getattr(coordinator.data, description.key, False) != UNDEFINED:
if getattr(coordinator.data, description.key, UNDEFINED) != UNDEFINED:
sensors.append(
create_binary_sensor(
coordinator=coordinator,
Expand Down Expand Up @@ -222,7 +222,7 @@ async def async_setup_binary_sensors_qemu(
continue
for description in PROXMOX_BINARYSENSOR_VM:
if description.api_category in (None, ProxmoxType.QEMU):
if getattr(coordinator.data, description.key, False) != UNDEFINED:
if getattr(coordinator.data, description.key, UNDEFINED) != UNDEFINED:
sensors.append(
create_binary_sensor(
coordinator=coordinator,
Expand Down Expand Up @@ -262,7 +262,7 @@ async def async_setup_binary_sensors_lxc(
continue
for description in PROXMOX_BINARYSENSOR_VM:
if description.api_category in (None, ProxmoxType.LXC):
if getattr(coordinator.data, description.key, False) != UNDEFINED:
if getattr(coordinator.data, description.key, UNDEFINED) != UNDEFINED:
sensors.append(
create_binary_sensor(
coordinator=coordinator,
Expand Down

0 comments on commit 3e4cf7a

Please sign in to comment.