Closed 1mfaasj closed 1 year ago
Indeed some station are now no longer listed in the drop-down. Because I was testing for the exact same station I noticed the price didn't load. Only after a lot of debugging I realised the price for this station is not available on the Carbu.com website. So no bug but confusing. So to make sure other users won't get confused, I filtered the drop-down and only show stations with a price.
Can you show your markdown?
the markdown code:
type: vertical-stack
cards:
- type: markdown
content: >
## Super95 benzine
#### Komende dagen: {% if
states('sensor.carbu_com_super95_prediction')|float < 0 %}<font
color=green>{{states('sensor.carbu_com_super95_prediction')}}%</font>{%
else %}<font
color=red>{{states('sensor.carbu_com_super95_prediction')}}%</font>{%
endif %}
- type: horizontal-stack
cards:
- type: markdown
content: >
#### <center>Belgie </center>
<center><img
src="{{state_attr('sensor.carbu_com_super95_3630_gabriels_maasmechelen_price','entity_picture')}}"
width="45"/> </center>
<center>
[{{state_attr('sensor.carbu_com_super95_3630_gabriels_maasmechelen_price','supplier')}}]({{state_attr('sensor.carbu_com_diesel_5611_gh_5km','url')}})
###
<center>{{states('sensor.carbu_com_super95_3630_gabriels_maasmechelen_price')}}
€/l
- type: markdown
content: >
#### <center>NL</center>
<center><img
src="{{state_attr('sensor.carbu_com_diesel_5611_gh_5km','entity_picture')}}"
width="45"/></center>
<center>
[{{state_attr('sensor.carbu_com_diesel_5611_gh_5km','supplier')}}]({{state_attr('sensor.carbu_com_diesel_5611_gh_5km','url')}})
###
<center>{{states('sensor.carbu_com_diesel_5611_gh_5km')}}
€/l
Besparing tov Belgie =
{{state_attr('sensor.carbu_com_diesel_5611_gh_5km','price
diff %')}} of
**{{state_attr('sensor.carbu_com_diesel_5611_gh_5km','price
diff 30l')}}** op 30l
looks correct right?
yes looks correct to me. best to copy some parts of it into the 'Developer' > 'Template' section. This way you may get a better error description or try to find the part which causes issues. Also good to validate the sensor attributes to via 'Developer' > 'States'
I believe the error is related to the name of the sensors you use: sensor.carbu_com_diesel_5611_gh_5km
should probably be written witout the gh
: sensor.carbu_com_diesel_5611_5km
Hi again! I've got 2 things to mention:
Looks like this fuel station is missing / not listed anymore when I search for it in the dropdown (zip code 3630):
I also try to use the markdown card but I can't get this part to work: The result stays on "none" but the prices differs between the two fuelstations, so I expect to see a result. any ideas to get this fixed? is your example code still valid?
thanks!