Australian BOM Rain Radar Card

I wonder actually if I could use the config-template card to do the heavy lifting actually… I am going to try it anyway.

I’ll have a look when I can. I am currently finishing of a patch for Tasmota, so this will have to come after that. Adding additional icons and changing the centre of the map is easy, but as I said I am not sure how to subscribe to tracking locations.

Using the config-template card… (Doesn’t work)

  - title: Radar
    path: radar
    icon: mdi:weather-cloudy
    cards:
      - type: 'custom:config-template-card'
        variables:
          - states['device_tracker.davids_iphone_2'].attributes['latitude']
          - states['device_tracker.davids_iphone_2'].attributes['longitude']
        entities:
          - device_tracker.davids_iphone_2
        card:
          - type: 'custom:bom-radar-card'
            center_latitude: "${vars[0]}"
            center_longitude: "${vars[1]}"

Setting the entity to the device_tracker will cause the templates to update whenever the entity does…

The error:

No card type defined
type: 'custom:config-template-card'
variables:
  - 'states[''device_tracker.davids_iphone_2''].attributes[''latitude'']'
  - 'states[''device_tracker.davids_iphone_2''].attributes[''longitude'']'
entities:
  - device_tracker.davids_iphone_2
card:
  - type: 'custom:bom-radar-card'

The nice redscreen error lol

V1.2.17 is out. Hopefully I didn’t screw it up. The only change is the location of the Mildura radar. A new radar has been brought online in a different location (moved about 40km west).

1 Like

Rad card. I tried doing a big zoom in plus two small zoom outs. The zoom outs are in a horizontal stack, but I’d like them square “thumbnails”. Is that possible?

Also Fully Kiosk Browser (for a wall mounted dashboard) only shows ddd mmm dd (Mon Mar 22), but no time (Chrome shows the time incrementing). Any idea what’s happening there?

Thanks.

I think the way I programmed it the map height is fixed at 500/512px. Not sure what the best way to deal with that is. If I could query the width I could adjust the height to match, but not sure that is easy.

1 Like

No idea about the missing time, suggest raising it as an issue with details so I can try and replicate.

1 Like

V1.2.18 is available.
The Hillston NSW radar has been brought online. This update just adds the new location for range rings etc.

1 Like

I only just found this, it works great thanks so much!

One minor bug, on mobile the zoom level is off by one; if the card is set to zoom level 8, mobile shows this as zoom level 7. Desktop browsers are fine.

The easiest way to demonstrate this is with zoom level 4 and 5. Both card settings show the same zoom level on mobile (the most zoomed out map) but desktop shows different (correct) levels.

If it makes a difference I’m using the HA app on an Android phone. Let me know if you need any other details.

It might. I’m using the iOS app and do not see that issue.

I accidentally included some ‘work in progress’ stuff in the last release that should have only included the new location. I will try and get that work complete, that is related to being able to control the height of the card. It is proving to be tricky to get right when the width of the browser window is changed.
The bug you found will only happen if the width of the window is less than 400px. I will try and get it sorted in the next few days.

I have just published a pre-release version with code that hopefully fixes some/all of the sizing issues.
It now works in panel mode by filling the entire client area.
If you add an option of square_map: true it will also keep the map square which should look better on mobile devices.
I may add an option to fix the map height to a specified number of pixels if there is demand.
Please test and report and good/bad experiences.

Very happy to test this but you’ll have to let me know how to install the pre-release version, HACS seems to think v1.2.18 is the latest.

When you go to reinstall the card, check the box that says beta and you will get pre releases

Yep, as @DavidFW1960 said. Go to HACS and hit the 3 dots on the card and choose reinstall, you then get an option to show beta versions.

@Mahko_Mahko try the latest beta version (1.3.0b) and see if it improves things for you.

Unfortunately v1.3.0b isn’t showing up, I’ve uninstalled the card and reinstalled it, cleared my cache and restarted my browser. Any ideas?

That’s weird. I saw it as soon as I enabled Beta Versions (no cache clear required).

Maybe try selecting the ‘Update Information’ on the 3 dots menu for the card. Your HA may not have refreshed that yet for some reason.

Got it, needed to restart HA. The card zoom level is all good on mobile in this version, thanks for your work!

1 Like