GithubHelp home page GithubHelp logo

BOM Weather Card about home-assistant HOT 17 CLOSED

Diondelpino avatar Diondelpino commented on August 26, 2024 1
BOM Weather Card

from home-assistant.

Comments (17)

Diondelpino avatar Diondelpino commented on August 26, 2024 1

No worries mate. Yeh fiddled around with it all day but eventually I got there. It’s an awesome card, thank you for making it. And thank you for helping me troubleshoot.

from home-assistant.

DavidFW1960 avatar DavidFW1960 commented on August 26, 2024

And then there should be an animated and static folder under that..

/config/www/icons/weather_icons/animated
/config/www/icons/weather_icons/static

from home-assistant.

Diondelpino avatar Diondelpino commented on August 26, 2024

yep, both animated and static with their respective contents are in weather_icons

from home-assistant.

DavidFW1960 avatar DavidFW1960 commented on August 26, 2024

And you unzipped the icons from the zip file into those folders?

from home-assistant.

Diondelpino avatar Diondelpino commented on August 26, 2024

correct

from home-assistant.

DavidFW1960 avatar DavidFW1960 commented on August 26, 2024

Can you paste a screenshot from explorer showing the icons in the folder? Also looks like you don't have the FTP component working? Can you show your config and lovelace config please?

from home-assistant.

DavidFW1960 avatar DavidFW1960 commented on August 26, 2024

Also.. you posted in my personal HA repo (which is fine)... did you look in the actual repo for the card? It has full installation instructions in there... https://github.com/DavidFW1960/bom-weather-card

from home-assistant.

Diondelpino avatar Diondelpino commented on August 26, 2024

yep that was where I started. I ended up using the configs in your personal repo to troubleshoot other errors I was having, and eventually managed to get everything else working correctly as far as I can tell. Though, UV and fire danger don't seem to be pulling data from BOM. Thats the contents of the animated file. Give me a sec to get my configs up
Screen Shot 2020-02-02 at 7 32 31 pm

from home-assistant.

Diondelpino avatar Diondelpino commented on August 26, 2024

My config

`sensor:

  • platform: bom
    name: Melbourne
    station: IDV60901.95936
    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: IDV10450
    name: Melbourne
    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:
      value_template: >
          {% set val = states('sensor.bom_melbourne_summary_0').split('.')[0] %} 
          {{ val | title }}
    
    bom_uv_alert:
      value_template: >
          {%- if states('sensor.bom_melbourne_uv_alert_0') == '##' -%}
          UV Today: No Data
          {%- elif states('sensor.bom_melbourne_uv_alert_0') != 'n/a' -%} 
          UV Today: {{ states('sensor.bom_melbourne_uv_alert_0') }}
          {%- elif states('sensor.bom_melbourne_uv_alert_1') == '##' -%}
          UV Tomorrow: No Data
          {%- else -%}
          UV Tomorrow: {{ states('sensor.bom_melbourne_uv_alert_1') }}
          {%- endif -%}
    
    bom_uv_alert_summary:
      value_template: >
          {%- if states('sensor.bom_melbourne_uv_alert_0') == '##' -%} 
          {% set val = 'No Data' %}
          {%- elif states('sensor.bom_melbourne_uv_alert_0') != 'n/a' -%} 
          {% set val = states('sensor.bom_melbourne_uv_alert_0').split('[')[1].split(']')[0] %}
          {%- elif states('sensor.bom_melbourne_uv_alert_1') == '##' -%} 
          {% set val = 'No Data' %}
          {%- elif states('sensor.bom_melbourne_uv_alert_1') != 'n/a' -%} 
          {% set val = states('sensor.bom_melbourne_uv_alert_1').split('[')[1].split(']')[0] %}
          {%- else -%}
          {%- set val = 'No Data' -%}
          {%- endif -%}
          {{ val | title }} 
      
    bom_fire_danger:
      value_template: >
          {%- if states('sensor.bom_melbourne_fire_danger_0') == '##' -%}
          Fire Danger Today: No Data
          {%- elif states('sensor.bom_melbourne_fire_danger_0') != 'n/a' -%} 
          Fire Danger Today: {{ states('sensor.bom_melbourne_fire_danger_0') }}
          {%- elif states('sensor.bom_melbourne_fire_danger_1') == '##' -%}
          Fire Danger Tomorrow: No Data
          {%- else -%}
          Fire Danger Tomorrow: {{ states('sensor.bom_melbourne_fire_danger_1') }}
          {%- endif -%}
    
    bom_fire_danger_summary:
      value_template: >
          {%- if states('sensor.bom_melbourne_fire_danger_0') == '##' -%}
          No Data
          {%- elif states('sensor.bom_melbourne_fire_danger_0') != 'n/a' -%} 
          {{ states('sensor.bom_melbourne_fire_danger_0') }}
          {%- elif states('sensor.bom_melbourne_fire_danger_1') == '##' -%}
          No Data
          {%- else -%}
          {{ states('sensor.bom_melbourne_fire_danger_1') }}
          {%- endif -%}
        
    bom_forecast_0:
      entity_id:
        - sensor.bom_today_max
        - sensor.bom_today_min
        - sensor.bom_melbourne_chance_of_rain_0
        - sensor.bom_melbourne_icon_0
      friendly_name: "Today"
      value_template: >
        {{states('sensor.bom_melbourne_max')|round(0)}}°/{{states('sensor.bom_today_min')|round(0)}}°/{{states('sensor.bom_melbourne_chance_of_rain_0')|round(0)}}%
      entity_picture_template: >-
        {%- if states('sun.sun') == 'below_horizon' and (states('sensor.bom_melbourne_icon_0') == 'fog' or states('sensor.bom_melbourne_icon_0') == 'haze' or states('sensor.bom_melbourne_icon_0') == 'light-showers' or states('sensor.bom_melbourne_icon_0') == 'partly-cloudy' or states('sensor.bom_melbourne_icon_0') == 'showers') -%}
        {{ '/local/icons/bom_icons/' ~ states('sensor.bom_melbourne_icon_0') ~ '-night.png' }}
        {%- else -%}
        {{ '/local/icons/bom_icons/' ~ states('sensor.bom_melbourne_icon_0') ~ '.png' }}
        {%- endif -%}
    bom_forecast_1:
      entity_id:
        - sensor.bom_melbourne_max_temp_c_1
        - sensor.bom_melbourne_min_temp_c_1
        - sensor.bom_melbourne_chance_of_rain_1
        - sensor.bom_melbourne_icon_1
      friendly_name_template: >
        {%- set date = as_timestamp(now()) + (1 * 86400 ) -%}
        {{ date | timestamp_custom('Tomorrow (%-d/%-m)') }}
      value_template: >
        {{states('sensor.bom_melbourne_max_temp_c_1')|round(0)}}°/{{states('sensor.bom_melbourne_min_temp_c_1')|round(0)}}°/{{states('sensor.bom_melbourne_chance_of_rain_1')|round(0)}}%
      entity_picture_template: >-
        {{ '/local/icons/bom_icons/' ~ states('sensor.bom_melbourne_icon_1') ~ '.png' }}
    bom_forecast_2:
      entity_id:
        - sensor.bom_melbourne_max_temp_c_2
        - sensor.bom_melbourne_min_temp_c_2
        - sensor.bom_melbourne_chance_of_rain_2
        - sensor.bom_melbourne_icon_2
      friendly_name_template: >
        {%- set date = as_timestamp(now()) + (2 * 86400 ) -%}
        {{ date | timestamp_custom('%A (%-d/%-m)') }}
      value_template: >
        {{states('sensor.bom_melbourne_max_temp_c_2')|round(0)}}°/{{states('sensor.bom_melbourne_min_temp_c_2')|round(0)}}°/{{states('sensor.bom_melbourne_chance_of_rain_2')|round(0)}}%
      entity_picture_template: >-
        {{ '/local/icons/bom_icons/' ~ states('sensor.bom_melbourne_icon_2') ~ '.png' }}
    bom_forecast_3:
      entity_id:
        - sensor.bom_melbourne_max_temp_c_3
        - sensor.bom_melbourne_min_temp_c_3
        - sensor.bom_melbourne_chance_of_rain_3
        - sensor.bom_melbourne_icon_3
      friendly_name_template: >
        {%- set date = as_timestamp(now()) + (3 * 86400 ) -%}
        {{ date | timestamp_custom('%A (%-d/%-m)') }}
      value_template: >
        {{states('sensor.bom_melbourne_max_temp_c_3')|round(0)}}°/{{states('sensor.bom_melbourne_min_temp_c_3')|round(0)}}°/{{states('sensor.bom_melbourne_chance_of_rain_3')|round(0)}}%
      entity_picture_template: >-
        {{ '/local/icons/bom_icons/' ~ states('sensor.bom_melbourne_icon_3') ~ '.png' }}
    bom_forecast_4:
      entity_id:
        - sensor.bom_melbourne_max_temp_c_4
        - sensor.bom_melbourne_min_temp_c_4
        - sensor.bom_melbourne_chance_of_rain_4
        - sensor.bom_melbourne_icon_4
      friendly_name_template: >
        {%- set date = as_timestamp(now()) + (4 * 86400 ) -%}
        {{ date | timestamp_custom('%A (%-d/%-m)') }}
      value_template: >
        {{states('sensor.bom_melbourne_max_temp_c_4')|round(0)}}°/{{states('sensor.bom_melbourne_min_temp_c_4')|round(0)}}°/{{states('sensor.bom_melbourned_chance_of_rain_4')|round(0)}}%
      entity_picture_template: >-
        {{ '/local/icons/bom_icons/' ~ states('sensor.bom_melbourne_icon_4') ~ '.png' }}
    bom_forecast_5:
      entity_id:
        - sensor.bom_melbourne_max_temp_c_5
        - sensor.bom_melbourne_min_temp_c_5
        - sensor.bom_melbourne_chance_of_rain_5
        - sensor.bom_melbourne_icon_5
      friendly_name_template: >
        {%- set date = as_timestamp(now()) + (5 * 86400 ) -%}
        {{ date | timestamp_custom('%A (%-d/%-m)') }}
      value_template: >
        {{states('sensor.bom_melbourne_max_temp_c_5')|round(0)}}°/{{states('sensor.bom_melbourne_min_temp_c_5')|round(0)}}°/{{states('sensor.bom_melbourne_chance_of_rain_5')|round(0)}}%
      entity_picture_template: >-
        {{ '/local/icons/bom_icons/' ~ states('sensor.bom_melbourne_icon_5') ~ '.png' }}
    bom_forecast_6:
      entity_id:
        - sensor.bom_melbourne_max_temp_c_6
        - sensor.bom_melbourne_min_temp_c_6
        - sensor.bom_melbourne_chance_of_rain_6
        - sensor.bom_melbourne_icon_6
      friendly_name_template: >
        {%- set date = as_timestamp(now()) + (6 * 86400 ) -%}
        {{ date | timestamp_custom('%A (%-d/%-m)') }}
      value_template: >
        {{states('sensor.bom_melbourne_max_temp_c_6')|round(0)}}°/{{states('sensor.bom_melbourne_min_temp_c_6')|round(0)}}°/{{states('sensor.bom_melbourne_chance_of_rain_6')|round(0)}}%
      entity_picture_template: >-
        {{ '/local/icons/bom_icons/' ~ states('sensor.bom_melbourne_icon_6') ~ '.png' }}
    bom_today_max:
      entity_id:
        - sensor.bom_melbourne_max_temp_c_0
        - sensor.today_temp_bom
      value_template: >
        {%- if states('sensor.bom_melbourne_max_temp_c_0') == 'n/a' -%} 
          {{ state_attr('sensor.today_temp_bom', 'max_value') }}
        {% else %}
          {{ states('sensor.bom_melbourne_max_temp_c_0') }}
        {% endif %}
    bom_today_min:
      entity_id:
        - sensor.bom_melbourne_min_temp_c_0
        - sensor.today_temp_bom
      value_template: >
        {%- if states('sensor.bom_melbourne_min_temp_c_0') == 'n/a' -%} 
          {{ state_attr('sensor.today_temp_bom', 'min_value') }}
        {% else %}
          {{ states('sensor.bom_melbourne_min_temp_c_0') }}
        {% endif %}
    bom_today_max_average:
      entity_id:
        - sensor.bom_melbourne_max_temp_c_0
        - sensor.today_temp_bom_average
      value_template: >
        {%- if states('sensor.bom_melbourne_max_temp_c_0') == 'n/a' -%} 
          {{ state_attr('sensor.today_temp_bom_average', 'max_value') }}
        {% else %}
          {{ states('sensor.bom_melbourne_max_temp_c_0') }}
        {% endif %}
    bom_today_min_average:
      entity_id:
        - sensor.bom_melbourne_min_temp_c_0
        - sensor.today_temp_bom_average
      value_template: >
        {%- if states('sensor.bom_melbourne_min_temp_c_0') == 'n/a' -%} 
          {{ state_attr('sensor.today_temp_bom_average', 'min_value') }}
        {% else %}
          {{ states('sensor.bom_melbourne_min_temp_c_0') }}
        {% endif %}
    
  • platform: statistics
    name: today_temp_bom
    sampling_size: 150
    entity_id: sensor.bom_melbourne_air_temp_c
    max_age:
    hours: 24

  • platform: average
    name: today_temp_bom_average
    entities:

    • sensor.bom_melbourne_air_temp_c
      start: '{{ now().replace(hour=0).replace(minute=0).replace(second=0) }}'
      end: '{{ now() }}'

automation:

  • alias: 'Update BOM Icons'
    trigger:
    • event: start
      platform: homeassistant
    • entity_id: sun.sun
      platform: state
      to: 'above_horizon'
    • entity_id: sun.sun
      platform: state
      to: 'below_horizon'
      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

homeassistant:
customize:
package.node_anchors:
common: &common
package: "weather"

sensor.bom_melbourne_air_temp_c:
  friendly_name: Air Temp
  device_class: temperature
  <<: *common
sensor.bom_melbourne_delta_temp_c:
  friendly_name: Delta Temp
  <<: *common
sensor.bom_melbourne_dew_point_c:
  friendly_name: Dew Point
  <<: *common
sensor.bom_melbourne_feels_like_c:
  friendly_name: Feels Like
  <<: *common
sensor.bom_melbourne_rain_today:
  friendly_name: Rain Today
  icon: mdi:weather-rainy
  <<: *common
sensor.bom_melbourne_relative_humidity:
  friendly_name: Relative Humidity
  icon: mdi:water-percent
  <<: *common
sensor.bom_melbourne_wind_direction:
  friendly_name: Wind Direction
  entity_picture: /local/icons/MoonPhases/rooster.png
  <<: *common
sensor.bom_melbourne_wind_direction_kt:
  friendly_name: Wind Direction kt
  icon: mdi:weather-windy
  <<: *common
sensor.bom_melbourne_wind_gust_kmh:
  friendly_name: Wind Gust
  icon: mdi:weather-windy
  <<: *common
sensor.bom_melbourne_wind_gust_kt:
  friendly_name: Wind Gust kt
  icon: mdi:weather-windy
  <<: *common
sensor.bom_melbourne_wind_speed_kmh:
  friendly_name: Wind Speed
  icon: mdi:weather-windy
  <<: *common
sensor.bom_melbourne_wind_speed_kt:
  friendly_name: Wind Speed kt
  icon: mdi:weather-windy
  <<: *common
sensor.bom_uv_alert:
  friendly_name: UV Alert
  icon: mdi:weather-sunny
  <<: *common
sensor.bom_fire_danger:
  friendly_name: Fire Danger
  icon: mdi:fire
  <<: *common`

