Commit d2c987d
authored
fix: connection_entity_id and add_entities/subtract_entities (#199)
* Fix connection_entity_id
If a connection_entity_id was specified, it was not added to the list of
entities for which to retrieve the state. It seems that
connection_entity_id only happened to work if that entity_id was also
used elsewhere.
* Fix add_entities/subtract_entities normalization with unit conversion
When converting energy units, all the conversions take place in
energy.ts, and the results can be directly added together. However, when
_getMemoizedState was adding the values of add_entities, it didn't
realize that the entities to add were already the correct values, and it
erroneously normalized them. Now, the same "this has already been
converted" logic used for the main entity state is also used for the
add_entity state.
* PR comments1 parent d5f9289 commit d2c987d
2 files changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
244 | | - | |
| 244 | + | |
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
| |||
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
255 | | - | |
| 255 | + | |
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
157 | 162 | | |
158 | 163 | | |
159 | 164 | | |
| |||
0 commit comments