Customising the BOM Weather and lovelace - now in HACS

In addition to what Tom said, press F12 (Chrome) then right click the refresh button and select Clear Cache and Hard Reload and then CTRL+R a few times…

I have followed those instruction so far. My card text was reformatted by Hassio and put the type at the bottom:

entity_current_conditions: sensor.bom_newborough_icon_0
entity_forecast_high_temp_1: sensor.bom_newborough_max_temp_c_1
entity_forecast_high_temp_2: sensor.bom_newborough_max_temp_c_2
entity_forecast_high_temp_3: sensor.bom_newborough_max_temp_c_3
entity_forecast_high_temp_4: sensor.bom_newborough_max_temp_c_4
entity_forecast_high_temp_5: sensor.bom_newborough_max_temp_c_5
entity_forecast_icon_1: sensor.bom_newborough_icon_1
entity_forecast_icon_2: sensor.bom_newborough_icon_2
entity_forecast_icon_3: sensor.bom_newborough_icon_3
entity_forecast_icon_4: sensor.bom_newborough_icon_4
entity_forecast_icon_5: sensor.bom_newborough_icon_5
entity_forecast_low_temp_1: sensor.bom_newborough_min_temp_c_1
entity_forecast_low_temp_2: sensor.bom_newborough_min_temp_c_2
entity_forecast_low_temp_3: sensor.bom_newborough_min_temp_c_3
entity_forecast_low_temp_4: sensor.bom_newborough_min_temp_c_4
entity_forecast_low_temp_5: sensor.bom_newborough_min_temp_c_5
entity_summary_1: sensor.bom_newborough_summary_1
entity_summary_2: sensor.bom_newborough_summary_2
entity_summary_3: sensor.bom_newborough_summary_3
entity_summary_4: sensor.bom_newborough_summary_4
entity_summary_5: sensor.bom_newborough_summary_5
title: BOM Weather
type: custom:bom-weather-card

I have kept the lines to the minimum in the hope of getting the data through to the card. The only note I get now in the card editor is No visual editor available for: custom:bom-weather-card

No visual editor is correct… you have to use yaml to configure it. I’ll check your config in the morning… bed time here…
EDIT: Is the card displaying at all? What is in the confir? Are you using the package? Can you show that as well please?

1 Like

No the card does not display at all.

configuration.yaml contains

homeassistant:
  customize: !include customize.yaml
  packages: !include_dir_named packages

Yes. Package is in the correct folder and being used:
weather.yaml

# Download the BOM icons from https://github.com/DavidFW1960/bom_forecast/blob/3d5c5dce220a302e719f497c0ee755bacda0f04b/bom_icons.zip
# and save them under <config-dir>/www/icons/bom_icons/ (Note this is for the example in the ftp component. This is different to the animated card.)
# For the animated card follow the instructions and put the icons in <config-dir>/www/icons/weather_icons. This is a DIFFERENT icon file to the above.
# Show BOM Satellite and Radar

