dresden-elektronik / deconz-rest-plugin

deCONZ REST-API plugin to control ZigBee devices
BSD 3-Clause "New" or "Revised" License
1.9k stars 498 forks source link

lidl/hg08673 / TS011F - Removed stray ";" that stopped consumption from working #7779

Closed Akulatraxas closed 4 months ago

Akulatraxas commented 4 months ago

Got a few of these devices and noticed that power was reading fine but consumption was always 0. Noticed a stray ";" in the DDF. After removing it the consumption reading is working.

And maybe a small request: I know this is not the homeassistant Community but i am sure someone can point me to the right place: I noticed that in the output of the REST call for this device is the voltage reading as well. That does not show up in HA. Where in this process is decided what part of the REST output is included in the HA Entitites ?

manup commented 4 months ago

While the change is fine for cosmetics, it doesn't make any difference for the Javascript execution.

Akulatraxas commented 4 months ago

@manup that might be, but when i add the ; back in consumption reporting of the device stays at 0. at least i can reproduce it by adding it back in for functioning devices.

Smanar commented 4 months ago

Hello, and you make other thing after the edition ? (that can impact too the result), "hot reload" or restart deconz or re-include.

And you can reproduce the issue every time ?

I don't understand because all my JS code in DDF are using the ";" ........

manup commented 4 months ago

It's a bit strange yeah, strictly speaking in Javascript the ; shouldn't make any difference. However maybe the DuktapeJS engine does something fugly here, since this isn't the first PR doing this I'll schedule some tests to see what's going on. (maybe it's a problem with one liners and no newline character at the end, but how knows..)

github-actions[bot] commented 4 months ago

Hey @Akulatraxas, thanks for your pull request!

[!TIP] Modified bundles can be downloaded here. Relative expire date

DDF Bundles changes

Modified

Validation

[!TIP] Everything is fine !

:clock230: Updated for commit 870c0be6eae0678f88ef92d44f9908e13067ae80

github-actions[bot] commented 4 months ago

This pull request is now merged. The new DDF bundles have been uploaded to the store.

DDF Bundles

Modified

:clock1130: Updated for commit acd0adce32e5c3c3ea7e6b3329a6e86fb9d96801