Skip to content

Commit 4347f21

Browse files
authored
fix set_switch_onoff (#113)
1 parent ebc3815 commit 4347f21

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

e3dc/_e3dc.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -391,15 +391,13 @@ def set_switch_onoff(
391391
True/False
392392
393393
"""
394-
cmd = "on" if value else "off"
395-
396394
result = self.sendRequest(
397395
(
398396
RscpTag.HA_REQ_COMMAND_ACTUATOR,
399397
RscpType.Container,
400398
[
401399
(RscpTag.HA_DATAPOINT_INDEX, RscpType.Uint16, switchID),
402-
(RscpTag.HA_REQ_COMMAND, RscpType.CString, cmd),
400+
(RscpTag.HA_REQ_COMMAND, RscpType.CString, value),
403401
],
404402
),
405403
keepAlive=keepAlive,

0 commit comments

Comments
 (0)