Customising the BOM Weather and lovelace - now in HACS

OK I just pushed an update to version 0.74
This version as well as having all Adrian @rudders fixes for refresh adds the Beaufort Wind force if you use knots instead of km/h.

Also probably no one noticed, but the card as originally supplied was defaulting to m/s instead of km/h and was multiplying the km/h by 3.6 to (incorrectly) convert it to km/h so the ratings were always wrong! I did add a m/s option as well in case someones weather service actually used that…

1 Like

@angyp74 just so you know I’m seeing that chopped text for the first time on my iPad this afternoon. I’ll have a look at what might be causing this tomorrow.

EDIT:
Someone else commented on this this morning now as well on github… just after I fixed it! Talk about timing!
I am not releasing it yet but if you pull master in HACS or download the raw file you can try it out. I’m not going to release it as a new release until I’m sure I have not broken something else. The version should report as 0.76a in the console if you load it.

I also just noticed in the repo, the screenshot shows this cropping as well. I wonder why I never noticed it before?
Just tested all weird combos…
image
I think it’s fixed

@DavidFW1960
Sorry I haven’t been keeping track. I noticed an update in HACS yesterday and updated now running 0.77 and it’s all good. Thanks, heaps.

1 Like

Are the instructions in the first post the valid way to get this up and running on the current HassIO and for Sydney ?

Craig

Yes. Check the docs in the github repo as well as there are more options right now. Checkout the sample templates and lovelace config examples from the repo as well.

WIll do thanks David - thanks for the quick reply

Craig

@DavidFW1960… did the 0.111 update break something with the HACS version of your BOM card… I get a “Not loaded” flag in HACS?

No it’s working fine for me and I guess most people. Have you tried a few browser refreshes? Clear cache & Hard reload from the console and then refresh a few times…

Yeah it was working for me on 0.111.2 before I rolled back to 0.110.7.

Just saw that as well… make sure it’s in the lovelace resources.

Yesterday I updated this card from a very old version as I was avoiding having to change the Lovelace code and today I noticed that there is a sun icon where there should be rain (Friday). Hovering over the sun it pops up saying ‘showers’ so I know that the weather data is correct. In fact the sun should be on Thursday where the weather is set to be ‘mostly sunny’. I did a hard cache clear in Chrome which did nothing.

image

lovelace GUI code:

apparent_right_margin: 1em
apparent_right_pos: 1em
apparent_top_margin: 45px
current_data_top_margin: 10em
current_text_alignment: center
current_text_font_size: 1.5em
current_text_left_pos: 0px
current_text_top_margin: 4.5em
current_text_width: 100%
entity_apparent_temp: sensor.bom_perth_feels_like_c
entity_current_conditions: sensor.dark_sky_icon
entity_daily_summary: sensor.bom_perth_forecast_detailed_summary_0
entity_daytime_high: sensor.bom_perth_forecast_max_temp_c_0
entity_daytime_low: sensor.bom_perth_forecast_min_temp_c_0
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.dark_sky_icon_1d
entity_forecast_icon_2: sensor.dark_sky_icon_2d
entity_forecast_icon_3: sensor.dark_sky_icon_3d
entity_forecast_icon_4: sensor.dark_sky_icon_4d
entity_forecast_icon_5: sensor.dark_sky_icon_5d
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.bom_perth_forecast_min_temp_c_5
entity_humidity: sensor.bom_perth_relative_humidity
entity_pop: sensor.bom_perth_forecast_chance_of_rain_0
entity_pop_1: sensor.bom_perth_forecast_chance_of_rain_1
entity_pop_2: sensor.bom_perth_forecast_chance_of_rain_2
entity_pop_3: sensor.bom_perth_forecast_chance_of_rain_3
entity_pop_4: sensor.bom_perth_forecast_chance_of_rain_4
entity_pop_5: sensor.bom_perth_forecast_chance_of_rain_5
entity_pop_intensity: sensor.bom_perth_forecast_possible_rainfall_0
entity_pos_1: sensor.bom_perth_forecast_possible_rainfall_1
entity_pos_2: sensor.bom_perth_forecast_possible_rainfall_2
entity_pos_3: sensor.bom_perth_forecast_possible_rainfall_3
entity_pos_4: sensor.bom_perth_forecast_possible_rainfall_4
entity_pos_5: sensor.bom_perth_forecast_possible_rainfall_5
entity_possible_today: sensor.bom_perth_forecast_chance_of_rain_0
entity_pressure: sensor.bom_perth_pressure_mb
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
entity_sun: sun.sun
entity_temperature: sensor.bom_perth_air_temp_c
entity_wind_bearing: sensor.bom_perth_wind_direction
entity_wind_speed: sensor.bom_perth_wind_speed_kmh
large_icon_left_position: 0px
large_icon_top_margin: '-3.2em'
locale: en
old_daily_format: false
refresh_interval: 60
separator_top_margin: 6em
show_beaufort: false
show_decimals: false
show_separator: false
slot_l1: daytime_high
slot_l2: daytime_low
slot_l3: wind
slot_l4: pressure
slot_l5: sun_next
slot_r1: pop
slot_r2: humidity
slot_r3: uv_alert
slot_r4: fire_danger
slot_r5: sun_following
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
title: BOM Weather
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
type: 'custom:bom-weather-card'

