hi iam trying to add wind card that will read wind direction from combined sensor from 4 hall sensors i was trying to do that but it doest show anything only blank card i also have wind speed sensor
i dont know how to configure it
That is not enough information to help you.
What are your four sensor entity_ids?
How do they relate to wind direction?
thats my inputs from hall sensors
binary_sensor:
- platform: gpio
pin: 33
name: "Kierunek polnocny"
- platform: gpio
pin: 25
name: "Kierunek zachodni"
- platform: gpio
pin: 26
name: "Kierunek poludniowy"
- platform: gpio
pin: 27
name: "Kierunek wschodni"
thats my logic converter
platform: template
sensors:
kierunek_wiatru:
friendly_name: Kierunek wiatru
value_template: >-
{% if states('binary_sensor.stacja_Kierunek_zachodni') == 'off' and states('binary_sensor.stacja_Kierunek_polnocny') == 'off' %}
Polnocno-zachodni
{% elif states('binary_sensor.stacja_Kierunek_wschodni') == 'off' and states('binary_sensor.stacja_Kierunek_polnocny') == 'off' %}
Polnocno-wschodni
{% elif states('binary_sensor.stacja_Kierunek_zachodni') == 'off' and states('binary_sensor.stacja_Kierunek_poludniowy') == 'off' %}
Poludniowo-zachodni
{% elif states('binary_sensor.stacja_Kierunek_wschodni') == 'off' and states('binary_sensor.stacja_Kierunek_poludniowy') == 'off' %}
Poludniowo-wschodni
{% elif states('binary_sensor.stacja_Kierunek_polnocny') == 'off' %}
Polnocny
{% elif states('binary_sensor.stacja_Kierunek_wschodni') == 'off' %}
Wschodni
{% elif states('binary_sensor.stacja_Kierunek_poludniowy') == 'off' %}
Poludniowy
{% elif states('binary_sensor.stacja_Kierunek_zachodni') == 'off' %}
Zachodni
{% endif %}
and speed sensor
- platform: pulse_meter
pin: 19
unit_of_measurement: 'm/s'
name: 'Prędkość powietrza'
filters:
- multiply: 0.0083332
- multiply: 3
You seem to have a mix of ESPHome and Home Assistant config there. You can do it with either. I’m not great at C# so here’s the Home Assistant version.
You should be using the new template sensor format for new sensors. Also you need to provide the English cardinal points (NSEW) for the Wind Rose card to work.
configuration.yaml (not sensors.yaml)
template:
- sensor:
name: Kierunek Wiatru
state: >
{% if is_state('binary_sensor.stacja_Kierunek_zachodni', 'off') and is_state('binary_sensor.stacja_Kierunek_polnocny', 'off') %}
NW
{% elif is_state('binary_sensor.stacja_Kierunek_wschodni', 'off') and is_state('binary_sensor.stacja_Kierunek_polnocny', 'off') %}
NE
{% elif is_state('binary_sensor.stacja_Kierunek_zachodni', 'off') and is_state('binary_sensor.stacja_Kierunek_poludniowy', 'off') %}
SW
{% elif is_state('binary_sensor.stacja_Kierunek_wschodni', 'off') and is_state('binary_sensor.stacja_Kierunek_poludniowy', 'off') %}
SE
{% elif is_state('binary_sensor.stacja_Kierunek_polnocny', 'off') %}
N
{% elif is_state('binary_sensor.stacja_Kierunek_wschodni', 'off') %}
E
{% elif is_state('binary_sensor.stacja_Kierunek_poludniowy', 'off') %}
S
{% elif is_state('binary_sensor.stacja_Kierunek_zachodni', 'off') %}
W
{% else %}
Unknown
{% endif %}
yours code is working but still nothing on card
type: custom:windrose-card
title: Wind direction
data_period:
hours_to_show: 1
max_width: 400
refresh_interval: 1
windspeed_bar_location: bottom
windspeed_bar_full: true
wind_direction_count: 8
wind_direction_entity:
entity: sensor.kierunek_wiatru2
direction_unit: letters
use_statistics: false
direction_compensation: 0
direction_letters: NSEWX
windspeed_entities:
- entity: ''
name: ''
speed_unit: auto
use_statistics: false
output_speed_unit: mps
speed_range_beaufort: true
windrose_draw_north_offset: 0
direction_letters: NSEWX
matching_strategy: direction-first
center_calm_percentage: true
mayby iam missing something
Is that the correct entity id?
Also you need a wind speed entity for it to work.
This ESPHome config is not correct:
Should be:
- platform: pulse_meter
pin: 19
unit_of_measurement: 'm/s'
name: 'Prędkość powietrza'
filters:
- multiply: 0.0083332
- multiply: 3
I’m surprised it let you compile it.
And that filter can be simplified to one multiplication:
- platform: pulse_meter
pin: 19
unit_of_measurement: 'm/s'
name: 'Prędkość powietrza'
filters:
- multiply: 0.025
it even works
i will try changing it
also the direction id is correct
So it is working now?
i was talking about multiply that u mentioned
It is the indentation that is the problem.
Yours:
- platform: pulse_meter
pin: 19
unit_of_measurement: 'm/s'
name: 'Prędkość powietrza'
filters:
- multiply: 0.0083332
- multiply: 3
Mine:
- platform: pulse_meter
pin: 19
unit_of_measurement: 'm/s'
name: 'Prędkość powietrza'
filters:
- multiply: 0.025
See how all the options are aligned under the word “platform”?
still doesnt work
It’s like pulling teeth. What “doesn’t work”?
Be specific and descriptive.
doesnt show anything on card blank screen
entities works alone and shows direction and speed
Ok, now we’re getting somewhere. So it is just the Wind Rose card that is the problem now.
Have you supplied a wind speed entity?
its current code for card
type: custom:windrose-card
title: Wind direction
data_period:
hours_to_show: 1
max_width: 400
refresh_interval: 1
windspeed_bar_location: bottom
windspeed_bar_full: true
wind_direction_count: 8
wind_direction_entity:
entity: sensor.kierunek_wiatru2
name: wiatr
direction_unit: letters
use_statistics: true
direction_compensation: 0
direction_letters: NSEWX
windspeed_entities:
- entity: sensor.stacja_predkosc_powietrza
name: powietrze
speed_unit: auto
use_statistics: true
output_speed_unit: mps
speed_range_beaufort: true
windrose_draw_north_offset: 0
cardinal_direction_letters: NSEW
matching_strategy: direction-first
center_calm_percentage: true
Try this:
type: custom:windrose-card
title: Wind Rose
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.kierunek_wiatru2
direction_unit: letters
use_statistics: false
direction_compensation: 0
windspeed_entities:
- entity: sensor.stacja_predkosc_powietrza
name: Last 4 Hrs
speed_unit: auto
use_statistics: false
output_speed_unit: mps
speed_range_beaufort: false
windrose_draw_north_offset: 0
cardinal_direction_letters: NESW
matching_strategy: direction-first
center_calm_percentage: true
finally its working but it doesnt update in real time on browser only in app on phone
It is not a wind compass. It is a history of the directions and speeds for last x hours.
If you want a wind compass look at this card:
The help topic is here: Compass Card - Points you in the right direction đź§
You can lower the refresh interval of the wind rose a bit, but not 1 second as you had it. This updates every five minutes:
There’s not much point going lower than 30 seconds as your sensor probably does not update that often. So somewhere between 30 and 300.
yes i know its not wind compass but its update in 1second on phone but on pc browser only when i refresh site