or use a manual card to add and copy it there.
EDIT: note that the state_attr is case sensitive, so if your first attr is garages in stead of Garages then do change that
Thanks a lot for your help! It was indeed case sensitive;
And I was missing the module card-mod so I installed it via HACS.
2 final questions:
- The list shows 10 results while the datafeed has 12. I didn’t notice anything in the code that would limit this.
- If you look at the 4th column ‘Bezetting’ then this doesn’t always seem to be the difference between amount of parking spaces and free spaces.
I can see only 10 (0 to 9)
You are hopefully not asking me why Ghent garages cannot calculate the diff between two figures
But on 2 seriously, and where i live this is more than common…people take up more space quite a few times or the system is broken or calc is wrong indeed (doubt it)
Hi,
Ok. So only 10 are send by the API then?
On this URL I saw 12 garages but this isn’t in the API then.
Thanks for all the help!
Have a nice day!
I just copied your api/link and noticed the output. I have no clue about non-API data
Where do you see 12 garages?
EDIT, and if you want me to start a rant on discrepancies (as a Dutch guy living in France)…be really sure …
I forgot to paste the link.
I know that you can only provide the information that is available. Stad Gent probably needs to check the data.
If you look at the API tab, the default setting is 10 rows so that explained the initial link being limited
In the sensor you can change the https to this which has rows=15 in it, it will still show only 12 but then you are prepared if/when Ghent decides to add garages.
https://data.stad.gent/api/records/1.0/search/?dataset=bezetting-parkeergarages-real-time&q=&rows=15&sort=-occupation&facet=name&facet=lastupdate&facet=description&facet=categorie
Thank you so much for all the help!!! Everything is working now!
besides the actual content, this is an amazingly nice card_mod for the markdown card
Id strongly suggest you post this in the card_mod thread, so all can learn how to nicely display a Markdown listing.
This warrants its own section in the example listing at the top imho.
Id probably want to add some scrolling there to keep the header visible at al times, but we have tools for that using the <p> </p>
, just have to find the correct spot for adding that
very nice! thanks
Great, could you please mark (tickbox) one of my posts for ‘solution’ as this may help others too
I am not very advanced in the CSS area so what do you mean with scrolling? If I put such a list on my dashboard (I have other much larger lists too), it is the dashboard that scrolls, not the list. Do I read it correctly that within a markdown card one can scroll too? Do you have an example on how to accomplish this?
sure. In its simplest form you can scroll the contents like:
type: custom:hui-element
card_type: markdown
card_mod:
style: |
ha-card.type-markdown {
box-shadow: none;
border-top: 1px groove var(--divider-color);
overflow-y: scroll;
height: 300px;
}
content: >
note this is using some custom elements. in a single markdown card you can use it directly, but I have these inside entities cards, so have set these extra mods to secure it only applies to that single card.
a bit more complex, and that is what I was referring to, would be to use paragraphs <p>text</p>
, and scroll inside the contents:
see the post by Ildar and some issues with that because of templating: 🔹 Card-mod - Add css styles to any lovelace card - #4376 by Mariusthvdb
we started exploring that here
Super, works apparently also with out the custom hui element.
I am adding this now to a few of my cards too, am trying to reduce dashboard scrolling since a few days, started of with the tabbed card to group cards but still stuck with the larger ones…not any more !
yes, I have set most cards to a max of 400 (500 with button crds), some long listings of entities simply cant live without that imho.
and you can also do it with grids, which is also very nice to have, especially with things like custom:button-cards (or core tiles)
for grid, you need custom:mod-card though, as it has no ha-card element:
type: vertical-stack
cards:
- type: custom:button-card
template: button_default_title
name: >
[[[ let actueel = states['sensor.actueel_verbruik_switches'].state;
return 'Schakelaars: ' + actueel + ' W'; ]]]
variables:
path: home
hold_action:
action: navigate
navigation_path: >
[[[ return window.location.pathname.split('/')[2] === 'schakelaars'
? '/ui-sub-views/summary_groups' : '/ui-overzicht/schakelaars'; ]]]
- type: custom:mod-card
card_mod:
style: |
:host {
max-height: 500px;
overflow-y: scroll;
}
card:
type: grid
columns: 4
cards:
there are several more variants I use, (eg inside a fold_entity_row, or auto-entities), but I think they’re all documented in the card-mod thread
Added value for markdown is that I can set height the same which looks a lot neater then just ‘random’
exactly. note I only added the border-top there, to set it out against the card above it, and it seems to nicely slide under that:
Fancy…something for the future for me, I am still trying to get my head around which data I really want to see/use and when…I have way (!) too much to deal or care about
hehe, right, back to topic
I know this topic is a bit old, however, I stumbled upon it when looking for an integration to get the real time parking data for Gent.
As there was no integration yet, I’ve decided to develop an integration myself.
The first version is available via a custom repo in hacs, the process to get it in the hacs store is ongoing.