mirror of
https://github.com/tsightler/ring-mqtt.git
synced 2025-09-26 21:01:12 +08:00
Merge pull request #899 from wahflz/dev
Fixed bug that incorrectly set location mode to 'disarmed'. Caused by…
This commit is contained in:
@@ -17,9 +17,9 @@ export default class ModesPanel extends RingPolledDevice {
|
||||
}
|
||||
}
|
||||
|
||||
publishState(data) {
|
||||
async publishState(data) {
|
||||
const isPublish = Boolean(data === undefined)
|
||||
const mode = (isPublish) ? this.device.location.getLocationMode() : data
|
||||
const mode = (isPublish) ? (await this.device.location.getLocationMode()).mode : data
|
||||
// Publish device state if it's changed from prior state
|
||||
if (this.data.currentMode !== mode || isPublish) {
|
||||
this.data.currentMode = mode
|
||||
|
Reference in New Issue
Block a user