sensor:

  - platform: bom
    station: IDV60801.94900
    name: newborough
    monitored_conditions:
      - apparent_t
      - delta_t
      - gust_kmh
      - gust_kt
      - air_temp
      - dewpt
      - rain_trace
      - rel_hum
      - wind_dir
      - wind_spd_kmh
      - wind_spd_kt

  - platform: bom_forecast
    product_id: IDV10712
    name: newborough
    forecast_days: 6
    rest_of_today: true
    friendly: false
    friendly_state_format: '{max}, {summary}'
    monitored_conditions:
      - 'max'
      - 'min'
      - 'chance_of_rain'
      - 'possible_rainfall'
      - 'summary'
      - 'detailed_summary'
      - 'icon'
      - 'uv_alert'
      - 'fire_danger'
      
  - platform: template
    sensors:

      bom_current_text:
        value_template: >
            {% set val = states('sensor.bom_newborough_summary_0').split('.')[0] %} 
            {{ val | title }}

      bom_uv_alert:
        value_template: >
            {%- if states('sensor.bom_newborough_uv_alert_0') == '##' -%}
            UV Today: No Data
            {%- elif states('sensor.bom_newborough_uv_alert_0') != 'n/a' -%} 
            UV Today: {{ states('sensor.bom_newborough_uv_alert_0') }}
            {%- elif states('sensor.bom_newborough_uv_alert_1') == '##' -%}
            UV Tomorrow: No Data
            {%- else -%}
            UV Tomorrow: {{ states('sensor.bom_newborough_uv_alert_1') }}
            {%- endif -%}

      bom_uv_alert_summary:
        value_template: >
            {%- if states('sensor.bom_newborough_uv_alert_0') == '##' -%} 
            {% set val = 'No Data' %}
            {%- elif states('sensor.bom_newborough_uv_alert_0') != 'n/a' -%} 
            {% set val = states('sensor.bom_newborough_uv_alert_0').split('[')[1].split(']')[0] %}
            {%- elif states('sensor.bom_newborough_uv_alert_1') == '##' -%} 
            {% set val = 'No Data' %}
            {%- elif states('sensor.bom_newborough_uv_alert_1') != 'n/a' -%} 
            {% set val = states('sensor.bom_newborough_uv_alert_1').split('[')[1].split(']')[0] %}
            {%- else -%}
            {%- set val = 'No Data' -%}
            {%- endif -%}
            {{ val | title }} 
          
      bom_fire_danger:
        value_template: >
            {%- if states('sensor.bom_newborough_fire_danger_0') == '##' -%}
            Fire Danger Today: No Data
            {%- elif states('sensor.bom_newborough_fire_danger_0') != 'n/a' -%} 
            Fire Danger Today: {{ states('sensor.bom_newborough_fire_danger_0') }}
            {%- elif states('sensor.bom_newborough_fire_danger_1') == '##' -%}
            Fire Danger Tomorrow: No Data
            {%- else -%}
            Fire Danger Tomorrow: {{ states('sensor.bom_newborough_fire_danger_1') }}
            {%- endif -%}

      bom_fire_danger_summary:
        value_template: >
            {%- if states('sensor.bom_newborough_fire_danger_0') == '##' -%}
            No Data
            {%- elif states('sensor.bom_newborough_fire_danger_0') != 'n/a' -%} 
            {{ states('sensor.bom_newborough_fire_danger_0') }}
            {%- elif states('sensor.bom_newborough_fire_danger_1') == '##' -%}
            No Data
            {%- else -%}
            {{ states('sensor.bom_newborough_fire_danger_1') }}
            {%- endif -%}

      bom_forecast_0:
        entity_id:
          - sensor.bom_today_max
          - sensor.bom_today_min
          - sensor.bom_newborough_chance_of_rain_0
          - sensor.bom_newborough_icon_0
        friendly_name: "Today"
        value_template: >
          {{states('sensor.bom_today_max')|round(0)}}°/{{states('sensor.bom_today_min')|round(0)}}°/{{states('sensor.bom_newborough_chance_of_rain_0')|round(0)}}%
        entity_picture_template: >-
          {%- if states('sun.sun') == 'below_horizon' and (states('sensor.bom_newborough_icon_0') == 'fog' or states('sensor.bom_newborough_icon_0') == 'haze' or states('sensor.bom_newborough_icon_0') == 'light-showers' or states('sensor.bom_newborough_icon_0') == 'partly-cloudy' or states('sensor.bom_newborough_icon_0') == 'showers') -%}
          {{ '/local/icons/bom_icons/' ~ states('sensor.bom_newborough_icon_0') ~ '-night.png' }}
          {%- else -%}
          {{ '/local/icons/bom_icons/' ~ states('sensor.bom_newborough_icon_0') ~ '.png' }}
          {%- endif -%}

      bom_forecast_1:
        entity_id:
          - sensor.bom_newborough_max_temp_c_1
          - sensor.bom_newborough_min_temp_c_1
          - sensor.bom_newborough_chance_of_rain_1
          - sensor.bom_newborough_icon_1
        friendly_name_template: >
          {%- set date = as_timestamp(now()) + (1 * 86400 ) -%}
          {{ date | timestamp_custom('Tomorrow (%-d/%-m)') }}
        value_template: >
          {{states('sensor.bom_newborough_max_temp_c_1')|round(0)}}°/{{states('sensor.bom_newborough_min_temp_c_1')|round(0)}}°/{{states('sensor.bom_newborough_chance_of_rain_1')|round(0)}}%
        entity_picture_template: >-
          {{ '/local/icons/bom_icons/' ~ states('sensor.bom_newborough_icon_1') ~ '.png' }}

      bom_forecast_2:
        entity_id:
          - sensor.bom_newborough_max_temp_c_2
          - sensor.bom_newborough_min_temp_c_2
          - sensor.bom_newborough_chance_of_rain_2
          - sensor.bom_newborough_icon_2
        friendly_name_template: >
          {%- set date = as_timestamp(now()) + (2 * 86400 ) -%}
          {{ date | timestamp_custom('%A (%-d/%-m)') }}
        value_template: >
          {{states('sensor.bom_newborough_max_temp_c_2')|round(0)}}°/{{states('sensor.bom_newborough_min_temp_c_2')|round(0)}}°/{{states('sensor.bom_newborough_chance_of_rain_2')|round(0)}}%
        entity_picture_template: >-
          {{ '/local/icons/bom_icons/' ~ states('sensor.bom_newborough_icon_2') ~ '.png' }}

      bom_forecast_3:
        entity_id:
          - sensor.bom_newborough_max_temp_c_3
          - sensor.bom_newborough_min_temp_c_3
          - sensor.bom_newborough_chance_of_rain_3
          - sensor.bom_newborough_icon_3
        friendly_name_template: >
          {%- set date = as_timestamp(now()) + (3 * 86400 ) -%}
          {{ date | timestamp_custom('%A (%-d/%-m)') }}
        value_template: >
          {{states('sensor.bom_newborough_max_temp_c_3')|round(0)}}°/{{states('sensor.bom_newborough_min_temp_c_3')|round(0)}}°/{{states('sensor.bom_newborough_chance_of_rain_3')|round(0)}}%
        entity_picture_template: >-
          {{ '/local/icons/bom_icons/' ~ states('sensor.bom_newborough_icon_3') ~ '.png' }}

      bom_forecast_4:
        entity_id:
          - sensor.bom_newborough_max_temp_c_4
          - sensor.bom_newborough_min_temp_c_4
          - sensor.bom_newborough_chance_of_rain_4
          - sensor.bom_newborough_icon_4
        friendly_name_template: >
          {%- set date = as_timestamp(now()) + (4 * 86400 ) -%}
          {{ date | timestamp_custom('%A (%-d/%-m)') }}
        value_template: >
          {{states('sensor.bom_newborough_max_temp_c_4')|round(0)}}°/{{states('sensor.bom_newborough_min_temp_c_4')|round(0)}}°/{{states('sensor.bom_newborough_chance_of_rain_4')|round(0)}}%
        entity_picture_template: >-
          {{ '/local/icons/bom_icons/' ~ states('sensor.bom_newborough_icon_4') ~ '.png' }}

      bom_forecast_5:
        entity_id:
          - sensor.bom_newborough_max_temp_c_5
          - sensor.bom_newborough_min_temp_c_5
          - sensor.bom_newborough_chance_of_rain_5
          - sensor.bom_newborough_icon_5
        friendly_name_template: >
          {%- set date = as_timestamp(now()) + (5 * 86400 ) -%}
          {{ date | timestamp_custom('%A (%-d/%-m)') }}
        value_template: >
          {{states('sensor.bom_newborough_max_temp_c_5')|round(0)}}°/{{states('sensor.bom_newborough_min_temp_c_5')|round(0)}}°/{{states('sensor.bom_newborough_chance_of_rain_5')|round(0)}}%
        entity_picture_template: >-
          {{ '/local/icons/bom_icons/' ~ states('sensor.bom_newborough_icon_5') ~ '.png' }}

      bom_forecast_6:
        entity_id:
          - sensor.bom_newborough_max_temp_c_6
          - sensor.bom_newborough_min_temp_c_6
          - sensor.bom_newborough_chance_of_rain_6
          - sensor.bom_newborough_icon_6
        friendly_name_template: >
          {%- set date = as_timestamp(now()) + (6 * 86400 ) -%}
          {{ date | timestamp_custom('%A (%-d/%-m)') }}
        value_template: >
          {{states('sensor.bom_newborough_max_temp_c_6')|round(0)}}°/{{states('sensor.bom_newborough_min_temp_c_6')|round(0)}}°/{{states('sensor.bom_newborough_chance_of_rain_6')|round(0)}}%
        entity_picture_template: >-
          {{ '/local/icons/bom_icons/' ~ states('sensor.bom_newborough_icon_6') ~ '.png' }}

      bom_today_max:
        entity_id:
          - sensor.bom_newborough_max_temp_c_0
          - sensor.today_temp_bom
        value_template: >
          {%- if states('sensor.bom_newborough_max_temp_c_0') == 'n/a' -%} 
            {{ state_attr('sensor.today_temp_bom', 'max_value') }}
          {% else %}
            {{ states('sensor.bom_newborough_max_temp_c_0') }}
          {% endif %}

      bom_today_min:
        entity_id:
          - sensor.bom_newborough_min_temp_c_0
          - sensor.today_temp_bom
        value_template: >
          {%- if states('sensor.bom_newborough_min_temp_c_0') == 'n/a' -%} 
            {{ state_attr('sensor.today_temp_bom', 'min_value') }}
          {% else %}
            {{ states('sensor.bom_newborough_min_temp_c_0') }}
          {% endif %}

  - platform: statistics
    name: today_temp_bom
    sampling_size: 150
    entity_id: sensor.bom_newborough_air_temp_c
    max_age:
      hours: 24

