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

Parent/Child colors reversed #96

Closed
2 tasks done
GitHubGoody opened this issue Feb 20, 2023 · 16 comments
Closed
2 tasks done

Parent/Child colors reversed #96

GitHubGoody opened this issue Feb 20, 2023 · 16 comments
Assignees
Labels
bug Something isn't working

Comments

@GitHubGoody
Copy link

Checklist:

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

Release with the issue: v1.9.3

Last working release (if known): N/A

Browser and Operating System: Edge on Windows 10

Description of problem:

Sometimes, the colors between parent and child display reversed as shown in the screenshot below between Grid and Outside.

Javascript errors shown in the web inspector (if applicable): None

Additional information:

image

@GitHubGoody GitHubGoody added the bug Something isn't working label Feb 20, 2023
@MindFreeze MindFreeze self-assigned this Mar 15, 2023
@MindFreeze
Copy link
Owner

I can't reproduce this or figure out how it might happen

@MindFreeze
Copy link
Owner

closing as unreproducable

@MindFreeze MindFreeze closed this as not planned Won't fix, can't repro, duplicate, stale Apr 24, 2023
@GitHubGoody
Copy link
Author

@MindFreeze Is there something I could do to help you reproduce it?

@MindFreeze
Copy link
Owner

@GitHubGoody an example config to reproduce this might help

@MindFreeze MindFreeze reopened this May 2, 2023
@starox
Copy link

starox commented May 16, 2023

I just have some strange behaviour where the 4th section color was inversed with the 1st.
It was caused by an improper color name, ie: light_blue instead LightBlue
@GitHubGoody : Eventually check your colors

@GitHubGoody
Copy link
Author

@MindFreeze and @starox

Here is the config excerpt for those two sections:

        - entities:
              # Main Panel
            - entity_id: sensor.main_panel_123_1d
              name: Grid
              color_on_state: true
              color_limit: 90
              color_above: red
              color_below: darkslateblue
              children:
                - sensor.inside_daily_energy
                - sensor.outside_daily_energy
                - sensor.garage_daily_energy
                - sensor.receptacles_energy
                - sensor.main_crawlspace_dehumidifier_7_1d
                - sensor.sunroom_crawlspace_dehumidifier_and_sump_pump_8_1d
        - entities:
              ## Outside
            - entity_id: sensor.outside_daily_energy
              name: Outside
              color: green
              children:
                - sensor.terrace_energy
                - sensor.outside_lights_energy
                - sensor.pool_energy
              ## Inside
            - entity_id: sensor.inside_daily_energy
              name: Inside
              color: whitesmoke
              children:
                - sensor.upstairs_daily_energy
                - sensor.downstairs_daily_energy
                - sensor.ac_subpanel_1_1d

The colors all seem to be working otherwise.

@silfax
Copy link

silfax commented Dec 2, 2023

Ok, having a similar problem. I say it is similar since the colors can be reversed but also totally wrong. First I encountered the reversed colors issue, but after doing lots of changes in the code, I ended up with the result in the second screenshot. I really don't know what info would be relevant, therefore I leave below all my 'sections' section of the card. Please note that this always occurs only at the top, not with the specific entities shown in the screenshot. Being an energy card, any of the groups can move at the top and the colors are always reverted for the topmost group. Screenshots and code below.

Screenshot 1, colors reversed, sadly I don't have the code anymore:

Screenshot 2, wrong/messed up colors, code for this issue below:
image

