…which sits with the rest of the code posted above.
I basically just kept what is used by this card and left the rest out.
I do have a sensor which gives the direction as a N, S, E, W etc. already (part of the BOM stuff) but does the card do the conversion from an angle itself? I have linked the card the the existing sensor with the N, S, E, W etc.
I did use the RAW code and the v=number is as per the instructions on the Git page… being the latest version number. Using Chrome I cleared the cache with Control+F5
I can add this. It would be easier to add below the Icon (similar line level to where the feels like text goes. It will keep the card balanced.) This will suffer from locale issues as well. The dark sky platform always uses english for the icon names. To implement it I will add another entity_ parameter. I would suggest using a template sensor to convert the names into whatever locale you like and remove the embedded -'s before passing the value to the card.
Nice, and understood. I merely suggested to place above the icon, because my other card had the weather station name listed also, and balances it that way. Gives it a nice ‘header’ feel.
check through the log and find the error line(s) directly referencing dark-sky-weather-card. The lines for aysnc.js are part of the stack trace. Ther may be only one for the card and a ton for async. The line (s) for dark-sky-weather-card will tell you specifically what source code line the error is occuring on.
The error is being thrown because at least one of the required parameters being passed in is missing or is referencing a value that is in an unknown state. knowing the line in the card causing the error will help narrow down the parameter that is causing the issue.
Added “Today’s High” text to current day high temp. A couple of folks suggested this. You need to provide a value for entity_current_text. It is an optional parameter so if you don’t add it to your configuration it won’t show. See the note below.
Added Beaufort scale to Wind. Set show_beaufort flag to true to enable. (Suggested by @Mariusthvdb )
Added current condition text to current condition icon. Set entity_current_text to a sensor or template entity to enable. (Suggested by @Mariusthvdb )
Corrected ‘it’ localization of “feels like”. Changed to “Percepito”. (Suggested by @itajackass)
Corrected ‘de’ localization of “feels like”. Changed to “Gefühlt”. (Suggested by @VDRainer)
Added top margin to current conditions icon. (Suggested by @Marco_Lupieri)
Note: The sensor used to provide the value for the current conditions text could be set up as a template sensor. This way you can provide localization for the possible values. An example of how to set up this template is below.
depending on your preference for
Partly Cloudy Night
’
or
Partly cloudy night
in english of course.
might I suggest a mapper for any translation, makes the template so much easier:
{% set mapper =
{ 'Breezy': 'cloudy',
'Clear Night': 'night',
'Clear': 'day',
'Mostly Clear': 'day',
'Clear Day': 'day',
'Cloudy': 'cloudy',
'Fog': 'cloudy',
'Hail': 'rainy-7',
'Lightning': 'thunder',
'Mostly Cloudy': 'cloudy',
'Partly Cloudy': 'cloudy-day-3',
'Partly Cloudy Night': 'cloudy-night-3',
'Rain': 'rainy-4',
'Scattered Showers': 'rainy-3',
'Showers': 'rainy-6',
'Snow': 'snowy-6',
'Mostly Sunny': 'day',
'Sunny': 'day',
'Windy': 'cloudy'} %}
{% set state = states('sensor.dark_sky_icon')|title|replace('-',' ') %}
{% set weather = mapper[state] if state in mapper else 'weather' %}
{% set path = '/local/weather/animated/' %}
{% set ext = '.svg'%}
{{[path,weather,ext]|join('')|lower}}
something like this:
value_template: >
{% set mapper =
{'clear-night': 'Clear',
'clear-day': Clear,
'clear-night':'Clear',
'rain':'Rain',
'snow':'Snowy',
'fog': 'Foggy',
'sleet': 'Sleet',
'wind':'Windy',
'cloudy':'Cloudy',
'partly-cloudy-day':'Partly Cloudy',
'partly-cloudy-night':'Partly Cloudy',
'hail':'Hailing',
'lightning':'Lightning',
'thunderstorm':'Thunderstorm'} %}
{% set state = states('sensor.dark_sky_icon') %}
{% set weather = mapper[state] if state in mapper else 'weather' %}
{{weather}}
we should also take care of the ‘else’, i my example here, i’ve named it weather which is useless in this case, but maybe some generic weather condition could be set. Or, if one is certain of the total possible weather conditions, the trick is to leave out only one, and set that as else condition:
value_template: >
{% set mapper =
{'clear-night': 'Clear',
'clear-day': Clear,
'clear-night':'Clear',
'rain':'Rain',
'snow':'Snowy',
'fog': 'Foggy',
'sleet': 'Sleet',
'wind':'Windy',
'cloudy':'Cloudy',
'partly-cloudy-day':'Partly Cloudy',
'partly-cloudy-night':'Partly Cloudy',
'hail':'Hailing',
'lightning':'Lightning' } %}
{% set state = states('sensor.dark_sky_icon') %}
{% set weather = mapper[state] if state in mapper else 'Thunderstorm' %}
{{weather}}
would you show me how to get my own Bft sensor in here? I have no need for the full template in this card, since I already have an external sensor doing the math or me: