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] v0.2.1: Individual doesn't show secondary info #567

Closed
ma9mwah opened this issue Apr 16, 2024 · 13 comments · Fixed by #592
Closed

[BUG] v0.2.1: Individual doesn't show secondary info #567

ma9mwah opened this issue Apr 16, 2024 · 13 comments · Fixed by #592
Labels
bug Something isn't working

Comments

@ma9mwah
Copy link

ma9mwah commented Apr 16, 2024

Describe the bug
when adding a secondary info to a individual circle it doesn't appear.

image

This is the code the GUI created:

individual:
    - entity: sensor.myenergi_eddi_xxxxxx_power_ct_internal_load
      name: Eddi
      color:
        - 255
        - 255
        - 0
      display_zero: true
      secondary_info:
        entity: sensor.myenergi_eddi_xxxxxx_energy_used_today
        unit_of_measurement: kWh
        decimals: 1
        unit_white_space: true
        display_zero: true
        color_value: false
        accept_negative: false
        icon: ''
      show_direction: false
      color_value: false
      color_icon: true
      display_zero_state: true
      calculate_flow_rate: false
      use_metadata: false
      icon: mdi:water
@ma9mwah ma9mwah added the bug Something isn't working label Apr 16, 2024
@ma9mwah ma9mwah changed the title [BUG] Individual doesn't show secondary info [BUG] v0.2.1: Individual doesn't show secondary info Apr 16, 2024
@cpohli
Copy link

cpohli commented Apr 16, 2024

I can confirm that behaviour, although it seems to only affect the first individual.
i have a second individual configured and it shows the secondary info.

@fhrbek
Copy link

fhrbek commented Apr 16, 2024

I can confirm the same. It does not seem to work for any individual (even if I duplicate my individual to create a second one).

Notes:

  • My secondary info is a string. However, it does not show up even if I choose a random numeric entity.
  • It does not work with a template instead of an entity.
  • If I add an icon then that icon shows up (without the value)

@ma9mwah
Copy link
Author

ma9mwah commented Apr 16, 2024

a few more tests.

I tried adding a second individual to see if it worked like @cpohli said, and it didn't
image

But I thought I'd test another entity (which is none zero) and it worked, even though on the above it has 'Display Zero' ticked
image

Works in individual1 as well
image

so it feels like its the 'Display Zero' is somehow broken.

@cpohli
Copy link

cpohli commented Apr 16, 2024

Tried that to and it seems @ma9mwah is on the right track with his testing.
My secondary on individual2 seems to work, as it is always not 0.
So it seems, that indeed the 'display zero' is not doing it's job on individuals with a Zero :-) ...

@fhrbek
Copy link

fhrbek commented Apr 16, 2024

Tried that to and it seems @ma9mwah is on the right track with his testing. My secondary on individual2 seems to work, as it is always not 0. So it seems, that indeed the 'display zero' is not doing it's job on individuals with a Zero :-) ...

And what about string values? How is "Display zero" supposed to work there? (it does not currently show up with either setting)
With the older version, it worked with streams seamlessly.

@aminorjourney
Copy link

aminorjourney commented Apr 17, 2024

Can confirm this is an issue for me too - Just came here to report the bug and see it's already been noted.

Included my config for info:

