fixed state value of power devices
This commit is contained in:
parent
9bda2e8e0d
commit
50f17a636d
@ -142,6 +142,7 @@ DeviceManager::DeviceError DevicePluginGenericInterfaces::executeAction(Device *
|
|||||||
|
|
||||||
if (device->deviceClassId() == socketDeviceClassId) {
|
if (device->deviceClassId() == socketDeviceClassId) {
|
||||||
if (action.actionTypeId() == socketPowerActionTypeId) {
|
if (action.actionTypeId() == socketPowerActionTypeId) {
|
||||||
|
device->setStateValue(socketPowerStateTypeId, action.param(socketPowerActionPowerParamTypeId).value());
|
||||||
return DeviceManager::DeviceErrorNoError;
|
return DeviceManager::DeviceErrorNoError;
|
||||||
}
|
}
|
||||||
return DeviceManager::DeviceErrorActionTypeNotFound;
|
return DeviceManager::DeviceErrorActionTypeNotFound;
|
||||||
@ -149,6 +150,7 @@ DeviceManager::DeviceError DevicePluginGenericInterfaces::executeAction(Device *
|
|||||||
|
|
||||||
if (device->deviceClassId() == lightDeviceClassId) {
|
if (device->deviceClassId() == lightDeviceClassId) {
|
||||||
if (action.actionTypeId() == lightPowerActionTypeId) {
|
if (action.actionTypeId() == lightPowerActionTypeId) {
|
||||||
|
device->setStateValue(lightPowerStateTypeId, action.param(lightPowerActionPowerParamTypeId).value());
|
||||||
return DeviceManager::DeviceErrorNoError;
|
return DeviceManager::DeviceErrorNoError;
|
||||||
}
|
}
|
||||||
return DeviceManager::DeviceErrorActionTypeNotFound;
|
return DeviceManager::DeviceErrorActionTypeNotFound;
|
||||||
@ -156,6 +158,7 @@ DeviceManager::DeviceError DevicePluginGenericInterfaces::executeAction(Device *
|
|||||||
|
|
||||||
if (device->deviceClassId() == heatingDeviceClassId) {
|
if (device->deviceClassId() == heatingDeviceClassId) {
|
||||||
if (action.actionTypeId() == heatingPowerActionTypeId) {
|
if (action.actionTypeId() == heatingPowerActionTypeId) {
|
||||||
|
device->setStateValue(heatingPowerStateTypeId, action.param(heatingPowerActionPowerParamTypeId).value());
|
||||||
return DeviceManager::DeviceErrorNoError;
|
return DeviceManager::DeviceErrorNoError;
|
||||||
}
|
}
|
||||||
return DeviceManager::DeviceErrorActionTypeNotFound;
|
return DeviceManager::DeviceErrorActionTypeNotFound;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user