tom_l
May 10, 2024, 10:03am
4
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
tom_l
May 10, 2024, 10:37am
6
Is that the correct entity id?
Also you need a wind speed entity for it to work.
tom_l
May 10, 2024, 10:41am
7
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
demonik321
(Damian Jasek)
May 10, 2024, 10:46am
10
i was talking about multiply that u mentioned
tom_l
May 10, 2024, 10:48am
11
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”?
tom_l
May 10, 2024, 11:22am
13
It’s like pulling teeth. What “doesn’t work”?
Be specific and descriptive.
demonik321
(Damian Jasek)
May 10, 2024, 11:22am
14
doesnt show anything on card blank screen
entities works alone and shows direction and speed
tom_l
May 10, 2024, 11:30am
15
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?
demonik321
(Damian Jasek)
May 10, 2024, 11:31am
16
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
tom_l
May 10, 2024, 11:38am
17
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
demonik321
(Damian Jasek)
May 10, 2024, 11:54am
18
finally its working but it doesnt update in real time on browser only in app on phone
tom_l
May 10, 2024, 12:01pm
19
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:
tom_l:
refresh_interval: 300
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.
demonik321
(Damian Jasek)
May 10, 2024, 12:06pm
20
yes i know its not wind compass but its update in 1second on phone but on pc browser only when i refresh site
tom_l
May 10, 2024, 12:07pm
21
There is no point updating every second. You are causing needless load on your system.
1 Like
demonik321
(Damian Jasek)
May 10, 2024, 12:10pm
22
ok but anyway thanks for helping
tom_l
May 10, 2024, 12:11pm
23
What web browser are you using?
Have you tried another one?