automation:
- alias: 'Update BOM Icons'
  trigger:
    - event: start
      platform: homeassistant
    - entity_id: sun.sun
      platform: state
      to: 'above_horizon'
    - entity_id: sun.sun
      platform: state
      to: 'below_horizon'
  action:
    - service: homeassistant.update_entity
      entity_id: sensor.bom_forecast_0, sensor.bom_forecast_1, sensor.bom_forecast_2, sensor.bom_forecast_3, sensor.bom_forecast_4, sensor.bom_forecast_5, sensor.bom_forecast_6

I entered the manual card:

entity_current_conditions: sensor.bom_newborough_icon_0
entity_forecast_high_temp_1: sensor.bom_newborough_max_temp_c_1
entity_forecast_high_temp_2: sensor.bom_newborough_max_temp_c_2
entity_forecast_high_temp_3: sensor.bom_newborough_max_temp_c_3
entity_forecast_high_temp_4: sensor.bom_newborough_max_temp_c_4
entity_forecast_high_temp_5: sensor.bom_newborough_max_temp_c_5
entity_forecast_icon_1: sensor.bom_newborough_icon_1
entity_forecast_icon_2: sensor.bom_newborough_icon_2
entity_forecast_icon_3: sensor.bom_newborough_icon_3
entity_forecast_icon_4: sensor.bom_newborough_icon_4
entity_forecast_icon_5: sensor.bom_newborough_icon_5
entity_forecast_low_temp_1: sensor.bom_newborough_min_temp_c_1
entity_forecast_low_temp_2: sensor.bom_newborough_min_temp_c_2
entity_forecast_low_temp_3: sensor.bom_newborough_min_temp_c_3
entity_forecast_low_temp_4: sensor.bom_newborough_min_temp_c_4
entity_forecast_low_temp_5: sensor.bom_newborough_min_temp_c_5
entity_summary_1: sensor.bom_newborough_summary_1
entity_summary_2: sensor.bom_newborough_summary_2
entity_summary_3: sensor.bom_newborough_summary_3
entity_summary_4: sensor.bom_newborough_summary_4
entity_summary_5: sensor.bom_newborough_summary_5
title: BOM Weather
type: 'custom:bom-weather-card'

