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

Columns missing using autoconfig #162

Open
2 tasks done
rmu1987 opened this issue Feb 2, 2024 · 8 comments
Open
2 tasks done

Columns missing using autoconfig #162

rmu1987 opened this issue Feb 2, 2024 · 8 comments
Assignees
Labels
bug Something isn't working stale

Comments

@rmu1987
Copy link

rmu1987 commented Feb 2, 2024

Checklist:

  • I updated to the latest version available
  • I cleared the cache of my browser

Release with the issue:
I currently run:
Home assistant version: 2024.1.6
Sankey Chart version: 1.20.0

Last working release (if known):
Unknown, but it is doing strange since 9 december 2023 (found it using the date picker)

Browser and Operating System:
Firefox, Safari and Chrome on 2 different Macbooks
HA app on iOS

Description of problem:
I'm using the autoconfig option, it worked as expected and was showing like this:
Screenshot 2024-02-02 at 13 38 46
So:

  • Energy consumption Tarif 1
  • Total consumption
  • Energy consumption per Area
  • Energy consumption per device

On 9 december (and later dates) it started looking like:
Screenshot 2024-02-02 at 13 38 54
So:

  • Energy consumption per Area
  • Energy consumption per device

I don't know why this is happening and the two columns are missing, as far i'm aware of i did not change something in the Energy Dashboard.

Card configuration:
Screenshot 2024-02-02 at 13 43 22

@rmu1987 rmu1987 added the bug Something isn't working label Feb 2, 2024
@MindFreeze
Copy link
Owner

@rmu1987 There was a change in how HA manages these stats. I fixed something related since then. Do you still have this issue?

@rmu1987
Copy link
Author

rmu1987 commented Feb 25, 2024

Hello @MindFreeze i installed the update a couple of days ago but the issue is still the same unfortunately.

@MindFreeze
Copy link
Owner

@rmu1987 Can you enable the "print auto generated yaml" option and see what config it prints out for Dec 8 and Dec 9?Also can you check if you still have "Energy consumption Tarif 1" in the energy dashboard please? It is behaving as if it was removed.

@rmu1987
Copy link
Author

rmu1987 commented Feb 26, 2024

@MindFreeze the yaml print out is the same for 7, 8 and 9 december and also the same for today.
I wanted to copy it but that does not seem to be possible so here are screenshots:
image
image

All the mentioned entities are the same as defined in the Energy Dashboard and are all still working as expected. Also the Energy dashboard is showing data on every day.

@MindFreeze
Copy link
Owner

MindFreeze commented Feb 27, 2024

@rmu1987 This config doesn't look right. I assume sensor.energy_production_tarif_... is energy exported to the grid?
Do you mind running this command in the browser console and pasting the result here JSON.stringify((await hassConnection).conn._energy.prefs.energy_sources) ?

It will be easier to fix this if I can reproduce your setup.

@rmu1987
Copy link
Author

rmu1987 commented Feb 27, 2024

@MindFreeze
"I assume sensor.energy_production_tarif... is energy exported to the grid?"_
That's correct! Currently i don't have the possibility to export energy to the grid but i defined it in the Energy Dashboard anyway. It is in there from way before i started using ha-sankey-chart.

_"Do you mind running this command in the browser console and pasting the result here JSON.stringify((await hassConnection).conn.energy.prefs.energy_sources) ?"
Steps i did:

  1. Open firefox and open the page which displays the sankey-chart
  2. Start the web developer tools -> tab: Console
  3. Enter the command mentioned above - Nothing shows in the console
  4. Refreshed the page - nothing shows in the console
  5. Tried steps 3 and 5 also on the energy dashboard - Nothing shows in the console

@MindFreeze MindFreeze self-assigned this Mar 1, 2024
@pipetboy
Copy link

pipetboy commented Jun 2, 2024

I'm having a similar issue, but I'm losing the last column. I'm using the autoconfig option, and this is the autogenerated yaml is below. It started on May 25. The data on may 24 seems fine.
JSON.stringify((await hassConnection).conn._energy.prefs.energy_sources) doesn't show anything.

Sankey May 24 May 25