Screenshot 2024-04-16 at 9 04 47 PM
type: custom:power-flow-card-plus
full_size: true
entities:
  battery:
    entity:
      consumption: sensor.f150_feed_in_power
      production: sensor.emporia_vue2b_ford_charge_station_pro_power
    name: Ortegas
    color_icon: true
    color_circle: true
    state_of_charge_decimals: 1
    display_zero_tolerance: 50
    use_metadata: false
    color_value: false
    display_state: one_way
    invert_state: true
    icon: mdi:battery-high
    state_of_charge_unit_white_space: true
    color_state_of_charge_value: true
    state_of_charge: sensor.battery_percent_template
  grid:
    entity:
      consumption: sensor.house_grid_energy_total
      production: sensor.calculated_solar_export_to_grid
    use_metadata: true
    name: Grid
    icon: mdi:transmission-tower
    color_icon: true
    color_circle: true
    color_value: false
    display_state: one_way
    display_zero_tolerance: 20
    invert_state: false
    secondary_info:
      entity: sensor.co2_intensity
      use_metadata: false
      unit_of_measurement: gCO²
      unit_white_space: true
    power_outage:
      icon_alert: ''
      entity_generator: sensor.f150_feed_in_power
    color:
      consumption:
        - 120
        - 87
        - 0
      production:
        - 255
        - 170
        - 0
  solar:
    entity: sensor.envoy_122052091186_current_power_production
    display_zero: true
    name: Solar
    display_zero_tolerance: 0
    use_metadata: false
    secondary_info:
      unit_of_measurement: kW
    icon: mdi:solar-power-variant
    display_zero_state: true
  home:
    entity: sensor.house_grid_energy_total
    use_metadata: false
    override_state: false
    subtract_individual: false
    name: home
    icon: mdi:home
    secondary_info: null
  fossil_fuel_percentage:
    entity: sensor.grid_fossil_fuel_percentage
    display_zero_state: true
    state_type: percentage
    color_value: true
    display_zero: true
    color_icon: true
    use_metadata: false
    name: Power Mix
    unit_white_space: false
    color:
      - 79
      - 122
      - 40
  individual:
    - entity: sensor.juice_boxes_power
      display_zero: true
      name: EV Charging
      icon: mdi:ev-station
      secondary_info:
        entity: sensor.chevrolet_bolt_ev_power
        display_zero: true
    - entity: sensor.emporia_vue2a_heat_pump_power
      name: HVAC
      icon: mdi:heat-pump
      display_zero: true
      secondary_info:
        entity: sensor.emporia_vue2a_server_room_ac_power
        icon: mdi:server
        display_zero: true
    - entity: sensor.server_room_power
      name: Server Room
      icon: mdi:server
      display_zero: true
    - entity: sensor.emporia_vue2b_water_heater_power
      name: Water
      icon: mdi:water-boiler
      display_zero: true
      secondary_info:
        entity: sensor.water_and_septic_power_2
        icon: mdi:water-pump
        display_zero: true
clickable_entities: true
display_zero_lines:
  mode: show
  transparency: 50
  grey_color:
    - 189
    - 189
    - 189
use_new_flow_rate_model: true
w_decimals: 0
kw_decimals: 2
min_flow_rate: 0.75
max_expected_power: 20000
watt_threshold: 1000
transparency_zero_lines: 0
title: Power Flow
max_flow_rate: 7.5
min_expected_power: 1

@alexeiw123
Copy link

alexeiw123 commented Apr 18, 2024

Also came here to report this bug.

FYI for a workaround, you can use the template area to show the state in whatever way you please.
Not the most direct way but it works.

      secondary_info:
        template: '{{states('climate.izone_controller')}}'

@fhrbek
Copy link

fhrbek commented Apr 19, 2024

Also came here to report this bug.

FYI for a workaround, you can use the template area to show the state in whatever way you please. Not the most direct way but it works.

      secondary_info:
        template: '{{states('climate.izone_controller')}}'

This workaround works for me (even with a string entity, no need to check "Display zero"), I just had to double the inner quotes, i.e. like this:

secondary_info:
  template: '{{states(''climate.izone_controller'')}}'

@flixlix flixlix linked a pull request Apr 21, 2024 that will close this issue
@flixlix
Copy link
Owner

flixlix commented Apr 21, 2024

thank you all for your detailed description of the issue, helped me a lot.
Turned out to be a quick fix :)

fixed in #592

@flixlix flixlix closed this as completed Apr 21, 2024
@alexeiw123
Copy link

@flixlix bug still present for me 0.2.2
My entity state I'm using is a string but is just showing blank unless I use a template instead.

@flixlix
Copy link
Owner

flixlix commented Apr 22, 2024

@alexeiw123 this is expected behavior, by detail the card only accepts numeric entities as secondary info

@alexeiw123
Copy link

@alexeiw123 this is expected behavior, by detail the card only accepts numeric entities as secondary info

fair enough! this must be new behaviour with 0.2x as here is my screenshot I took using the old configuration where i just had the entity selected.
it's no problem though, I just use this instead now: template: '{{state_translated(''climate.izone_controller_200011148'')}}'

image

@fhrbek
Copy link

fhrbek commented Apr 23, 2024

@alexeiw123 this is expected behavior, by detail the card only accepts numeric entities as secondary info

OK, as @alexeiw123 says, this is new with 0.2x, I used a string entity in the old version as well and it worked fine. The template workaround is acceptable for now; however, please consider supporting strings as secondary info in future versions. I think that many users would appreciate it.

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

Successfully merging a pull request may close this issue.

6 participants