Skip to content

Commit

Permalink
Checking for 1 as a string to fix the binary sensor (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
Chaoscontrol authored Dec 2, 2024
1 parent 12b1bb3 commit 32b9494
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/leafspy/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class LeafSpyBinarySensorDescription(BinarySensorEntityDescription):
translation_key="power_switch_state",
device_class=BinarySensorDeviceClass.POWER,
value_fn=lambda data: data.get("PwrSw"),
transform_fn=lambda x: x == 1,
transform_fn=lambda x: x == '1',
icon="mdi:power",
)
]
Expand Down

0 comments on commit 32b9494

Please sign in to comment.