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] For fossil_fuel_percentage the secondary_info does not show the result from template anymore after update. #618

Open
4 tasks done
bjiirn opened this issue Apr 28, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@bjiirn
Copy link

bjiirn commented Apr 28, 2024

Describe the bug
For fossil_fuel_percentage the secondary_info does not show the result from template.
This worked fine in v0.1.8.1. After updating to v0.2.2 this is not longer the case.
Instead the entity data is now shown.

To Reproduce
Steps to reproduce the behavior:

 type: custom:power-flow-card-plus
 title: Energieverteilung
 entities:
   grid:
     entity:
       consumption: sensor.power_from_grid
       production: sensor.power_to_grid
   fossil_fuel_percentage:
     entity: sensor.electricity_maps_anteil_fossiler_brennstoffe_im_netz
     name: Grün (DE Netz)
     secondary_info:
       entity: sensor.electricity_maps_anteil_fossiler_brennstoffe_im_netz
       unit_of_measurement: '%'
       decimals: 1
       template: >-
         {{ ((100 -
         states('sensor.electricity_maps_anteil_fossiler_brennstoffe_im_netz') |
         float) | round(1) | string + ' %') }}
   home:
     entity: sensor.power_house

Expected behavior
Secondary Info should display the result of the template

Screenshots
image
image

Please make sure all of this applies and check the checkboxes, by writing "X" inside of them.

  • I understand that this is a channel for reporting bugs, not a support forum (If you need help configuring the card, go to: Discussions).

  • I have the latest version of the card installed.

  • I have cleared my browser cache after installing, updating and configuring the card.

  • The issue is not related to the UI-Editor not being rendered: "s.entries is not a function". This is a known bug, and is caused by Card Mod. Check the warning this readme section for more information on how to fix it.

@bjiirn bjiirn added the bug Something isn't working label Apr 28, 2024
@bjiirn
Copy link
Author

bjiirn commented May 17, 2024

I think i found the problem.
There seems to be a typo in the 'power-flow-card-plus-config.ts':
image

However i do not know how to generate the 'power-flow-card-plus.js' from the source so i cant test it.
Edit: Added a PR for this: #635

Update: I did now manage to compile the Code and it does not fix the issue.
I did not find what causes the problem jet, but i have a hard time understanding whats happening since im not that familiar with JavaScript.
I will try to find the Problem again when i have more time.

bjiirn added a commit to bjiirn/power-flow-card-plus that referenced this issue May 17, 2024
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

1 participant