BINGO!
Changed this:

  - platform: bom
    station: IDV60801.94900
    name: newborough
    monitored_conditions:
      - apparent_t
      - delta_t
      - gust_kmh
      - gust_kt
      - air_temp
      - dewpt
      - rain_trace
      - rel_hum
      - wind_dir
      - wind_spd_kmh
      - wind_spd_kt

To this:

  - platform: bom
    station: IDV60801.94891
    name: newborough
    monitored_conditions:
      - apparent_t
      - cloud
      - cloud_base_m
      - cloud_oktas
      - cloud_type_id
      - cloud_type
      - delta_t
      - gust_kmh
      - gust_kt
      - air_temp
      - dewpt
      - local_date_time
      - local_date_time_full
      - press
      - press_qnh
      - press_msl
      - press_tend
      - rain_trace
      - rel_hum
      - sea_state
      - swell_dir_worded
      - swell_height
      - swell_period
      - vis_km
      - weather
      - wind_dir
      - wind_spd_kmh
      - wind_spd_kt

In my weather.yaml package file.
Thanks for your help Dave. I love this card!! :slight_smile: Cheers.

So the BOM Sensor platform has errors no???
http://www.bom.gov.au/products/IDV60801/IDV60801.94900.shtml
That says it’s offline at the moment so no sensors/data in HA are being created…
Some of those sensors seem to be mandatory. (certainly Temperature is)

OK!!!
This was not fun! Try selecting IDV60801.94891 which is nearby Latrobe Valley.
Then in Lovelace try this:

entity_apparent_temp: sensor.bom_newborough_feels_like_c
entity_current_conditions: sensor.bom_newborough_icon_0
entity_temperature: sensor.bom_newborough_air_temp_c
entity_current_text: sensor.bom_current_text
entity_daily_summary: sensor.bom_newborough_detailed_summary_0
entity_daytime_high: sensor.bom_today_max
entity_daytime_low: sensor.bom_today_min
entity_forecast_high_temp_1: sensor.bom_newborough_max_temp_c_1
entity_forecast_high_temp_2: sensor.bom_newborough_max_temp_c_2
entity_forecast_high_temp_3: sensor.bom_newborough_max_temp_c_3
entity_forecast_high_temp_4: sensor.bom_newborough_max_temp_c_4
entity_forecast_high_temp_5: sensor.bom_newborough_max_temp_c_5
entity_forecast_icon_1: sensor.bom_newborough_icon_1
entity_forecast_icon_2: sensor.bom_newborough_icon_2
entity_forecast_icon_3: sensor.bom_newborough_icon_3
entity_forecast_icon_4: sensor.bom_newborough_icon_4
entity_forecast_icon_5: sensor.bom_newborough_icon_5
entity_forecast_low_temp_1: sensor.bom_newborough_min_temp_c_1
entity_forecast_low_temp_2: sensor.bom_newborough_min_temp_c_2
entity_forecast_low_temp_3: sensor.bom_newborough_min_temp_c_3
entity_forecast_low_temp_4: sensor.bom_newborough_min_temp_c_4
entity_forecast_low_temp_5: sensor.bom_newborough_min_temp_c_5
entity_summary_1: sensor.bom_newborough_summary_1
entity_summary_2: sensor.bom_newborough_summary_2
entity_summary_3: sensor.bom_newborough_summary_3
entity_summary_4: sensor.bom_newborough_summary_4
entity_summary_5: sensor.bom_newborough_summary_5
title: BOM Weather
type: 'custom:bom-weather-card'

This will display like this:
image

hahaha… just saw you solved it? You can go back to the original FTP config. Your main problem was the sensor error. Check my entities in lovelace as well…

Thanks Dave. I also think I wasn’t scraping enough from bom to make it work. When I added the extra monitored conditions it came good. Looks great. Thank you so much for your work and support!![image|231x500]

(upload://1bpHsYk9wXxu7yEwcZWgsLAJIaD.jpeg)

Nah it was the sensor error in the HA Core BOM sensor that caused the issue. None of the extra conditions you added are needed or used…
BOM only provides these that I can see:


You can check dev-tools to see what data it is actually getting. In my location BOM don’t even publish a pressure…

I see you removed apparent temp (which is why you are using the current temp for the feels like?)

1 Like

Thanks mate. I trimmed the FTP back. Not sure what you mean in your last sentence?
I have apparent temp in entity_apparent_temp: sensor.bom_newborough_feels_like_c and it looks like the current and feels! like is correct to me?

All good… I think we had clashing edits lol… anyway, glad it’s working for you.

SEE the Rain? it says invalid… means you are not parsing through rainfall today. (Slot R1)

Thanks again! Fixed that too :laughing:

Just wanted to say thank you!!
I got it to work as an absolute beginner in just two days.
What a beautiful weather card!

For me, the biggest barrier was not understanding that the card will not show at all if any elements are missing or are not configured correctly - i was still expecting a card with missing or wrong info on it.

Nicely done!

1 Like

I might be able to fix that… however there are mandatory items you need or the card won’t display at all… I will look at if it’s feasible to fix that or not.

1 Like

Thanks very much David for an amazing looking weather interface! For me the biggest barrier was not knowing where to start. There is a lot of mention of referring to the ‘docs’ but it was hard to find one doc unless I missed something. There are a lot of github pages, all the integration pages and they all have different instructions that lead to the same end result so for those in my boat:

  1. Copy David’s weather.yaml, replace gosford with your location. Place this in packages folder
  2. Go to secrets.yaml and add in station id, product id and name
  3. Add packages to your main yaml config if you havent already done so.
  4. Go to the weather card repo and at the bottom is the text to copy and paste (replacing gosford again) into a manual card entry.

Hope this helps someone and thank you again David for an amazing weather card!

1 Like

Hi David, Looks fantastic. Just wondering how did you get the bom forecast icons in the entities card. For some reasons I cannot see mine

?? Not sure what you mean. Can you show a screenshot?

HI David see below