sections:
  - entities:
      - type: entity
        entity_id: sensor.inverter_active_power
        children:
          - sensor.putere_instantanee
          - sensor.power_meter_active_power
        color: green
        name: Productie
      - type: entity
        entity_id: sensor.putere_instantanee
        children:
          - sensor.putere_instantanee
        subtract_entities:
          - sensor.inverter_active_power
        color: red
        name: Import
  - entities:
      - type: entity
        entity_id: sensor.power_meter_active_power
        color: red
        name: Export
      - type: entity
        children:
          - sensor.terasa_mansarda_current_consumption
          - sensor.priza_centrala_termica_energy_power
          - sensor.priza_frigider_energy_power
          - sensor.priza_living_energy_power
        entity_id: sensor.putere_instantanee
        remaining:
          name: Alti consumatori
          color: '#295096'
        name: Consum total
        color: purple
        sort_group_by_parent: true
  - entities:
      - type: entity
        children:
          - sensor.terasa_parter_current_consumption
          - sensor.terasa_mansarda_current_consumption
        entity_id: sensor.terasa_mansarda_current_consumption
        add_entitites:
          - sensor.terasa_parter_current_consumption
        color: '#4DE738'
        name: Prize exterior
      - type: entity
        children:
          - sensor.priza_centrala_termica_energy_power
          - sensor.priza_pompa_basa_energy_power
        add_entitites:
          - sensor.priza_pompa_basa_energy_power
        entity_id: sensor.priza_centrala_termica_energy_power
        name: Utilitati
        color: red
      - type: entity
        entity_id: sensor.priza_frigider_energy_power
        children:
          - sensor.priza_frigider_energy_power
          - sensor.priza_cuptor_microunde_energy_power
          - sensor.priza_espressor_energy_power
          - sensor.priza_uscator_prosoape_energy_power
          - sensor.priza_masina_spalat_rufe_energy_power
        add_entities:
          - sensor.priza_cuptor_microunde_energy_power
          - sensor.priza_espressor_energy_power
          - sensor.priza_uscator_prosoape_energy_power
          - sensor.priza_masina_spalat_rufe_energy_power
        color: orange
        name: Electrocasnice
      - type: entity
        children:
          - sensor.garaj_current_consumption
          - sensor.priza_living_energy_power
          - sensor.priza_living_2_energy_power
          - sensor.priza_living_3_energy_power
          - sensor.priza_birou_1_energy_power
          - sensor.priza_birou_2_energy_power
          - sensor.priza_birou_3_energy_power
          - sensor.priza_retea_mansarda_energy_power_2
        add_entities:
          - sensor.garaj_current_consumption
          - sensor.priza_living_2_energy_power
          - sensor.priza_living_3_energy_power
          - sensor.priza_birou_1_energy_power
          - sensor.priza_birou_2_energy_power
          - sensor.priza_birou_3_energy_power
          - sensor.priza_retea_mansarda_energy_power_2
        subtract_entities:
          - sensor.terasa_mansarda_current_consumption
        entity_id: sensor.priza_living_energy_power
        name: IT & Media
        color_on_state: false
    sort_by: state
    sort_dir: desc
    sort_group_by_parent: true
  - entities:
      - type: entity
        children: []
        entity_id: sensor.garaj_current_consumption
        name: Garaj
      - type: entity
        children: []
        entity_id: sensor.priza_centrala_termica_energy_power
        color: red
        name: Centrala termica
      - type: entity
        children: []
        entity_id: sensor.priza_pompa_basa_energy_power
        color: red
        name: Pompa basa
      - type: entity
        children: []
        entity_id: sensor.terasa_parter_current_consumption
        color: '#4DE738'
        name: Terasa parter
      - type: entity
        children: []
        entity_id: sensor.terasa_mansarda_current_consumption
        color: '#4DE738'
        name: Terasa mansarda
      - type: entity
        entity_id: sensor.priza_frigider_energy_power
        children: []
        color: orange
        name: Frigider
      - type: entity
        children: []
        entity_id: sensor.priza_cuptor_microunde_energy_power
        color: orange
        name: Cuptor microunde
      - type: entity
        children: []
        entity_id: sensor.priza_espressor_energy_power
        color: orange
        name: Espressor
      - type: entity
        children: []
        entity_id: sensor.priza_uscator_prosoape_energy_power
        color: orange
        name: Uscator prosoape
      - type: entity
        children: []
        entity_id: sensor.priza_masina_spalat_rufe_energy_power
        color: orange
        name: Masina spalat rufe
      - type: entity
        children: []
        entity_id: sensor.priza_living_energy_power
        name: Living 1
      - type: entity
        children: []
        entity_id: sensor.priza_living_2_energy_power
        name: Living 2
      - type: entity
        children: []
        entity_id: sensor.priza_living_3_energy_power
        name: Living 3
      - type: entity
        children: []
        entity_id: sensor.priza_birou_1_energy_power
        name: Birou 1
      - type: entity
        children: []
        entity_id: sensor.priza_birou_2_energy_power
        name: Birou 2
      - type: entity
        children: []
        entity_id: sensor.priza_birou_3_energy_power
        name: Birou 3
      - type: entity
        children: []
        entity_id: sensor.priza_retea_mansarda_energy_power_2
        name: Retea mansarda
    sort_by: state
    sort_dir: desc
    sort_group_by_parent: true
    min_width: 10

@silfax
Copy link

silfax commented Dec 2, 2023

On more thing that may help to narrow it down. If I change the first section from the code posted in the previous comment to the one below, I get the card from the screenshot below. Parent/child relationship is lost, but the colors are correct. No other changes to the code posted in the previous comment.
image

  - entities:
      - type: entity
        entity_id: sensor.inverter_active_power
        children:
          - sensor.putere_instantanee
          - sensor.power_meter_active_power
        color: green
        name: Productie
      - type: entity
        entity_id: sensor.putere_instantanee
        children: []
        subtract_entities:
          - sensor.inverter_active_power
        color: red
        name: Import

@silfax
Copy link

silfax commented Dec 6, 2023

Checked with latest release and I still get this. Thanks!

Opera Snapshot_2023-12-06_155651_ipv15 tk

@MindFreeze
Copy link
Owner

@silfax this has to be a cache issue. The bug is definitely fixed

@silfax
Copy link

silfax commented Dec 6, 2023

Then it's maybe something in my specific card configuration. Tried it with a never used before browser and I still get the same wrong colors. Thanks anyway!

@silfax
Copy link

silfax commented Dec 6, 2023

@GitHubGoody Can you confirm that v1.19.0 solves the issue for you? Thanks!

@GitHubGoody
Copy link
Author

@GitHubGoody Can you confirm that v1.19.0 solves the issue for you? Thanks!

It appears to be solved for my configuration. Are you sure you're on v1.19.0? For some reason, HACS wasn't prompting me to update it, so I was on v1.18.0 and had to select Redownload from the 3 dots menu. The issue was there before the redownload and fixed after. No cache clearing required.

@MindFreeze
Copy link
Owner

@silfax the version is logged in the dev console. You can check that

@GitHubGoody
Copy link
Author

Thanks, It's also in HACS in the top left.

@silfax
Copy link

silfax commented Dec 6, 2023

Hmm... Strange. HACS was showing 1.19.0 installed, but after redownloading it, the card suddenly looks right. No need to clear the cache. Thank you both!

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

No branches or pull requests

4 participants