@tom_l is is what I get in my dev env:
However I might not have the latest css for the day/night
With the following css added to the night theme yaml
ha-card.type-custom-compass-card {
--state-icon-color: var(--paper-item-icon-color, var(--state-icon-color));
--secondary-text-color: var(--primary-text-color, var(--secondary-text-color));
}
ha-card.type-custom-compass-card .header .name {
opacity: 0.65;
}
ha-card.type-custom-compass-card .compass .direction p span {
font-size: 2.4rem;
line-height: 1.2rem;
font-weight: 300;
}
ha-card.type-custom-compass-card .compass .direction p {
font-size: 0.7em;
line-height: 1.2rem;
}
I get the following result:
Unfortunately the units donāt have a separate css handle to work with to make it more inline with both other cards. Will add this in the future.
Added the last two lines to the class I use for graphs and the compass card:
ha-card.top-level-graph {
border: solid 1px var(--secondary-text-color);
background: url("/local/background/card_bg_Night.png");
--state-icon-color: var(--paper-item-icon-color, var(--state-icon-color));
--secondary-text-color: var(--primary-text-color, var(--secondary-text-color));
}
And it works without messing up the graph card. Thank you.
Will have a play with the font sizes now.
Youāre welcome, happy to help.
Looking forward to what you make of it!
It was actually the wind speed I wanted to increase the font of to match the other cards:
My example, doesnt show the speed, but degrees, but this is the secondary entity shown large in degrees.
I made the second line the same as the state value in the mini-graph-card. To get the extrema size should not be to difficult.
If you rightclick on the extrema in the mini-graph-card, and check what css is applied and you can copy those to the ha-card.type-custom-compass-card .compass .direction p span
in your theme. If the extrema has sizes in em
, use rem
instead. If you cant get it to work, leave a message and Iāll see what I can do
Perfect!
I took those two lines out of my graph card class once I realised you were applying them to the card type:
ha-card.type-custom-compass-card .compass .direction p span {
font-size: 14px;
opacity: 0.75;
font-weight: 400;
}
ha-card.type-custom-compass-card {
--state-icon-color: var(--paper-item-icon-color, var(--state-icon-color));
--secondary-text-color: var(--primary-text-color, var(--secondary-text-color));
}
ha-card.type-custom-compass-card .compass .direction p {
font-size: 2.4em;
line-height: 2rem;
font-weight: 400;
}
Thanks again.
Small update/preview. SVG compass is progressing nicely:
Next up the other indicators, and the color setting from config and the configurable color ranges.
Hey @tomvanswam,
Thanks for this great integration. Using it with the Ecowitt custom integrations and it works & looks great.
I have a feature idea that I believe would make this the ultimate card for wind info. Iād love to be able to see at a glance both wind direction in letters (N) and degrees (0Ā°), wind speed and gust speed. Something like in this image (screen grab from Misol weather station).
Iām glad you like the card.
On the github, some more ideaās have been mentioned to get more info in the card, so I will take your examples into consideration when working on the open issues.
Currently Iām changing the compass on the card to be svg based, instead of css, which would make it easier to implement multiple indicators on 1 compass, and change colors depending on the secondary entity provided.
Currently Iām at this stage (availavle as v0.5.0-dev pre-release in HACS):
I try to make the card use as much styling from the vanilla sensor-card and try not to get to much different fonts/font-sizes/font-weights and stuff because the clean look of the card will dissapear quite quickly. Putting more emphasis on the secondary entity was an idea from github which made sense and did not mess to much with the clean look.
Adding more info is mostly a layout trade-off, e.g. adding the degrees of an indicator to the abbreviation seems easy, however in some languages the abbreviations are quite a bit longer than a max of 3 letters. So this could end up overflowing outside the compass.
Using the left/right side of the card could be a possibility, but when viewing on a smaller screen, of (as in the screenshot) using the card in a horizontal-stack leaves no room for additional info to the left and right.
The weatherstation looks great (what make/model is it?) Due to the responsive and configurable nature of the lovelace infterface itās not as easy to make it like that and keep everyone using the card happy. (also because some people use the card for non wind related info).
Any ideas for a interface update are more than welcome, as I find it difficult to think of stuff like this on my own
Is it possible to get the compass into a badge?
What an excellent idea! (and a proper challenge)
Iāll add it to the todo list, but it might take some time as I need to finish the current update first and research how to do this.
So I donāt see the wind speed on that card now?
Yes you will.
The screenshot has the secondary entity set to the same as the first entity. In my dev HA I use input_numbers for the secondary entities, however the sensor-card cannot display input_numbers. So to check if the secondary entity displays the same way as the state on the sensor-card I needed to set the secondary_entity to a sensor. Thinking of it now this might be a bit confusing in the context of the previous question.
Haha yeah well it for sure confused meā¦ thanks for explaining.
Iāll create template sensors for the input sensors, so I can screenshot with an āactualā secondary sensor, and stop confusting everyone
Cheers for getting back. Yup, your choice of not messing too much with default css makes sense. I guess adding one more line of text at the bottom would be doable and allow users flexibility in their choice of data to be shown.
Working with svg can be a pain as I found out with floorplan pre-lovelace. Am using the dev card and the result is great.
Next prerelease Iām adding the degrees as optional next to the abbreviation (and will make the abbreviation hideable as well). The second line of additional info will have wait till upcoming release is done.
Thanks fotr the info on the weaterstation, mine is almost due for replacement and this looks like a good candidate for that.
Aliexpress for 160usd
Although you can also just buy the sensor arrays and add a GW1000 to link with hass for just 100usd plus shippingā¦
In any case, itās nice to be able to add soil moisture, temp/hygro, plus pm 2.5 sensors at ok rates.
Instead of a minor version update (to v0.5.0), next release will be a mayor release (v1.0.0) as stuff is gonna break very badly
The config was not flexible enough to do what I wanted, so that needed a big overhaul.
Still have to add the style changing on entity updates, this is already forseen in the config change, so should be a fairly easy thing to do now.
And fix the visual editor, at least for the same stuff that was possible with the visual editor before. To implement all new options would be to much for the visual editor imo.
Whats in v1.0.0?
What will break:
I know, the example screenshot looks like a carnival and Iām not going to configure mine like that, but if you want to, you can do so.
By default the plain/similar to the sensor-card look will stay. Itās up to you to make it as āexpressiveā as you like