Customising the BOM Weather and lovelace - now in HACS

Even more confusing now. It’s windy today but still the wrong icon for wind?

image

Is it something to do with the times? Start time local looks right but issue time hasn’t occurred yet?

ok so what do you have for old_icons in config? Default is true so maybe try false or hybrid. (Hybrid is a mix of old and new) The original icons didn’t have an icon for windy. Make sure you get the latest icons if you haven’t already

I had no entry in my config for old_icons: Tried setting it to false made no difference. Tried hybrid and it’s resolved. Thanks for your help.

1 Like

you may need to put false in ‘’… is ‘false’
I have a view in HA that displays all possible icon options and false works here…

Ok GOOD NEWS. @theRat Simon has fixed this for 0.116.x compatability. Also backwards compatable with 0.115.6 etc…
Simon also wrote the excellent BOM Radar Card

2 Likes

Thanks Simon and Dave, working again 0.116.

1 Like

Yeah. It’s all thanks to Simon…

No probs all. I lifted the fix from another card that had the problem.

1 Like

Ha!!
I tried that as well… scanned all the weather cards that had been updated and couldn’t find a fix. Kudos to you anyway. You knew better than me what to look for. Honestly I’m just hacking the work of others and adding options in my component/card. I’m standing on the shoulders of giants lol.

Hi David, I have done but a HA restart and chrome reload and still not having any luck getting the card to show. I can see errors when loading up F12. Have I missed the fix other than a restart? Thank you!

Have you updated to latest version? Are you on HA 0.116.x? There was an update to this card for 0.116.
If this is the first time you have tried to use the card, the most common problem is parsing non existent entities to the card… More infor needed from you to help with this.

Thank you for your reply, I really appriciate it! I updated from 115 directly to 116.1. Okay, so how would I go about fixing the parsing non exsitent entities?

An you check in the console and see what version of the card you have. (Should be 0.79) Also with console open (F12) right-click refresh and select empty cache and hard reload. This is a new install right?
Can you show the card config please.

Hi David,

I wonder if you could help me… I could never get your wonderful BOM weather card to appear in my lovelace dashboard whereas the other custom weather cards from HACS appear to work fine (except for the icons as they expect some of the weather conditions named slightly differently from what BOM issues)…

Here’s a view of my dashboard:

and here a view of my config in my attempt to use your custom BOM weather card:

and here’s the actual config

type: 'custom:bom-weather-card'
title: BOM Perth Weather
locale: en
static_icons: false
refresh_interval: 120
show_decimals: false
entity_sun: sun.sun
entity_daytime_high: sensor.bom_today_max
entity_daytime_low: sensor.bom_today_min
entity_current_conditions: sensor.bom_perth_weather
entity_temperature: sensor.bom_perth_air_temp_c
entity_forecast_high_temp_1: sensor.bom_perth_forecast_max_temp_c_1
entity_forecast_high_temp_2: sensor.bom_perth_forecast_max_temp_c_2
entity_forecast_high_temp_3: sensor.bom_perth_forecast_max_temp_c_3
entity_forecast_high_temp_4: sensor.bom_perth_forecast_max_temp_c_4
entity_forecast_high_temp_5: sensor.bom_perth_forecast_max_temp_c_5
entity_forecast_icon_1: sensor.bom_perth_forecast_icon_1
entity_forecast_icon_2: sensor.bom_perth_forecast_icon_2
entity_forecast_icon_3: sensor.bom_perth_forecastd_icon_3
entity_forecast_icon_4: sensor.bom_perth_forecast_icon_4
entity_forecast_icon_5: sensor.bom_perth_forecast_icon_5
entity_forecast_low_temp_1: sensor.bom_perth_forecast_min_temp_c_1
entity_forecast_low_temp_2: sensor.bom_perth_forecast_min_temp_c_2
entity_forecast_low_temp_3: sensor.bom_perth_forecast_min_temp_c_3
entity_forecast_low_temp_4: sensor.bom_perth_forecast_min_temp_c_4
entity_forecast_low_temp_5: sensor.bomperth_forecast_min_temp_c_5
entity_summary_1: sensor.bom_perth_forecast_summary_1
entity_summary_2: sensor.bom_perth_forecast_summary_2
entity_summary_3: sensor.bom_perth_forecast_summary_3
entity_summary_4: sensor.bom_perth_forecast_summary_4
entity_summary_5: sensor.bom_perth_forecast_summary_5

