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

[bug]: Wrong value for first Alias calculation of the day #1761

Open
1 task done
5G7K opened this issue Nov 15, 2024 · 2 comments
Open
1 task done

[bug]: Wrong value for first Alias calculation of the day #1761

5G7K opened this issue Nov 15, 2024 · 2 comments

Comments

@5G7K
Copy link

5G7K commented Nov 15, 2024

No existing issues.

  • There is no existing issue for my problem.

Description

Alias for energy meter which will be increased by old meter end value.
(Math.round(val * 100) / 100) + 11608.84

Org value: 5206 kWh
Alias value ~16814kWh

Original values:
image

Trigger auf Alias - First log of the day
image

2024-11-15 00:01:02.085 - debug: javascript.0 (14413) script.js.Lovelace.Lovelace_ApexChart: Aktualisierung LWP mit: 28422.8Cache: [object Object]
--
2024-11-15 00:01:02.086 - debug: javascript.0 (14413) script.js.Lovelace.Lovelace_ApexChart: Aktualisierung LWP mit: 16813.96Cache: [object Object]
2024-11-15 00:01:14.322 - debug: javascript.0 (14413) script.js.Lovelace.Lovelace_ApexChart: Aktualisierung LWP mit: 16813.97Cache: [object Object]

First triggered Alias Value is 28422.8 (16814 + 11608) which is the old increased value + a second increasement. This is wrong.
Second triggered value is correct.
But at 00:01 there is only one value change. Don't know why there are two triggers with a wrong and the correct value...

Reproduction instruction

No response

JS-controller version

7.02

Node version

20.18.0

@foxriver76
Copy link
Contributor

This is not js-controller it’s JavaScript

@foxriver76 foxriver76 transferred this issue from ioBroker/ioBroker.js-controller Nov 15, 2024
@5G7K
Copy link
Author

5G7K commented Nov 15, 2024

hm, ok. Then I will add a few debug logs at this point and try to narrow down the problem further

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants