Skip to content

Commit

Permalink
Viomi: fix status parsing (Hypfer#641)
Browse files Browse the repository at this point in the history
  • Loading branch information
rumpeltux committed Jan 29, 2021
1 parent 2790d12 commit 6435b8a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/robots/viomi/ViomiValetudoRobot.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ class ViomiValetudoRobot extends MiioValetudoRobot {
const response = await this.sendCommand("get_prop", STATE_PROPERTIES);

if (response) {
this.parseAndUpdateState(response[0]);
let statusDict = {};
STATE_PROPERTIES.forEach((key, index) => statusDict[key] = response[index]);
this.parseAndUpdateState(statusDict);
}

return this.state;
Expand Down

0 comments on commit 6435b8a

Please sign in to comment.