Commit 3fc413e
committed
fix: Multi-button service mapping improvements.
For multi-button devices, we were waiting to populate the mappings to
associate the multiple button service resources to the single device
record from the API responses we perform during the `init` handler.
This could lead to inconsistent state or failure to maintain mappings in
situations where those API calls failed for any reason.
We still need to make those API calls during `init` to establish the
current state of the device, but we now populate the mappings from
cached data (if it exists) instead of relying on those initial API calls
to resolve properly.1 parent a512c65 commit 3fc413e
File tree
1 file changed
+19
-0
lines changed- drivers/SmartThings/philips-hue/src/handlers/lifecycle_handlers
1 file changed
+19
-0
lines changedLines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
122 | 141 | | |
123 | 142 | | |
124 | 143 | | |
| |||
0 commit comments