Skip to content

Remove the ".0" at the end of numbers & calculate with numbers #11

Closed Answered by wacholderpolka
wacholderpolka asked this question in Q&A
Discussion options

You must be logged in to vote

Ok, after playing around a little bit, I found some ways to eliminate the .0 for my own screens, but not for the solar screen.
I solved the calculation issue by defining extra sensors in the configuration. yaml so this is working, too:-)

configuration.yaml:

sensor:
  - platform: template
    sensors:
        energie_verbrauch_kwh:
            friendly_name: "Energie-Verbrauch in kWh"
            unit_of_measurement: 'kWh'
            value_template: '{{ (states("sensor.FEMS_GridBuyActiveEnergy") |float // 1000)|int}}'

and then for the pixoo:

        - text: "{{ states.sensor.energie_verbrauch_kwh.state }}"
          position: [1, 8]
          font: FONT_GICKO
          font_color: [255,…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by gickowtf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant