diff --git a/Request/SetActuatorStatesRequest.php b/Request/SetActuatorStatesRequest.php index 87a3a79..94c886f 100644 --- a/Request/SetActuatorStatesRequest.php +++ b/Request/SetActuatorStatesRequest.php @@ -50,11 +50,24 @@ public function send($expectedResponse = 'ControlResultResponse', $useSession = public function addRoomTemperatureActuatorState($logicalDeviceId, $pointTemperature, $mode) { $this->actuatorStates[] = array( - 'xsi:type' => 'RoomTemperatureActuatorState', + 'xmlns:xsi:type' => 'RoomTemperatureActuatorState', 'LID' => $logicalDeviceId, 'PtTmp' => $pointTemperature, 'OpnMd' => $mode, 'WRAc' => false ); } -} + + /** + * @param string $logicalDeviceId the logical device id + * @param bool $value the state to set + */ + public function addSwitchActuatorState($logicalDeviceId, $value) + { + $this->actuatorStates[] = array( + 'xmlns:xsi:type' => 'SwitchActuatorState', + 'LID' => $logicalDeviceId, + 'IsOn' => $value + ); + } +} \ No newline at end of file