mak-gitdev / HA_enoceanmqtt

Home Assistant wrapper for enocean-mqtt (https://github.com/embyt/enocean-mqtt)
GNU General Public License v3.0
54 stars 14 forks source link

Bug in D2-03-0A (NodOn Soft Button) #116

Closed OlwinFroon closed 6 months ago

OlwinFroon commented 6 months ago

The problem

Only the first single tap registers. A second single tap won't, because the "single" state doesn't revert to "off".

Same with double tap.

Long press/release doesn't show the issue because there's two separate sensors for this.

The long_released sensor remains "on", though, until something else happens.

What type of installation are you running?

Addon

What version of HA_enoceanmqtt has the issue?

No response

What was the last working version of HA_enoceanmqtt?

No response

What type of Home Assitant installation are you running?

None

Anything in the logs that might be useful to solve the issue? (Strongly recommended if applicable)

Example: 3 single taps

E2M log:
2024-01-13 17:06:32,206 INFO: received: 81:00:CE:F3->FF:FF:FF:FF (-82 dBm): 0x01 ['0xd2', '0xc', '0x1', '0x81', '0x0', '0xce', '0xf3', '0x0'] ['0x0', '0xff', '0xff', '0xff', '0xff', '0x52', '0x0'] OrderedDict()
2024-01-13 17:06:57,389 INFO: received: 81:00:CE:F3->FF:FF:FF:FF (-88 dBm): 0x01 ['0xd2', '0xc', '0x1', '0x81', '0x0', '0xce', '0xf3', '0x0'] ['0x0', '0xff', '0xff', '0xff', '0xff', '0x58', '0x0'] OrderedDict()
2024-01-13 17:07:52,054 INFO: received: 81:00:CE:F3->FF:FF:FF:FF (-80 dBm): 0x01 ['0xd2', '0xc', '0x1', '0x81', '0x0', '0xce', '0xf3', '0x0'] ['0x0', '0xff', '0xff', '0xff', '0xff', '0x50', '0x0'] OrderedDict()

HA log shows
17:06:32 - 'single' switched on
17:06:57 - 'last seen' updated
17:07:52 - 'last seen' updated
and the "single" sensor remains active.

Additional information

No response

OlwinFroon commented 6 months ago

The NodOn button doesn't send "release" for a single or double tap, just the one for long_release.

mak-gitdev commented 6 months ago

Hi @OlwinFroon,

The binary sensors for D2-03-0A are only there to "register" the latest event received from the device. They are not great at all for automations. That's why they are disabled by default. There are triggers defined for that.

Have a look at this wiki page to know how to use D2-03-0A for automations.

OlwinFroon commented 6 months ago

Gotcha, thank you.