Check the icon entity for that day… (also why are you using dark_sky?)

I just hadn’t completely fixed it up yet.In generally my HA is all about automations rather the GUI so it’s been a bit neglected. I just updated them to BOM icons so hopefully it works properly now.

Sure but the icon (sun) was because the darksky state for that entity was sunny - it wasn’t an error… The card only sets the icon from the state of the entity so if it’s ever wrong it means the entity is wrong…

I get that. I’m thinking that darksky had the icon data wrong. Now that I have gotten rid of darksky altogether it should be fine with all data coming from BOM

1 Like

thank you! i changed it and after a few more days frustration still not getting something… begging for more help please

Error message is:
Invalid config for [weather]: required key not provided @ data[‘platform’]. Got None

# weather 
# Show BOM Satellite and Radar

camera:
  - platform: generic
    name: BOM Satellite
    still_image_url: http://www.bom.gov.au/gms/IDE00135.jpg
  - platform: bom
    name: sydney
    id: 714
    frames: 6
    delta: 360

# Sensors 
sensor:
  - platform: bom
    station: IDN60901.94768
    name: sydney
    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: IDN10064
    name: sydney
    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'

#the gravy
  - platform: template
    sensors:
    
      bom_current_text:
        value_template: >
            {% set val = states('sensor.bom_sydney_summary_0').split('.')[0] %} 
            {{ val | title }}

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

      bom_uv_alert_summary:
        value_template: >
            {%- if states('sensor.bom_sydney_uv_alert_0') == '##' -%} 
            {% set val = 'No Data' %}
            {%- elif states('sensor.bom_sydney_uv_alert_0') != 'n/a' -%} 
            {% set val = states('sensor.bom_sydney_uv_alert_0').split('[')[1].split(']')[0] %}
            {%- elif states('sensor.bom_sydney_uv_alert_1') == '##' -%} 
            {% set val = 'No Data' %}
            {%- elif states('sensor.bom_sydney_uv_alert_1') != 'n/a' -%} 
            {% set val = states('sensor.bom_sydney_uv_alert_1').split('[')[1].split(']')[0] %}
            {%- else -%}
            {%- set val = 'No Data' -%}
            {%- endif -%}
            {{ val | title }} 

somewhere in your config (not shown in message) you incorrectly have:

weather:

thanks David, in the config is the only spot, it is…


# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Text to speech
tts:
  - platform: google_translate

# connect to the mqtt and get homey data
mqtt:
  broker: !secret mqtt_broker 
  username: !secret mqtt_user
  password: !secret mqtt_password
  discovery: true
  discovery_prefix: homeassistant
  birth_message:
    topic: 'hass/status'
    payload: 'online'
  will_message:
    topic: 'hass/status'
    payload: 'offline'

#links to config yamls

weather: !include weather.yaml
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

Ok that is the problem.
You have put the whole package under the weather domain! Hence the error.

You need the weather.yaml in the /packages directory and include packages like this:

homeassistant:
  packages: !include_dir_named packages

And don’t include that in the weather domain

thanks David!

I put weather.yaml in packages and referenced, now i get

Invalid config for [weather]: required key not provided @ data[‘platform’]. Got None. (See /config/configuration.yaml, line 29).


# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

#load the packages
homeassistant:
  packages: !include_dir_named packages

# Text to speech
tts:
  - platform: google_translate

# connect to the mqtt and get homey data
mqtt:
  broker: !secret mqtt_broker 
  username: !secret mqtt_user
  password: !secret mqtt_password
  discovery: true
  discovery_prefix: homeassistant
  birth_message:
    topic: 'hass/status'
    payload: 'online'
  will_message:
    topic: 'hass/status'
    payload: 'offline'