1
0
mirror of https://github.com/mjg59/python-broadlink.git synced 2024-11-22 07:00:12 +01:00

Fix SP4 class (#445)

This commit is contained in:
Felipe Martins Diel 2020-10-18 04:50:15 -03:00 committed by GitHub
parent a31d766d33
commit e1fa54f874
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -246,11 +246,11 @@ class sp4(device):
"""Set state of device."""
data = {}
if pwr is not None:
data["pwr"] = pwr
data["pwr"] = int(bool(pwr))
if ntlight is not None:
data["ntlight"] = ntlight
data["ntlight"] = int(bool(ntlight))
if indicator is not None:
data["indicator"] = indicator
data["indicator"] = int(bool(indicator))
if ntlbrightness is not None:
data["ntlbrightness"] = ntlbrightness
if maxworktime is not None: