ivanov
(Ivanov)
March 18, 2021, 7:36am
142
Great stuff, @tomvanswam ! Just discussed with my kids that itād be cool to have wind visualized with a compassāhere it comes
North offset is awesome: now I can adjust the compass to match orientation of the display. Is it possible to put a custom image on the background? It could be a top overview of the house. So it would be nice to see, which windows wind actually goes.
I especially loved sun azimuth. However, it might be sensible to show it only when sun is actually above the horizon. Itās a little bit weird to see sun on the North. Additionally, I think sun elevation could be integrated into the compass: putting circle closer to the center depending on the angle.
2 Likes
tomvanswam
(Tom van Swam)
March 18, 2021, 6:01pm
143
Thanks! Nice to hear the card is discussed with kids, I wish my kid is also interested in stuff like that when she grows up.
Adding a background is a good idea. If you could make a feature request on the github site, the request will stay on my radar.
It is already possible to hide the azimuth indicator at certain elevations, just use this piece of yaml for the azimuth inidcator:
indicator_sensors:
- sensor: sun.sun
attribute: azimuth
indicator:
type: circle
color: orange
show: false
dynamic_style:
sensor: sun.sun
attribute: elevation
bands:
- from_value: 0
show: true
This will hide the indicator for elevations less than 0.
Iām less fan of changing the location of the indicator towards the inside of the circle tbh, so I hope the config above will also serve your needs well enough.
ivanov
(Ivanov)
March 22, 2021, 6:17am
144
Thanks for the hint! Sorry, my faultāhavenāt read that manualā¦
I was wondering what are the options for the indicator object? Details on that are missing in the manual: there is a non-active link to (GitHub - tomvanswam/compass-card: A Lovelace card that shows a directional indicator on a compass for Home Assistant ). Is it possible to use an mdi-icon as an indicator object?
tomvanswam
(Tom van Swam)
March 23, 2021, 5:58pm
145
Thanks for the heads-up on the link. No worries on not reading the manual. Iāve been told itās not that complete anyways
Currently there are 3 types of indicators you can choose, all of which are shown in an example in the readme.
indicator_sensors:
- sensor: sensor.wind_dir
indicator:
type: arrow_inward
- sensor: sun.sun
attribute: azimuth
indicator:
type: circle
- sensor: sensor.friends_direction
indicator:
type: arrow_outward
mdi support would be a nice feature I guess. Iāll think about it, and how to implement it.
andilge
(Andilge)
March 28, 2021, 7:37pm
146
Iām using the compass card for lightnings, add-on blitzortung.org and it works flawlessly. I have one little problem though, when there is no lightning activity (95% of the time) the add-on brings back āunknownā in the azimuth entitiy and compass card falls back to default azimuth 0Ā°, north.
Since āunknownā is not an integer or float value, the band filter doesnāt show any effect. As a result many times I have zero lightning in north which is a bit annoying.
Do you think itās feasible to integrate a general filter for āunknownā instead of the fallback to zero/north?
tomvanswam
(Tom van Swam)
March 29, 2021, 6:54pm
147
Good idea!
Would you be so kind to add a feature request on Github?
andilge
(Andilge)
March 29, 2021, 7:14pm
148
Yup, I can do so. Do you prefer feature requests in the issue or pr section?
tomvanswam
(Tom van Swam)
March 29, 2021, 7:16pm
149
When you also can provide the code change, I prefer the PR section
Otherwise the issue section will do, and you can add the enhancement
label.
andilge
(Andilge)
March 29, 2021, 7:44pm
150
done with
opened 07:40PM - 29 Mar 21 UTC
Hi there,
Iām using the compass card for lightnings, add-on blitzortung.org and it works flawlessly. I have one little problem though, when...
but I canāt label it with enhancement.
tomvanswam
(Tom van Swam)
March 29, 2021, 7:45pm
151
Ah didnāt know that, but I added it already.
Iām trying to use the compass card. But canāt get the wind direction to work, it keeps pointing North. Iām on HA 2021.5.5.
I have the following configuration:
type: 'custom:compass-card'
indicator_sensors:
- sensor: sensor.tuk_wind_direction
indicator:
type: arrow_inward
value_sensors:
- sensor: sensor.tuk_wind_speed
language: nl
What could be the cause?
tomvanswam
(Tom van Swam)
May 22, 2021, 12:04pm
153
The sensor only works with numeric degrees (0-360) or cardinal directions abbreviated in English. Your sensor has the cardinal directions abbreviated in Dutch, so it displays the default north.
The direction abbreviation language is only for displaying the abbreviation, not for reading the abbreviation from the sensor.
Use the sensor.tuk_wind_direction_azimuth
(enable in your configuration.yaml
when needed) to get numeric values and use the card.
1 Like
Thanks for the fast response, it worked!
1 Like
BVavra
July 4, 2021, 12:17am
155
How do I get the direction (ENE in your screenshot) larger?
You can do that with card-mod
GlennHA
(Glenn)
July 4, 2021, 2:11am
157
This should show you most of the options:
type: custom:compass-card
style:
top: 50%
left: 50%
box-shadow: none
background-color: transparent
transform: scale(1,1) translate(-50%,-50%)
indicator_sensors:
- sensor: sensor.wf_wind_bearing_avg
indicator:
type: arrow_inward
value_sensors:
- sensor: sensor.wf_wind_speed_avg
- sensor: sensor.wf_wind_bearing_avg
language: en
compass:
north:
show: true
1 Like
Except the one he asked about for which he will need card-mod
Example:
header:
title:
value: Wind Direction & Sun
indicator_sensors:
- sensor: sensor.gosford_wind_direction
indicator:
type: arrow_inward
dynamic_style:
sensor: sensor.gosford_wind_speed_kilometre
bands:
- from_value: 0
color: '#039BE5'
- from_value: 18.52
color: '#0da035'
- from_value: 37.04
color: '#e0b400'
- from_value: 55.56
color: '#e45e65'
- sensor: sun.sun
attribute: azimuth
indicator:
type: circle
value_sensors:
- sensor: sensor.gosford_wind_speed_kilometre
- sensor: sensor.solar_elevation
compass:
north:
show: true
offset: 0
card_mod:
style: |
.sensor-1 .measurement {
font-size: 28px !important;
}
But he will need to work out the element name for the direction text.
1 Like
tom_l
July 4, 2021, 4:53am
159
I use card-mod classes in my themes:
card-mod-theme: day
card-mod-card: |
ha-card.top-level-graph.compass-card .name {
font-size: 20px !important;
font-weight: 300 !important;
letter-spacing: 0px;
}
ha-card.top-level-graph.compass-card .icon,
ha-card.top-level-graph.compass-card .name,
ha-card.top-level-graph.compass-card .indicator-sensors .abbr {
color: var(--primary-text-color) !important;
}
ha-card.top-level-graph.compass-card .name {
margin-top: -2px;
}
ha-card.top-level-graph.compass-card .value-sensors {
top: 92px;
font-weight: 100;
}
ha-card.top-level-graph.compass-card .value-sensors .value {
font-size: 14px;
line-height: 1.2em;
font-weight: 400;
}
ha-card.top-level-graph.compass-card .value-sensors .measurement {
font-size: 14px;
font-weight: 300;
line-height: 1.6em;
opacity: 1;
color: var(--primary-text-color) !important;
}
ha-card.top-level-graph.compass-card .indicator-sensors {
top: 60px;
font-weight: 300;
}
ha-card.top-level-graph.compass-card .indicator-sensors .abbr {
font-size: 2.4em;
line-height: 30px;
opacity: 1;
color: var(--primary-text-color) !important;
}
Then in the card:
card_mod:
class: top-level-graph
type: custom:compass-card
indicator_sensors:
- sensor: sensor.hobart_wind_direction
...ect
BVavra
July 4, 2021, 7:46pm
160
by element name you are refering to ā.sensor-1 .measurementā?
BVavra
July 4, 2021, 7:49pm
161
I use your theme but dont adjust my cards with the card-mod classes. I dont fully understand how cards breakdown to be able to adjust them properly.
I can add the card-mod class to the card and it changes to whats in the theme but when I adjust the class(es) in the theme nothing happens.