Hi,
thx for your quick answer, still this is a problem for me . I need the needed steps and somehow to check how to get there . As said i am a nyb - and my programming skills ends in bash scripting , so it wojuld help a lot .
So i have template-card and i have a Variable like -0 or -1 âŚ
the ploty chart is surrounded by template card to update the variable on demand
I retrieve 365d statistics in the yaml code
In $ex i somehow check if currentdate(Month)-variable = seriesdate(Montth) and if not i discard the series ?
Or maybe better create a Variable instead of a Counter which has YYYYMM and use this for compare to the series ?
will this work ? is this the correct way ? any samples where i could learn from ?
I do not want spending hours on createing a Variable / helper, if the result will not work , so i would like first to try it out with fixxed numbers / variables âŚ
Everything is new to me so all takes some time and needs to be checked first .
Thank you, Dietmar
edit - update
This to show the Month used by a counter button - very stubid and simple
( just to show, needed > h to just get his done - so please be patient ⌠- bloody |int for a counter ( yes state is always string ⌠) )
- type: custom:mushroom-template-card
primary: >-
{% set f = now().month|int %}
{% set offset_val = states('counter.monthly_offset_value') %}
{% set mon = ["Jänner","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"] %}
{% set b = offset_val|int %}
{% set c = mon[f-1-b] %}
{{ c }}
secondary: ""