Customising the BOM Weather and lovelace - now in HACS

I haven’t had a chance to look into it yet. I’ll be back if I can’t get it sorted. Cheers

1 Like

I’ve tried a cut down version of the card config and checked that all the entities listed below definitely exist and have correct values.

I must be missing something that isn’t ‘optional’.

type: 'custom:bom-weather-card'
title: BOM Weather
entity_current_conditions: sensor.morley_icon_descriptor_0
entity_temperature: sensor.perth_temp
entity_forecast_high_temp_1: sensor.morley_temp_max_1
entity_forecast_high_temp_2: sensor.morley_temp_max_2
entity_forecast_high_temp_3: sensor.morley_temp_max_3
entity_forecast_high_temp_4: sensor.morley_temp_max_4
entity_forecast_high_temp_5: sensor.morley_temp_max_5
entity_forecast_icon_1: sensor.morley_icon_descriptor_1
entity_forecast_icon_2: sensor.morley_icon_descriptor_2
entity_forecast_icon_3: sensor.morley_icon_desciptor_3
entity_forecast_icon_4: sensor.morley_icon_desciptor_4
entity_forecast_icon_5: sensor.morley_icon_desciptor_5
entity_forecast_low_temp_1: sensor.morley_temp_min_1
entity_forecast_low_temp_2: sensor.morley_temp_min_2
entity_forecast_low_temp_3: sensor.morley_temp_min_3
entity_forecast_low_temp_4: sensor.morley_temp_min_4
entity_forecast_low_temp_5: sensor.morley_temp_min_5
entity_summary_1: sensor.morley_short_text_1
entity_summary_2: sensor.morley_short_text_2
entity_summary_3: sensor.morley_short_text_3
entity_summary_4: sensor.morley_short_text_4
entity_summary_5: sensor.morley_short_text_5
entity_sun: sun.sun
entity_daytime_high: sensor.morley_temp_max_0
entity_daytime_low: sensor.morley_temp_min_0
entity_wind_bearing: sensor.perth_wind_direction
entity_wind_speed: sensor.perth_wind_speed_kilometre
entity_wind_gust: sensor.perth_gust_speed_kilometre
entity_humidity: sensor.perth_humidity
entity_apparent_temp: sensor.perth_temp_feels_like
entity_daily_summary: sensor.morley_extended_text_0
entity_pop: sensor.morley_rain_chance_0
entity_pop_intensity: sensor.perth_rain_since_9am
entity_possible_today: sensor.morley_rain_amount_range_0
entity_pos_1: sensor.morley_rain_amount_range_1
entity_pos_2: sensor.morley_rain_amount_range_2
entity_pos_3: sensor.morley_rain_amount_range_3
entity_pos_4: sensor.morley_rain_amount_range_4
entity_pos_5: sensor.morley_rain_amount_range_5
entity_pop_1: sensor.morley_rain_chance_1
entity_pop_2: sensor.morley_rain_chance_2
entity_pop_3: sensor.morley_rain_chance_3
entity_pop_4: sensor.morley_rain_chance_4
entity_pop_5: sensor.morley_rain_chance_5
entity_fire_danger_summary: sensor.morley_fire_danger_0
large_icon_left_position: 0px
large_icon_top_margin: '-3.2em'
refresh_interval: 60
separator_top_margin: 6em
show_beaufort: false
show_decimals: false
show_separator: false
static_icons: false
summary_font_size: 0.8em
summary_top_padding: 2em
sunset: true
temp_font_size: 4em
temp_font_weight: 300
temp_right_pos: 0.85em
temp_top_margin: 0px
temp_uom_right_margin: 7px
temp_uom_top_margin: '-12px'
time_format: 24
tooltip_bg_color: 'rgb( 75,155,239)'
tooltip_border_color: 'rgb(255,161,0)'
tooltip_border_width: 1
tooltip_caret_size: 5
tooltip_fg_color: '#fff'
tooltip_left_offset: -12
tooltip_width: 110
tooltips: true

Post your yaml config for the templates or are you not using any template sensors? I’m also not seeing sun.sun

Speaking of BoM template sensors…

Do we even need these template sensors any more?