What would I have done wrong? Are you able to spot any glaring mistakes?

Thank you so much for your help!

Kind Regards
Ed

Can you show how you have configured the bom sensor and the ftp sensor and the template sensors you are using?

I’m going to guess you aren’t passing through the correct entities to the card. If the entities you are parsing through don’t exist the card won’t show.

Hi David,

Thanks for this super quick response… please see my config for the BOM sensors:

  - platform: bom_forecast
    product_id: IDW12300
    name: Perth Forecast
    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:
        friendly_name: "BOM Forecast"
        value_template: >
            {% set val = states('sensor.bom_perth_forecast_summary_0').split('.')[0] %} 
            {{ val | title }}

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

      bom_uv_alert_summary:
        friendly_name: "BOM Forecast UV Alert"
        value_template: >
            {%- if states('sensor.bom_perth_forecast_uv_alert_0') == '##' -%} 
            {% set val = 'No Data' %}
            {%- elif states('sensor.bom_perth_forecast_uv_alert_0') != 'n/a' -%} 
            {% set val = states('sensor.bom_perth_forecast_uv_alert_0').split('[')[1].split(']')[0] %}
            {%- elif states('sensor.bom_perth_forecast_uv_alert_1') == '##' -%} 
            {% set val = 'No Data' %}
            {%- elif states('sensor.bom_perth_forecast_uv_alert_1') != 'n/a' -%} 
            {% set val = states('sensor.bom_perth_forecast_uv_alert_1').split('[')[1].split(']')[0] %}
            {%- else -%}
            {%- set val = 'No Data' -%}
            {%- endif -%}
            {{ val | title }} 
          
      bom_fire_danger:
        friendly_name: "BOM Forecast Fire danger "
        value_template: >
            {%- if states('sensor.bom_perth_forecast_fire_danger_0') == '##' -%}
            Fire Danger Today: No Data
            {%- elif states('sensor.bom_perth_forecast_fire_danger_0') != 'n/a' -%} 
            Fire Danger Today: {{ states('sensor.bom_perth_forecast_fire_danger_0') }}
            {%- elif states('sensor.bom_perth_forecast_fire_danger_1') == '##' -%}
            Fire Danger Tomorrow: No Data
            {%- else -%}
            Fire Danger Tomorrow: {{ states('sensor.bom_perth_forecast_fire_danger_1') }}
            {%- endif -%}

      bom_fire_danger_summary:
        friendly_name: "BOM Forecast Fire danger summary "
        value_template: >
            {%- if states('sensor.bom_perth_forecast_fire_danger_0') == '##' -%}
            No Data
            {%- elif states('sensor.bom_perth_forecast_fire_danger_0') != 'n/a' -%} 
            {{ states('sensor.bom_perth_forecast_fire_danger_0') }}
            {%- elif states('sensor.bom_perth_forecast_fire_danger_1') == '##' -%}
            No Data
            {%- else -%}
            {{ states('sensor.bom_perth_forecast_fire_danger_1') }}
            {%- endif -%}

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

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

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

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

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

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

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

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

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

  - platform: statistics
    name: today_temp_bom_stats
    sampling_size: 150
    entity_id: sensor.bom_perth_air_temp_c
    max_age:
      hours: 24

… and here’s a snapshot of the entity list from the configuration -> Entities section

so the current_conditions one for sure is wrong should be sensor.bom_forecast I think.

Check in dev_tools to see if the entities exist in there and have values

Hi David,

Yes, I can see why it is confusing, I have got another sensor which is defined as such:

  - platform: bom
    station: "IDW60901.94608"
    name: Perth
    monitored_conditions:
      - apparent_t
      - gust_kmh
      - air_temp
      - rain_trace
      - rel_hum
      - vis_km
      - weather
      - wind_dir
      - wind_spd_kmh

This was done a while back prior to discovering and using your forecast/lovelace card, which results in these lots of entitiies:


and

I know it’s confusing but the entities defined are all there. They are all showing in my other weather/entities cards.

I’ve pretty much taken your example and plonk the entire config into it, changing the entity names to match mine. Should have worked, but unfortunately not for some reasons. Using similar weather (eg. HACS Weather conditions) cards with the same lots of entities show their values and results ok, naturally I would have loved to use the one you have developed as it is tailored for BOM values.

Will do more digging and thanks again for your help.