cocoro-sdk
Advanced tools
Comparing version 0.2.0 to 0.2.1
{ | ||
"name": "cocoro-sdk", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -130,2 +130,8 @@ import { default as fetchCookie } from 'fetch-cookie'; | ||
status: status, | ||
maker: box.echonetData[0].maker, | ||
model: box.echonetData[0].model, | ||
serialNumber: box.echonetData[0].serialNumber, | ||
box: box, | ||
}), | ||
@@ -162,3 +168,3 @@ ); | ||
const res = await this.sendPOSTRequest( | ||
`/control/deviceControl?boxId=https://db.cloudlabs.sharp.co.jp/clpf/key/${this.appKey}&appSecret=${this.appSecret}`, | ||
`/control/deviceControl?boxId=${device.box.boxId}&appSecret=${this.appSecret}`, | ||
body, | ||
@@ -165,0 +171,0 @@ ); |
@@ -17,2 +17,3 @@ import { default as fetchCookie } from 'fetch-cookie'; | ||
} from './properties'; | ||
import { Box } from './responseTypes'; | ||
import { State8 } from './state'; | ||
@@ -29,2 +30,8 @@ const fetch = fetchCookie(nodeFetch); | ||
status: [PropertyStatus]; | ||
maker: string; | ||
model: string; | ||
serialNumber: string; | ||
box: Box; | ||
} | ||
@@ -48,3 +55,8 @@ /** | ||
propertyUpdates: any; | ||
maker: string; | ||
model: string; | ||
serialNumber: string; | ||
box: Box; | ||
constructor({ | ||
@@ -57,2 +69,6 @@ name, | ||
status, | ||
maker, | ||
model, | ||
serialNumber, | ||
box, | ||
}: DeviceInit) { | ||
@@ -67,2 +83,7 @@ this.name = name; | ||
this.propertyUpdates = {}; | ||
this.maker = maker; | ||
this.model = model; | ||
this.serialNumber = serialNumber; | ||
this.box = box; | ||
} | ||
@@ -208,2 +229,23 @@ | ||
} | ||
/** | ||
* Queues operation mode update | ||
*/ | ||
queueOperationModeUpdate( | ||
mode: | ||
| ValueSingle.OPERATION_OTHER | ||
| ValueSingle.OPERATION_AUTO | ||
| ValueSingle.OPERATION_COOL | ||
| ValueSingle.OPERATION_HEAT | ||
| ValueSingle.OPERATION_DEHUMIDIFY | ||
| ValueSingle.OPERATION_VENTILATION, | ||
) { | ||
this.queuePropertyUpdate({ | ||
valueSingle: { | ||
code: mode, | ||
}, | ||
statusCode: StatusCode.OPERATION_MODE, | ||
valueType: ValueType.SINGLE, | ||
}); | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
67780
2829