Comments (8)
Hi.
I fixed the readme. The examples should work now.
Sorry for the slow response.
from lovelace-windrose-card.
Probably you should add data_period
option:
data_period:
hours_to_show: 24
It is not marked in Docs as required (which seems to be an error):
from lovelace-windrose-card.
I will investigate and fix. Thanks.
from lovelace-windrose-card.
Hi @langestefan. If you create a new card, you'll get the default template.
Just add your wind_speed_entity
and your wind_direction_entity
. Make sure the values are state values, not attributes. Check that under Developer Tools -> States in Home Assistant. You'll need to create a template sensor if the ones you already have use attributes (see below).
Then make sure your direction_unit
is ok (letters
or degrees
). Also check cardinal_direction_letters
if you use letters.
type: custom:windrose-card
title: Wind direction
data_period:
hours_to_show: 4
max_width: 400
refresh_interval: 300
windspeed_bar_location: bottom
windspeed_bar_full: true
wind_direction_entity:
entity: 'sensor.wind_direction'
direction_unit: degrees
use_statistics: false
direction_compensation: 0
windspeed_entities:
- entity: 'sensor.wind_speed'
name: ''
speed_unit: auto
use_statistics: false
output_speed_unit: mps
speed_range_beaufort: true
windrose_draw_north_offset: 0
cardinal_direction_letters: NESW
matching_strategy: direction-first
center_calm_percentage: true
You should then at least get a basic windrose.
To create a template sensor for a sensor using attributes, add the following in you configuration.yaml file.
Under
template:
- sensor:
Add the wind speed sensor (modify it to fit your setup)
- name: Wind Speed
device_class: wind_speed
state_class: measurement
unit_of_measurement: "km/h"
state: >
{% if state_attr("sensor.weather_station", "wind_speed_last") != None %}
{{ state_attr("sensor.weather_station", "wind_speed_last")|float }}
{% else %} {% endif %}
availability: '{{ state_attr("sensor.weather_station", "wind_speed_last")|is_number }}'
icon: mdi:tailwind
Then add either one of these two for the wind direction sensor :
- name: Wind Direction
state: >
{% if state_attr("sensor.weather_station", "wind_dir_last") != None %}
{{ state_attr("sensor.weather_station", "wind_dir_last") }}
{% else %} {% endif %}
availability: '{{ state_attr("sensor.weather_station", "wind_dir_last")|is_number }}'
icon: mdi:compass-rose
- name: Wind Direction
state: >
{% if state_attr("sensor.weather_station", "wind_dir_last") != None %}
{% set direction = ['N','NNE','NE','ENE','E','ESE','SE','SSE','S','SSW','SW','WSW','W','WNW','NW','NNW','N'] %}
{% set degree = state_attr("sensor.weather_station", "wind_dir_last")|float %}
{{ direction[((degree+11.25)/22.5)|int] }}
{% else %} {% endif %}
availability: '{{ state_attr("sensor.weather_station", "wind_dir_last")|is_number }}'
icon: mdi:compass-rose
You should also and a unique_id:
to each one.
from lovelace-windrose-card.
Probably you should add
data_period
option:data_period: hours_to_show: 24
It is not marked in Docs as required (which seems to be an error):
yes correct, that was the problem. It's also not in the examples.
from lovelace-windrose-card.
Hi @langestefan. If you create a new card, you'll get the default template.
Yes, I know. I'm just talking about the examples in the docs specifically.
from lovelace-windrose-card.
none of this seems to be working. i keep getting Error: Unknown speed unit: auto
. why isnt there a basic example config?
from lovelace-windrose-card.
@ljmerza
Then post a code made from an example from the Repo which is not working. Just add this as it was suggested above.
from lovelace-windrose-card.
Related Issues (20)
- [RQST] hours_to_show automatic since midnight HOT 2
- [Feature request] card using a background image HOT 13
- Make the units less strict? HOT 4
- 1 Hour chart not updating HOT 5
- i want fix the legend range in rose plot HOT 4
- wind rose legend HOT 2
- [Feature request] Hide bar option HOT 5
- [FR] Console warnings: Speed unavailable at timestamp ... is not a number - can we have a "debug_messages: false" option? [overlooked "log_level" option] HOT 2
- Card may not be displayed (observed in Edit mode) HOT 5
- Numbers in and next to the bar HOT 5
- [Feature request] add range selector buttons
- Card not displaying HOT 2
- Speed unit locked to beaufort HOT 2
- [Feature request] Use vector graphics (fix Low resolution graphic) HOT 5
- [Feature request] : add the possibility to use weather forecast entity data
- [Feature request] Format text color based on windspeed color HOT 5
- Gust Windspeed Entity not available HOT 2
- [Feature request] Show Current Wind Speed and Gust Values HOT 3
- Card Dynamically Keeps Growing and Growing in Size HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lovelace-windrose-card.