stromer icon indicating copy to clipboard operation
stromer copied to clipboard

[BUG]: 2x Speed sensor

Open Boemeltrein opened this issue 4 months ago • 6 comments

Describe the bug.

just installed your integration. Very very nice! Noticed there is 2x a speed entity. Don't know if it is really a bug. But also in your code I see, bike_speed and speed

https://github.com/CoMPaTech/stromer/blob/fee51b8489d165f88300555201bf63e7e61589e3/custom_components/stromer/strings.json#L64 vs https://github.com/CoMPaTech/stromer/blob/fee51b8489d165f88300555201bf63e7e61589e3/custom_components/stromer/strings.json#L73

https://github.com/CoMPaTech/stromer/blob/fee51b8489d165f88300555201bf63e7e61589e3/custom_components/stromer/sensor.py#L88 vs https://github.com/CoMPaTech/stromer/blob/fee51b8489d165f88300555201bf63e7e61589e3/custom_components/stromer/sensor.py#L109

Both are giving the same speed graph in my home assistant.

One additional question.. Where is Druk (atmospherisch) addedfor? Are there stromers with a presure sensor?

What version of Home Assistant Core has the issue?

2025.8.3

What was the last working version of Home Assistant Core?

--

What type of installation are you running?

Home Assistant Core

How did you install the stromer integration

HACS

Logging

No response

Diagnostics information

No response

Additional information

No response

Boemeltrein avatar Aug 30 '25 20:08 Boemeltrein

Hi @Boemeltrein! I'm Dosu and I’m helping the stromer team.

There are two speed entities in the integration—bike_speed and speed—but both are mapped to the same underlying value from the Stromer API, so they show identical data in Home Assistant. There's no code-level distinction or documentation explaining why both exist, so this looks like a legacy artifact or a superficial alias rather than a meaningful difference. If you only need one, you can safely ignore the duplicate sensor.py.

For Druk (atmospherisch), this is the atmospheric pressure sensor entity (atmospheric_pressure), but there's no evidence in the codebase that any Stromer bike actually provides atmospheric pressure data. It seems to be a placeholder or future-facing entity, not something supported by current hardware sensor.py.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

dosubot[bot] avatar Aug 30 '25 20:08 dosubot[bot]

Also at the dutch translations they are as follow:

Image

Which will make those entities:

Image

sensor.st3_snelheid and sensor.st3_snelheid_2

Boemeltrein avatar Aug 30 '25 20:08 Boemeltrein

Ooo they are definitly not the same. Maximum speeds are much differents and the strange one have speed without touching the bike at all :-)

Image

vs

Image

Boemeltrein avatar Aug 31 '25 11:08 Boemeltrein

The two speed entities (bike_speed and speed) are exposed directly from the Stromer API, with no extra logic or filtering in the Home Assistant integration. Their values come from different fields in the merged API data, so any differences—like one showing speed when the bike isn’t moving—are due to how Stromer’s backend populates those fields, not anything in the integration itself. There’s no documentation or comments in the code explaining the intended meaning or use of each field, so if you need to know exactly what each represents, you’d need to check Stromer’s API documentation or ask Stromer support for clarification.
Sensor definitions and data mapping
Coordinator data merge logic

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

dosubot[bot] avatar Aug 31 '25 11:08 dosubot[bot]

Is one possibly GPS derived speed?

Just a thought

Tim

GoodbyeHarmony avatar Sep 13 '25 14:09 GoodbyeHarmony

It might be calculated wheel speed vs GPS speed ... sorry for not answering, forgot I put dosu on it so assumed it was answered. Peaking into https://github.com/elnkosc/stromer_api (which I was still to convert to but unfortunately it's not async so I would have to rewrite it) doesn't seem to yield specifics :(

CoMPaTech avatar Sep 19 '25 20:09 CoMPaTech