Customising the BOM Weather and lovelace - now in HACS

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.

Hi David, sorry for my late response. I figured out how to check the console and it is 0.79 as you said. No, it is an old install of about 6 months. It was working perfectly before this. Sometimes it works with the hard reload but never lasts long.

hi @DavidFW1960
My bom weather card also disappeared since last week.
I have checked every single entity in dev-tools, all of them exist with values.

card just wouldnā€™t display. I am running HA 0.116.2 and bom card version 0.79
in the console there I see an error related to the card, see picture
ScreenShot


i even used the slimmed down lovelace version below with no joy.

type: 'custom:bom-weather-card'
title: BOM Weather
gasentity_temperature: sensor.bom_adelaide_air_temp_c
entity_forecast_high_temp_1: sensor.bom_adelaide_max_temp_c_1
entity_forecast_high_temp_2: sensor.bom_adelaide_max_temp_c_2
entity_forecast_high_temp_3: sensor.bom_adelaide_max_temp_c_3
entity_forecast_high_temp_4: sensor.bom_adelaide_max_temp_c_4
entity_forecast_high_temp_5: sensor.bom_adelaide_max_temp_c_5
entity_forecast_icon_1: sensor.bom_adelaide_icon_1
entity_forecast_icon_2: sensor.bom_adelaide_icon_2
entity_forecast_icon_3: sensor.bom_adelaide_icon_3
entity_forecast_icon_4: sensor.bom_adelaide_icon_4
entity_forecast_icon_5: sensor.bom_adelaide_icon_5
entity_forecast_low_temp_1: sensor.bom_adelaide_min_temp_c_1
entity_forecast_low_temp_2: sensor.bom_adelaide_min_temp_c_2
entity_forecast_low_temp_3: sensor.bom_adelaide_min_temp_c_3
entity_forecast_low_temp_4: sensor.bom_adelaide_min_temp_c_4
entity_forecast_low_temp_5: sensor.bom_adelaide_min_temp_c_5
entity_summary_1: sensor.bom_adelaide_summary_1
entity_summary_2: sensor.bom_adelaide_summary_2
entity_summary_3: sensor.bom_adelaide_summary_3
entity_summary_4: sensor.bom_adelaide_summary_4
entity_summary_5: sensor.bom_adelaide_summary_5

card just wouldn't display. I am running HA 0.116.2 and bom card version 0.79
in the console there I see an error related to the card, see picture [Screenshot](https://ibb.co/8XWN3mV)

ā€œThe name weather-card has already been usedā€¦ā€

Do you have another custom weather card?

First error is nothing to do with this cardā€¦itā€™s just listed under the card there in the console.

that is wrongā€¦

Line 416 is pressureā€¦ are you passing through pressure? Is pressure defined as one of the slots? Many BOM stations donā€™t provide pressure. Line 26 is apparent feels like tempā€¦

116.2 and v 0.79 are fine for everyone else so something else must be wrong hereā€¦ Have you tried a different computer/browser? It was working before but not now - has anything else changed?

Most of those cards are using the weather domain whereas this card uses the sensor domainā€¦ You need to check in dev-tools not the entity registry to see if these sensors exist in there. The entity registry will show them if they EVER existed whereas dev-tools shows if they exist NOW. They have to exist now to display on the card.

also noticed you seem to have a mix of weather stations used??
image
Iā€™m not sitting at your computer so I canā€™t go through dev-tools to check your entities etcā€¦

when it disappears check the entities in dev-tools. Perhaps you are having problems with the BOM sensor. If the entities are disappearing then the card will disappear as well. I donā€™t know what else to sayā€¦ I am not seeing this issue on any of my installsā€¦

Hi David,

Thanks for the tips, I will ensure I check every entities and ensure that their values are valid.

Oh yes, I do monitor 2 weather stations, one the central CBD (Perth), the other closer to home for me, which I will use as a sensor for things like retic controlling. :slight_smile:

1 Like

SOLVED IT, THANKYOU ONCE AGAIN
I cannot tell when exactly it disappeared, but possibly in the 0.115<->0.116 upgrade process.
One thing i noticed is the HACS installation. It was installed old fashioned way from configuration yaml.
While troubleshooting i saw HACS sometimes did not show on the side bar, so removed yaml entry and reinstalled HACS from HA>Configration>Integrations. And just for the sake of it, i reinstalled bom_forecast, bom_weather_card and recreated lovelace card from your sample gosford one. All works well.


So to answer you questions:
yes, ā€˜gasentity_temperatureā€™ was a typo on the test lovelace card created for troubleshooting. The original card has been unchanged for a long time.

I have been using your card since July 2019 and it is the first item on my front page, and I love it.

1 Like

Ah well that explains it then. If HACS isnā€™t working then the ā€˜endpointā€™ folder /hacsfiles doesnā€™t existā€¦ and then lovelace canā€™t find the card which is in /hacsfiles/bom-weather-cardā€¦ hence the error. I wonder if this is @autumnleaf and @alex.hart645 problem as well? There seems to be a few people with weird issues latelyā€¦

I found the hacs folder and all looks fine, and it is loading into the sidebar okay. In saying that, I cannot update custom header, so there could be an error somewhere. If I continually press F5 with hard resets within console the card does display but just for a undefined period of time. So weird!

Definitely. If it displays then that indicates it is configured correctly. Do entities disappear at all? that could cause the card to disappear. Do any other custom cards do anything weird at all? Custom Header is now deprecated so maybe that is why that wonā€™t update as the repo is also archived. have too many other ideas.
You could move the bom directory into www and then edit the resources to point to that instead which will eliminate any hacs issueā€¦ I could also remote into your system (teamviewer) and have a poke around to check everything if you would like me toā€¦

Apologies if this has been covered before, 559 posts on this topic, but I did use search and couldnā€™t find what I needed. I keeps getting the following in my logs;
Maybe not the right channel, please let me know. I keep getting the following in my logs for some filter sensors Iā€™ve set up
2020-10-20 05:52:17 WARNING (MainThread) [homeassistant.components.template.sensor] The 'entity_id' option is deprecated, please remove it from your configuration
The issue is from the template sensors in my BOm package. Anyone know is ā€˜entity_idā€™ has been replaced or do I just get rid of it all?