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

Current month peak 3 always "unknown" #65

Open
longer83 opened this issue Aug 13, 2023 · 1 comment
Open

Current month peak 3 always "unknown" #65

longer83 opened this issue Aug 13, 2023 · 1 comment

Comments

@longer83
Copy link

longer83 commented Aug 13, 2023

Version of the custom_component

2023.6.0

Configuration

Kamstrup Omnipower (DK-8660)
Pow-K+ (amsleser.no, 2.2.21)
MQTT payload (HomeAssistant)
Mosquitto broker (6.2.1)
AmsHan addon (2023.6.0)

Describe the bug

Current month peak 3 always "unknown" despite tariff peaks display correct values.
Screenshot_2023-08-13-14-13-08-07_c3a231c25ed346e59462e84656a70e50
Screenshot_2023-08-13-14-13-29-48_40deb401b9ffe8e1df2f1cc5ba480b12

Debug log


name: Current month peak 3
state_topic: amsleser/realtime
unique_id: ams-xxxx_peaks3
object_id: ams-xxxx_peaks3
unit_of_measurement: kWh
value_template: '{{ value_json.peaks[3] | is_defined }}'
device:
  identifiers:
    - ams-xxxx
  name: AMS reader
  model: Pow-K+
  sw_version: v2.2.21
  manufacturer: amsleser.no
  configuration_url: http://ams-xxxx.local/
device_class: energy
platform: mqtt


Received 15:43:32
QoS: 0
Payload: max: 3
peaks:
  - 3.57
  - 2.45
  - 3.06
threshold: 5
hour:
  use: 1.38
  cost: 0
  produced: 0
  income: 0
day:
  use: 21.9
  cost: 0
  produced: 0
  income: 0
month:
  use: 63.5
  cost: 0
  produced: 0
  income: 

@jeriks31
Copy link

jeriks31 commented Sep 4, 2023

Looks like the index is wrong here value_json.peaks[3]
It should be 2 for the third peak (0,1,2 not 1,2,3)

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