- platform: average
  name: today_temp_bom
  entities:
    - sensor.hobart_temp
  start: '{{ now().replace(hour=0).replace(minute=0).replace(second=0) }}'
  end: '{{ now() }}'

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

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

These sensors seems to persist even after the daily maximum/minimum have been reached (unlike the old scrape sensors):

sensor.hobart_temp_max_0
sensor.hobart_temp_min_0

I’m not using any template. All those entities are directly from the integration. sun.sun is in there.

They don’t persist. The min will disappear around 4PM and the high generally at ~10 from when I tested…
It also makes more sense to me to use or display the actual low/high as the forecast becomes irrelevant particularly for the low at 4am and the high at 2pm… but the beauty of the card is you can choose to use any entity you want.

1 Like

Ah scrolling got me… I’ll look tomorrow… Can you PM me a lat/long so I can easily add your location on my dev machine please

Anyone else having issues with the new BoM integration?

I’m no longer getting any data.

Logger: homeassistant.components.sensor
Source: custom_components/bureau_of_meteorology/sensor.py:64
Integration: Sensor (documentation, issues)
First occurred: 11:39:44 (1 occurrences)
Last logged: 11:39:44

Error while setting up bureau_of_meteorology platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 205, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/bureau_of_meteorology/sensor.py", line 64, in async_setup_entry
    forecast_region = collector.daily_forecasts_data["metadata"]["forecast_region"]
TypeError: 'NoneType' object is not subscriptable
Logger: homeassistant.components.weather
Source: custom_components/bureau_of_meteorology/weather.py:118
Integration: Weather (documentation, issues)
First occurred: 11:39:44 (2 occurrences)
Last logged: 11:39:44

Error adding entities for domain weather with platform bureau_of_meteorology
Error while setting up bureau_of_meteorology platform for weather
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 434, in _async_add_entity
    original_icon=entity.icon,
  File "/config/custom_components/bureau_of_meteorology/weather.py", line 118, in icon
    return self.collector.daily_forecasts_data["data"][0]["mdi_icon"]
TypeError: 'NoneType' object is not subscriptable

Not seeing any error here in the weather entity using BOM

Oh great, it’s either Hobart data or my config. Thanks David.

Could be the data. If I add a new BoM integration using Hobart lat/lon it errors and wont add the integration. If I use Melbourne it works.

Well that’s odd eh. Brendan doesn’t seem to be responding to issues either at the moment. Are the other sensors working?

It looks like the Hobart AWS might be offline. The official app is showing no data either.

https://weather.bom.gov.au/location/r22u098-hobart

1 Like

Thanks. I’ll leave it for a bit and see what happens.

While looking for technical difficulties reports I found why the old integration stopped:

1 Like

Interesting. My ftp to mqtt gateway is still working :wink:

Also it looks like all of Tasmania is affected.
http://www.bom.gov.au/tas/observations/hobart.shtml
No observations since 9am for anywhere and if you click on the locations about the products are not available at all.

Do you have a link?

There are a few locations not in Brendan’s integration that I would still like to get obs for.

Hopefully they’ll notice soon.

I think the BoM have left the work experience kid in charge!

Thanks for making this card mate! It’s pretty much the only one the Mrs uses! (nuff said! :wink:)

I’ve recently started trying to use the type: custom:grid-layout of the layout-card but cannot get your BOM card working. It appers to fail when adding the view_layout: option in it.
It shows perfectly in edit mode of the view, in the correct grid position, but does not show up once I exit edit mode.

Is this a know limitation? Am I doing something wrong?

title: BOM Test
views:
  - title: Home
    path: home
    type: 'custom:grid-layout'
    layout:
      grid-template-columns: 10% 80% 10%
      grid-template-rows: auto
      grid-template-areas: |
        ". bom ."
    badges: []
    cards:
      - type: 'custom:bom-weather-card'
        view_layout:
          grid-area: bom
        entity_current_conditions: sensor.noble_park_icon_descriptor_0
        entity_temperature: sensor.moorabbin_airport_temp
        entity_forecast_high_temp_1: sensor.noble_park_temp_max_1
        etc... etc........

Hey thanks.

I am not sure about using it in a grid layout. I will try and find some time tomorrow to have a look using the config you posted.

1 Like