Skip to content

Commit

Permalink
Added addSwitchActuatorState to SetActuatorStatesRequest.php
Browse files Browse the repository at this point in the history
Fixed xml-namespace being removed by SimpleXML by adding a "xmns" ('xsi:type' was changed to 'type' in SetActuatorStatesRequest.php)
  • Loading branch information
Jopi24 committed Jan 11, 2014
1 parent bf62e2e commit f50095a
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions Request/SetActuatorStatesRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
}
}

0 comments on commit f50095a

Please sign in to comment.