Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[deconz] Battery value is no longer shown for ZHABattery sensor #7920

Closed
MHerbst opened this issue Jun 14, 2020 · 1 comment · Fixed by #8005
Closed

[deconz] Battery value is no longer shown for ZHABattery sensor #7920

MHerbst opened this issue Jun 14, 2020 · 1 comment · Fixed by #8005
Labels
bug An unexpected problem or unintended behavior of an add-on

Comments

@MHerbst
Copy link
Contributor

MHerbst commented Jun 14, 2020

The battery sensor that is created for Ikea blinds no longer delivers a value for the "battery_level" channel.

The trace log shows that the value is correctly retrieved, but this is the only message regarding the battery level:

20:50:53.730 [ient-common-184] TRACE o.o.b.d.i.h.SensorBaseThingHandler:270 - deconz:batterysensor:c291659a:086bd7fffe602991010001 received SensorState{dark=null, daylight=null, lightlevel=null, lux=null, temperature=null, humidity=null, open=null, fire=null, water=null, alarm=null, tampered=null, vibration=null, carbonmonoxide=null, pressure=null, presence=null, power=null, battery=85, consumption=null, voltage=null, current=null, status=null, buttonevent=null, gesture=null, lastupdated='2020-06-14T18:41:24.823'}

The lastupdated channel is correctly updated but not the battery_level.

It seems that the battery_level ist handle in the wrong method:


contains a case for CHANNEL_BATTERY_LEVEL but the other valueUpdated method (
protected void valueUpdated(String channelID, SensorState newState, boolean initializing) {
) is called instead.

This problem has been introduced with one of the latest commit. With older versions it worked correctly.

Tested with commit f9e5454

@MHerbst MHerbst added the bug An unexpected problem or unintended behavior of an add-on label Jun 14, 2020
@J-N-K
Copy link
Member

J-N-K commented Jun 22, 2020

The reason is that most sensors report it as config, while Ikea reports it as state. The support for that was unintentionally dropped in the refactoring #7828. I'll provide a PR to add it back.

cweitkamp pushed a commit that referenced this issue Jun 24, 2020
Fixes #7920

Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
knikhilwiz pushed a commit to knikhilwiz/openhab2-addons that referenced this issue Jul 12, 2020
Fixes openhab#7920

Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
CSchlipp pushed a commit to CSchlipp/openhab-addons that referenced this issue Jul 26, 2020
Fixes openhab#7920

Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
Signed-off-by: CSchlipp <christian@schlipp.de>
MPH80 pushed a commit to MPH80/openhab-addons that referenced this issue Aug 3, 2020
Fixes openhab#7920

Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
Signed-off-by: MPH80 <michael@hazelden.me>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this issue Aug 31, 2020
Fixes openhab#7920

Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this issue Aug 31, 2020
Fixes openhab#7920

Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this issue Aug 31, 2020
Fixes openhab#7920

Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this issue Aug 31, 2020
Fixes openhab#7920

Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
DaanMeijer pushed a commit to DaanMeijer/openhab-addons that referenced this issue Sep 1, 2020
Fixes openhab#7920

Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
Signed-off-by: Daan Meijer <daan@studioseptember.nl>
markus7017 pushed a commit to markus7017/openhab-addons that referenced this issue Sep 19, 2020
Fixes openhab#7920

Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants