See my post here https://community.home-assistant.io/t/customising-the-bom-weather-and-lovelace/123549/35?u=davidfw1960 to add this to HACS.
I finally got sick of having a dark-sky as well as a BOM component and having a mish-mash of cards that incorporated both.
Specifically I am using:
https://github.com/bremor/bom_forecast
With some modifications… There is an un-documented monitored condition called icon. I also edited the custom component sensor.py file to add the standard BOM conditions according to their ADFD User Guide.pdf file.
My modified custom component can be downloaded from my github page here https://github.com/DavidFW1960/home-assistant/tree/master/custom_components/bom_forecast
I also downloaded the BOM ‘official’ icons and they are all here https://github.com/DavidFW1960/home-assistant/tree/master/www/icons/bom_icons individually or bom_icons.zip in the same location.
Next, I am using the dark-sky weather card from here
https://github.com/iammexx/home-assistant-config/tree/master/ui/darksky
But I had to make some edits so it would use the bom weather conditions etc. I did edit the dark-sky-weather-card.js and made my own called bom-weather-card.js which you can find here:
https://github.com/DavidFW1960/home-assistant/tree/master/www/custom_ui
Lastly, I have my weather package here
https://github.com/DavidFW1960/home-assistant/tree/master/packages/weather.yaml
sensor:
- platform: bom
station: !secret my_bom_station
name: !secret my_bom_name
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: !secret my_bom_product_id
name: !secret my_bom_name
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'
bom_current_text:
value_template: >
{% set val = states("sensor.bom_gosford_detailed_summary_0") %}
{{ val.split('.')[0] | title }}
bom_forecast_0:
entity_id:
- sensor.bom_today_max
- sensor.bom_today_min
- sensor.bom_gosford_chance_of_rain_0
- sensor.bom_gosford_icon_0
friendly_name: "Today"
value_template: >
{{states('sensor.bom_today_max')|round(0)}}°/{{states('sensor.bom_today_min')|round(0)}}°/{{states('sensor.bom_gosford_chance_of_rain_0')|round(0)}}%
entity_picture_template: >-
{%- if now().strftime('%H:%M') > '18:00' and (states('sensor.bom_gosford_icon_0') == 'fog' or states('sensor.bom_gosford_icon_0') == 'haze' or states('sensor.bom_gosford_icon_0') == ' light-showers' or states('sensor.bom_gosford_icon_0') == 'partly-cloudy' or states('sensor.bom_gosford_icon_0') == 'showers') -%}
{{ '/local/icons/bom_icons/' ~ states('sensor.bom_gosford_icon_0') ~ '-night.png' }}
{%- else -%}
{{ '/local/icons/bom_icons/' ~ states('sensor.bom_gosford_icon_0') ~ '.png' }}
{%- endif -%}
bom_forecast_1:
entity_id:
- sensor.bom_gosford_max_temp_c_1
- sensor.bom_gosford_min_temp_c_1
- sensor.bom_gosford_chance_of_rain_1
- sensor.bom_gosford_icon_1
friendly_name_template: >
{%- set date = as_timestamp(now()) + (1 * 86400 ) -%}
{{ date | timestamp_custom("Tomorrow (%d/%m)") | replace("(0", "(") | replace("/0", "/") }}
value_template: >
{{states('sensor.bom_gosford_max_temp_c_1')|round(0)}}°/{{states('sensor.bom_gosford_min_temp_c_1')|round(0)}}°/{{states('sensor.bom_gosford_chance_of_rain_1')|round(0)}}%
entity_picture_template: >-
{{ '/local/icons/bom_icons/' ~ states('sensor.bom_gosford_icon_1') ~ '.png' }}
bom_forecast_2:
entity_id:
- sensor.bom_gosford_max_temp_c_2
- sensor.bom_gosford_min_temp_c_2
- sensor.bom_gosford_chance_of_rain_2
- sensor.bom_gosford_icon_2
friendly_name_template: >
{%- set date = as_timestamp(now()) + (2 * 86400 ) -%}
{{ date | timestamp_custom("%A (%d/%m)") | replace("(0", "(") | replace("/0", "/") }}
value_template: >
{{states('sensor.bom_gosford_max_temp_c_2')|round(0)}}°/{{states('sensor.bom_gosford_min_temp_c_2')|round(0)}}°/{{states('sensor.bom_gosford_chance_of_rain_2')|round(0)}}%
entity_picture_template: >-
{{ '/local/icons/bom_icons/' ~ states('sensor.bom_gosford_icon_2') ~ '.png' }}
bom_forecast_3:
entity_id:
- sensor.bom_gosford_max_temp_c_3
- sensor.bom_gosford_min_temp_c_3
- sensor.bom_gosford_chance_of_rain_3
- sensor.bom_gosford_icon_3
friendly_name_template: >
{%- set date = as_timestamp(now()) + (3 * 86400 ) -%}
{{ date | timestamp_custom("%A (%d/%m)") | replace("(0", "(") | replace("/0", "/") }}
value_template: >
{{states('sensor.bom_gosford_max_temp_c_3')|round(0)}}°/{{states('sensor.bom_gosford_min_temp_c_3')|round(0)}}°/{{states('sensor.bom_gosford_chance_of_rain_3')|round(0)}}%
entity_picture_template: >-
{{ '/local/icons/bom_icons/' ~ states('sensor.bom_gosford_icon_3') ~ '.png' }}
bom_forecast_4:
entity_id:
- sensor.bom_gosford_max_temp_c_4
- sensor.bom_gosford_min_temp_c_4
- sensor.bom_gosford_chance_of_rain_4
- sensor.bom_gosford_icon_4
friendly_name_template: >
{%- set date = as_timestamp(now()) + (4 * 86400 ) -%}
{{ date | timestamp_custom("%A (%d/%m)") | replace("(0", "(") | replace("/0", "/") }}
value_template: >
{{states('sensor.bom_gosford_max_temp_c_4')|round(0)}}°/{{states('sensor.bom_gosford_min_temp_c_4')|round(0)}}°/{{states('sensor.bom_gosford_chance_of_rain_4')|round(0)}}%
entity_picture_template: >-
{{ '/local/icons/bom_icons/' ~ states('sensor.bom_gosford_icon_4') ~ '.png' }}
bom_forecast_5:
entity_id:
- sensor.bom_gosford_max_temp_c_5
- sensor.bom_gosford_min_temp_c_5
- sensor.bom_gosford_chance_of_rain_5
- sensor.bom_gosford_icon_5
friendly_name_template: >
{%- set date = as_timestamp(now()) + (5 * 86400 ) -%}
{{ date | timestamp_custom("%A (%d/%m)") | replace("(0", "(") | replace("/0", "/") }}
value_template: >
{{states('sensor.bom_gosford_max_temp_c_5')|round(0)}}°/{{states('sensor.bom_gosford_min_temp_c_5')|round(0)}}°/{{states('sensor.bom_gosford_chance_of_rain_5')|round(0)}}%
entity_picture_template: >-
{{ '/local/icons/bom_icons/' ~ states('sensor.bom_gosford_icon_5') ~ '.png' }}
bom_forecast_6:
entity_id:
- sensor.bom_gosford_max_temp_c_6
- sensor.bom_gosford_min_temp_c_6
- sensor.bom_gosford_chance_of_rain_6
- sensor.bom_gosford_icon_6
friendly_name_template: >
{%- set date = as_timestamp(now()) + (6 * 86400 ) -%}
{{ date | timestamp_custom("%A (%d/%m)") | replace("(0", "(") | replace("/0", "/") }}
value_template: >
{{states('sensor.bom_gosford_max_temp_c_6')|round(0)}}°/{{states('sensor.bom_gosford_min_temp_c_6')|round(0)}}°/{{states('sensor.bom_gosford_chance_of_rain_6')|round(0)}}%
entity_picture_template: >-
{{ '/local/icons/bom_icons/' ~ states('sensor.bom_gosford_icon_6') ~ '.png' }}
bom_today_max:
entity_id:
- sensor.bom_gosford_max_temp_c_0
- sensor.today_temp_bom_mean
value_template: >
{%- if states('sensor.bom_gosford_max_temp_c_0') == 'n/a' -%}
{{ state_attr('sensor.today_temp_bom_mean', 'max_value') }}
{% else %}
{{ states('sensor.bom_gosford_max_temp_c_0') }}
{% endif %}
bom_today_min:
entity_id:
- sensor.bom_gosford_min_temp_c_0
- sensor.today_temp_bom_mean
value_template: >
{%- if states('sensor.bom_gosford_min_temp_c_0') == 'n/a' -%}
{{ state_attr('sensor.today_temp_bom_mean', 'min_value') }}
{% else %}
{{ states('sensor.bom_gosford_min_temp_c_0') }}
{% endif %}
- platform: statistics
name: today_temp_bom
sampling_size: 150
entity_id: sensor.bom_gosford_air_temp_c
max_age:
hours: 24
automation:
- alias: 'Update BOM Icons'
trigger:
- event: start
platform: homeassistant
- platform: time
at: '18:01:00'
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
Lastly, I have my Lovelace cards for weather here:
- type: vertical-stack
cards:
- type: custom:bom-weather-card
title: BOM Weather
entity_current_conditions: sensor.bom_gosford_icon_0
entity_temperature: sensor.bom_gosford_air_temp_c
entity_forecast_high_temp_1: sensor.bom_gosford_max_temp_c_1
entity_forecast_high_temp_2: sensor.bom_gosford_max_temp_c_2
entity_forecast_high_temp_3: sensor.bom_gosford_max_temp_c_3
entity_forecast_high_temp_4: sensor.bom_gosford_max_temp_c_4
entity_forecast_high_temp_5: sensor.bom_gosford_max_temp_c_5
entity_forecast_icon_1: sensor.bom_gosford_icon_1
entity_forecast_icon_2: sensor.bom_gosford_icon_2
entity_forecast_icon_3: sensor.bom_gosford_icon_3
entity_forecast_icon_4: sensor.bom_gosford_icon_4
entity_forecast_icon_5: sensor.bom_gosford_icon_5
entity_forecast_low_temp_1: sensor.bom_gosford_min_temp_c_1
entity_forecast_low_temp_2: sensor.bom_gosford_min_temp_c_2
entity_forecast_low_temp_3: sensor.bom_gosford_min_temp_c_3
entity_forecast_low_temp_4: sensor.bom_gosford_min_temp_c_4
entity_forecast_low_temp_5: sensor.bom_gosford_min_temp_c_5
entity_summary_1: sensor.bom_gosford_summary_1
entity_summary_2: sensor.bom_gosford_summary_2
entity_summary_3: sensor.bom_gosford_summary_3
entity_summary_4: sensor.bom_gosford_summary_4
entity_summary_5: sensor.bom_gosford_summary_5
entity_sun: sun.sun
# entity_visibility: sensor.dark_sky_visibility
entity_daytime_high: sensor.bom_today_max
entity_wind_bearing: sensor.bom_gosford_wind_direction
entity_wind_speed: sensor.bom_gosford_wind_speed_kmh
entity_humidity: sensor.bom_gosford_relative_humidity
# entity_pressure: sensor.dark_sky_pressure
entity_apparent_temp: sensor.bom_gosford_feels_like_c
entity_daily_summary: sensor.bom_gosford_detailed_summary_0
entity_pop: sensor.bom_gosford_chance_of_rain_0
entity_pop_intensity: sensor.bom_gosford_rain_today
entity_pop_1: sensor.bom_gosford_chance_of_rain_1
entity_pop_2: sensor.bom_gosford_chance_of_rain_2
entity_pop_3: sensor.bom_gosford_chance_of_rain_3
entity_pop_4: sensor.bom_gosford_chance_of_rain_4
entity_pop_5: sensor.bom_gosford_chance_of_rain_5
entity_current_text: sensor.bom_current_text
locale: en
sunset: true
static_icons: false
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
old_daily_format: false
time_format: 12
show_beaufort: false
refresh_interval: 60
show_separator: false
temp_top_margin: -0.3em #default -0.3em px or em
temp_font_weight: 300 #default 300 numeric
temp_font_size: 4em #default 4em em
temp_right_pos: 0.85em #default .85em px or em
temp_uom_top_margin: -9px #default -9px px or em
temp_uom_right_margin: 7px #default 7px px or em
apparent_top_margin: 45px #default 45px px or em
apparent_right_pos: 1em #default 1em px or em
apparent_right_margin: 1em #default 1em px or em
current_text_top_margin: 39px #default 39px px or em
current_text_left_pos: 5em #default 5em px or em
current_text_font_size: 1.5em #default 1.5em em
current_data_top_margin: 7em #default 7em px or em
large_icon_top_margin: -3.5em #default -3.5em px or em
large_icon_left_position: 0em #default 0em px or em
separator_top_margin: 6em #default 6em px or em
slot_l1: daytime_high
slot_l2: wind
slot_l3: remove #visibility but BOM has no visibility reported
slot_l4: sun_next
slot_r1: pop
slot_r2: humidity
slot_r3: remove #pressure but BOM has no visibility reported
slot_r4: sun_following
- type: history-graph
title: Weather BOM Gosford
hours_to_show: 72
refresh_interval: 300
entities:
- sensor.bom_gosford_air_temp_c
- sensor.bom_gosford_feels_like_c
- sensor.bom_gosford_dew_point_c
- sensor.bom_gosford_rain_today
- sensor.bom_gosford_relative_humidity
- sensor.bom_gosford_wind_gust_kmh
- sensor.bom_gosford_wind_speed_kmh
- type: entities
title: BOM Forecast
show_header_toggle: false
entities:
- 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
- type: entities
title: Weather from BOM Australia
show_header_toggle: false
entities:
- sensor.bom_forecast_0
- sensor.bom_gosford_air_temp_c
- sensor.bom_gosford_delta_temp_c
- sensor.bom_gosford_dew_point_c
- sensor.bom_gosford_feels_like_c
- sensor.bom_gosford_rain_today
- sensor.bom_gosford_relative_humidity
- sensor.bom_gosford_wind_direction
- sensor.bom_gosford_wind_gust_kmh
- sensor.bom_gosford_wind_gust_kt
- sensor.bom_gosford_wind_speed_kmh
- sensor.bom_gosford_wind_speed_kt
All this is on my above github as well.
Which looks like this: