Parking lots (garages) in Ghent. Can someone help to develop?

I forgot to paste the link. :slight_smile:

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! :slight_smile:

besides the actual content, this is an amazingly nice card_mod for the markdown card :wink:

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 :wink:

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

1 Like

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:

Mar-17-2023 08-37-14

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 :wink: