Closed davidrustingha closed 2 years ago
Same here, and im not seeing the png's
I have the same problem. Next race instead of today and no images
This fixes the image and logos. Both couldn't account for spaces.
{% set nr = states.sensor.formula_one_sensor.attributes.next_race %} {% if
not(nr == None) %} <h2><img height="25"
src="https://www.countries-ofthe-world.com/flags-normal/flag-of-{{nr.Circuit.Location.country | replace(" ", "-")}}.png">
{{ nr.round }} : {{ nr.raceName }}</h2>
<small>Local time : {{ as_timestamp(nr.date + ' ' + nr.time) |
timestamp_custom("%H:%M on %y-%m-%D ") }}</small>
<a target="_new" href="{{nr.Circuit.url}}">
<img width="100%" src="https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/{{nr.Circuit.Location.country | replace(" ","_")}}_Circuit.png.transform/7col/image.png">
</a> <br>
Season: {{nr.season}}<br>
Race: {{nr.round}}<br>
Race name : {{nr.raceName}}<br>
Circuit name : {{nr.Circuit.circuitName}}<br>
Location: {{nr.Circuit.Location.country}}<br>
Date : {{nr.date}}<br>
Time : {{nr.time}}<br> {% endif %}
{% set nr = states.sensor.formula_one_sensor.attributes.next_race %} {% if not(nr == None) %}
<img height="25" src="https://www.countries-ofthe-world.com/flags-normal/flag-of-{{nr.Circuit.Location.country | replace(" ", "-")}}.png"> {{ nr.round }} : {{ nr.raceName }}
Local time : {{ as_timestamp(nr.date + ' ' + nr.time) | timestamp_custom("%H:%M on %y-%m-%D ") }}
<img width="100%" src="https://www.formula1.com/content/dam/fom-website/2018-redesign-assets/Circuit%20maps%2016x9/{{nr.Circuit.Location.country | replace(" ","_")}}_Circuit.png.transform/7col/image.png">
Yes, this works perfectly for the images problem
Works like a charm. Thnx
Right now it's sunday and the race hasn't begun yet. It still shows the next race being on the Jeddah Circuit.