from home-assistant.

Diondelpino avatar Diondelpino commented on August 26, 2024

oh not sure why that pasted like that

from home-assistant.

Diondelpino avatar Diondelpino commented on August 26, 2024

Lovelace (not sure why hassio changes the lovelace config to alphabetical order but there it is
- 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: 0em current_text_top_margin: 4.5em current_text_width: 100% entity_apparent_temp: sensor.bom_melbourne_feels_like_c entity_current_conditions: sensor.bom_melbourne_icon_0 entity_current_text: sensor.bom_current_text entity_daily_summary: sensor.bom_melbourne_detailed_summary_0 entity_fire_danger: sensor.bom_fire_danger entity_daytime_high: sensor.bom_today_max entity_daytime_low: sensor.bom_today_min entity_fire_danger_summary: sensor.bom_fire_danger_summary entity_forecast_high_temp_1: sensor.bom_melbourne_max_temp_c_1 entity_forecast_high_temp_2: sensor.bom_melbourne_max_temp_c_2 entity_forecast_high_temp_3: sensor.bom_melbourne_max_temp_c_3 entity_forecast_high_temp_4: sensor.bom_melbourne_max_temp_c_4 entity_forecast_high_temp_5: sensor.bom_melbourne_max_temp_c_5 entity_forecast_icon_1: sensor.bom_melbourne_icon_1 entity_forecast_icon_2: sensor.bom_melbourne_icon_2 entity_forecast_icon_3: sensor.bom_melbourne_icon_3 entity_forecast_icon_4: sensor.bom_melbourne_icon_4 entity_forecast_icon_5: sensor.bom_melbourne_icon_5 entity_forecast_low_temp_1: sensor.bom_melbourne_min_temp_c_1 entity_forecast_low_temp_2: sensor.bom_melbourne_min_temp_c_2 entity_forecast_low_temp_3: sensor.bom_melbourne_min_temp_c_3 entity_forecast_low_temp_4: sensor.bom_melbourne_min_temp_c_4 entity_forecast_low_temp_5: sensor.bom_melbourne_min_temp_c_5 entity_humidity: sensor.bom_melbourne_relative_humidity entity_pop: sensor.bom_melbourne_chance_of_rain_0 entity_pop_1: sensor.bom_melbourne_chance_of_rain_1 entity_pop_2: sensor.bom_melbourne_chance_of_rain_2 entity_pop_3: sensor.bom_melbourne_chance_of_rain_3 entity_pop_4: sensor.bom_melbourne_chance_of_rain_4 entity_pop_5: sensor.bom_melbourne_chance_of_rain_5 entity_pop_intensity: sensor.bom_melbourne_rain_today entity_pos_1: sensor.bom_melbourne_possible_rainfall_1 entity_pos_2: sensor.bom_melbourne_possible_rainfall_2 entity_pos_3: sensor.bom_melbourne_possible_rainfall_3 entity_pos_4: sensor.bom_melbourne_possible_rainfall_4 entity_pos_5: sensor.bom_melbourne_possible_rainfall_5 entity_possible_today: sensor.bom_melbourne_possible_rainfall_0 entity_summary_1: sensor.bom_melbourne_summary_1 entity_summary_2: sensor.bom_melbourne_summary_2 entity_summary_3: sensor.bom_melbourne_summary_3 entity_summary_4: sensor.bom_melbourne_summary_4 entity_summary_5: sensor.bom_melbourne_summary_5 entity_sun: sun.sun entity_temperature: sensor.bom_melbourne_air_temp_c entity_uv_alert: sensor.bom_uv_alert entity_uv_alert_summary: sensor.bom_uv_alert_summary entity_wind_bearing: sensor.bom_melbourne_wind_direction entity_wind_speed: sensor.bom_melbourne_wind_speed_kmh large_icon_left_position: 0em large_icon_top_margin: '-3.5em' locale: en old_daily_format: false refresh_interval: 60 separator_top_margin: 6em show_beaufort: 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: '-0.3em' temp_uom_right_margin: 7px temp_uom_top_margin: '-9px' time_format: 12 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'

from home-assistant.

DavidFW1960 avatar DavidFW1960 commented on August 26, 2024

Ok... so... anim=/= animated!!!!!! The directory name is animated not anim

from home-assistant.

Diondelpino avatar Diondelpino commented on August 26, 2024

it is labeled animated. It's just abbreviated because I was inside the file
Screen Shot 2020-02-02 at 7 51 37 pm

from home-assistant.

DavidFW1960 avatar DavidFW1960 commented on August 26, 2024

The FTP BOM component isn't working... can you check the product ID... see the docs for the FTP component... Otherwise, just reply and I'll check it tomorrow. My best guess is the product I'd is wrong (hence no icons) You can see in the states if the icons are there...... check the screenshot that shows how to get the product I'd for the FTP component (it's different to the sensor)

from home-assistant.

Diondelpino avatar Diondelpino commented on August 26, 2024

I believe this is the correct product ID

Screen Shot 2020-02-02 at 8 23 31 pm

from home-assistant.

Diondelpino avatar Diondelpino commented on August 26, 2024

figured it out mate. Replaced the contents of custom_compotents/bom_forcast/ that HACS installed with the bom_forcast folder in the FTP repo and that fixed it. No idea why but it did.

from home-assistant.

DavidFW1960 avatar DavidFW1960 commented on August 26, 2024

Wow. I knew the FTP wasn't working. HACS seems to be doing some odd things lately. Glad you got it working.....

from home-assistant.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.