perbaikan kontrol device
This commit is contained in:
@@ -146,18 +146,15 @@ export class DeviceControlComponent {
|
||||
}
|
||||
|
||||
switchChanged(ev, data) {
|
||||
console.log(ev);
|
||||
console.log(data);
|
||||
|
||||
// const requestData = {
|
||||
// device_id: data.device_id,
|
||||
// switch: data.mapping[0].switch,
|
||||
// value: ev,
|
||||
// command_type: "on_off",
|
||||
// };
|
||||
// this.deviceService.deviceSwitch(requestData).subscribe((res) => {
|
||||
// console.log(res);
|
||||
// });
|
||||
const requestData = {
|
||||
device_id: data.device_id,
|
||||
switch: data.mapping[0].switch,
|
||||
value: ev,
|
||||
command_type: "on_off",
|
||||
};
|
||||
this.deviceService.deviceSwitch(requestData).subscribe((res) => {
|
||||
console.log(res);
|
||||
});
|
||||
}
|
||||
|
||||
addFieldValue() {}
|
||||
|
||||
Reference in New Issue
Block a user