layout: auto
height: 200
unit_prefix: k
round: 1
convert_units_to: ''
co2_intensity_entity: sensor.co2_signal_co2_intensity
gas_co2_intensity: 66.6
min_box_size: 3
min_box_distance: 5
show_states: true
show_units: true
energy_date_selection: true
sections:

  • entities:
    • entity_id: sensor.inverter_bijma_energy
      type: entity
      color: var(--warning-color)
      children:
      • sensor.energie_export_hoog_tarief_dagelijks
      • sensor.energie_export_dal_tarief_dagelijks
      • total
    • entity_id: sensor.energie_import_dal_tarief_dagelijks
      add_entities:
      • sensor.energie_import_hoog_tarief_dagelijks
        subtract_entities:
      • sensor.energie_export_dal_tarief_dagelijks
      • sensor.energie_export_hoog_tarief_dagelijks
        type: entity
        children:
      • sensor.energie_export_hoog_tarief_dagelijks
      • sensor.energie_export_dal_tarief_dagelijks
      • total
  • entities:
    • entity_id: sensor.energie_export_hoog_tarief_dagelijks
      subtract_entities:
      • sensor.energie_import_dal_tarief_dagelijks
      • sensor.energie_import_hoog_tarief_dagelijks
        type: entity
        children: []
    • entity_id: sensor.energie_export_dal_tarief_dagelijks
      subtract_entities:
      • sensor.energie_import_dal_tarief_dagelijks
      • sensor.energie_import_hoog_tarief_dagelijks
        type: entity
        children: []
    • entity_id: total
      type: remaining_parent_state
      name: Total Consumption
      children:
      • no_area
      • unknown
  • entities:
    • entity_id: no_area
      type: remaining_child_state
      name: No area
      children:
      • sensor.wasmachine_energy
      • sensor.oven_energy
      • sensor.tv_energy
      • sensor.waterkoker_energy
      • sensor.koffiezetapparaat_energy
      • sensor.computer_energy
      • sensor.bank_energy
      • sensor.spiegel_energy
      • sensor.sterretjes_energy
      • sensor.keukenblad_energy
      • sensor.stofzuiger_energy
      • sensor.kerstboom_energy
      • sensor.fietsaccu_energy
      • sensor.handschoenverwarmer_energy
      • sensor.koelkast_energy
      • sensor.radfan_voor_zigbee_energy
      • sensor.wasemkap_energy
      • sensor.vriezer_energy
    • entity_id: unknown
      type: remaining_parent_state
      name: Unknown
      children: []
      sort_by: state
      sort_group_by_parent: true
  • entities:
    • entity_id: sensor.wasmachine_energy
      type: entity
      children: []
    • entity_id: sensor.oven_energy
      type: entity
      children: []
    • entity_id: sensor.tv_energy
      type: entity
      children: []
    • entity_id: sensor.waterkoker_energy
      type: entity
      children: []
    • entity_id: sensor.koffiezetapparaat_energy
      type: entity
      children: []
    • entity_id: sensor.computer_energy
      type: entity
      children: []
    • entity_id: sensor.bank_energy
      type: entity
      children: []
    • entity_id: sensor.spiegel_energy
      type: entity
      children: []
    • entity_id: sensor.sterretjes_energy
      type: entity
      children: []
    • entity_id: sensor.keukenblad_energy
      type: entity
      children: []
    • entity_id: sensor.stofzuiger_energy
      type: entity
      children: []
    • entity_id: sensor.kerstboom_energy
      type: entity
      children: []
    • entity_id: sensor.fietsaccu_energy
      type: entity
      children: []
    • entity_id: sensor.handschoenverwarmer_energy
      type: entity
      children: []
    • entity_id: sensor.koelkast_energy
      type: entity
      children: []
    • entity_id: sensor.radfan_voor_zigbee_energy
      type: entity
      children: []
    • entity_id: sensor.wasemkap_energy
      type: entity
      children: []
    • entity_id: sensor.vriezer_energy
      type: entity
      children: []
      sort_by: state
      sort_group_by_parent: true
      type: custom:sankey-chart
      show_names: true
      autoconfig:
      print_yaml: true
      min_state: 0

@MindFreeze
Copy link
Owner

Looks like the values we get from HA statistics are 0, so the entities aren't shown. If HA shows data for these days than maybe the calculations have changed again. I wish they exposed this stuff instead making me reimplement it.
The JSON... command should work on the energy dashboard. Maybe try JSON.stringify((await hassConnection).conn._energy.prefs) to get the whole config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

3 participants