Fixes #94 Gropups state change event parsing
This commit is contained in:
parent
d0d1ab2740
commit
df04d000b2
@ -28,9 +28,9 @@ class EntityCollection {
|
|||||||
|
|
||||||
void updateState(Map rawStateData) {
|
void updateState(Map rawStateData) {
|
||||||
if (isExist(rawStateData["entity_id"])) {
|
if (isExist(rawStateData["entity_id"])) {
|
||||||
updateFromRaw(rawStateData["new_state"]);
|
updateFromRaw(rawStateData["new_state"] ?? rawStateData["old_state"]);
|
||||||
} else {
|
} else {
|
||||||
addFromRaw(rawStateData["new_state"]);
|
addFromRaw(rawStateData["new_state"] ?? rawStateData["old_state"]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user