Thank you @BrendanMoran very exciting
I can help you with this if you are still interested
Yes @jimpower I’m still dead keen.
I don’t know if you can do something like attempted in this thread:
I don’t have any python skills, so converting the whole thing from a sensor to a weather entity is currently well out of my league (if that is a valid approach?). If it could be done with templates like in the link, I could help with leg-work.
To get this
you will need to add the following to your config.
-
Bom Weather Component
weather: - platform: bom station: IDQ60801.94592 name: Gold Coast monitored_conditions: - apparent_t - cloud - cloud_base_m - cloud_oktas - cloud_type_id - cloud_type - delta_t - gust_kmh - gust_kt - air_temp - dewpt - press - press_qnh - press_msl - press_tend - rain_trace - rel_hum - sea_state - swell_dir_worded - swell_height - swell_period - vis_km - weather - wind_dir - wind_spd_kmh - wind_spd_kt
-
Breakout the Attributes of the above weather component with some templates
- platform: template sensors: bom_temp: friendly_name: "Gold Coast Temperature" value_template: "{{ states.weather.bom_gold_coast.attributes.temperature }}" device_class: temperature unit_of_measurement: °C bom_humd: friendly_name: "Gold Coast Humidity" value_template: "{{ states.weather.bom_gold_coast.attributes.humidity }}" #device_class: humidity unit_of_measurement: '%' bom_wind_sp: friendly_name: "Gold Coast Wind Speed" value_template: "{{ states.weather.bom_gold_coast.attributes.wind_speed }}" #device_class: temperature unit_of_measurement: km bom_wind_bear: friendly_name: "Gold Coast Wind Bearing" value_template: "{{ states.weather.bom_gold_coast.attributes.wind_bearing }}" #device_class: temperature #unit_of_measurement: km bom_pres: friendly_name: "Gold Coast Pressure" value_template: "{{ states.weather.bom_gold_coast.attributes.pressure }}" #device_class: temperature unit_of_measurement: hPa
-
Add this to your lovelace configuration for the Custom Darksky Weather
- type: custom:dark-sky-weather-card entity_sun: sun.sun entity_daily_summary: sensor.bom_gc_forecast_detailed_summary_0 entity_current_conditions: sensor.dark_sky_icon entity_humidity: sensor.bom_humd entity_pressure: sensor.bom_pres entity_temperature: sensor.bom_temp entity_visibility: sensor.dark_sky_visibility entity_wind_bearing: sensor.bom_wind_bear entity_wind_speed: sensor.bom_wind_sp entity_forecast_high_temp_1: sensor.bom_gc_forecast_max_temp_c_1 entity_forecast_high_temp_2: sensor.bom_gc_forecast_max_temp_c_2 entity_forecast_high_temp_3: sensor.bom_gc_forecast_max_temp_c_3 entity_forecast_high_temp_4: sensor.bom_gc_forecast_max_temp_c_4 entity_forecast_high_temp_5: sensor.bom_gc_forecast_max_temp_c_5 entity_forecast_low_temp_1: sensor.bom_gc_forecast_min_temp_c_1 entity_forecast_low_temp_2: sensor.bom_gc_forecast_min_temp_c_2 entity_forecast_low_temp_3: sensor.bom_gc_forecast_min_temp_c_3 entity_forecast_low_temp_4: sensor.bom_gc_forecast_min_temp_c_4 entity_forecast_low_temp_5: sensor.bom_gc_forecast_min_temp_c_5 entity_forecast_icon_1: sensor.dark_sky_icon_1 entity_forecast_icon_2: sensor.dark_sky_icon_2 entity_forecast_icon_3: sensor.dark_sky_icon_3 entity_forecast_icon_4: sensor.dark_sky_icon_4 entity_forecast_icon_5: sensor.dark_sky_icon_5
entire package can be found here Weather Package
Awesome. Thankyou very much @jimpower. I’ll probably implement in the next few days and confirm it’s working for me.
@jimpower , I’m struggling a bit…
I get this error when I try to load the lovelace ui:
2018-11-04 15:56:57 ERROR (MainThread) [frontend.js.latest.201810264] https://192.168.1.117:8123/local/dist/dark-sky-weather-card.js:17:43 Uncaught TypeError: Cannot read property ‘unit_system’ of undefined
From what I understand, this means the card probably isn’t “seeing” all the entities it is expecting? I did test that each card reference is returning data in the template tool, and they all seem to be operational. Here’s the steps I’ve taken.
Copied the .js straight from here ( Custom Dark Sky Animated Weather Card) and dropped it here
\HASSIO\config\www\dist\dark-sky-weather-card.js
That’s worked fine for another custom card I have, so I assume that’s working ok…
Added bom under weather like this (seems to be working fine)
weather: - platform: bom station: IDV60901.95936 name: Melbourne monitored_conditions: - apparent_t - cloud - cloud_base_m - cloud_oktas - cloud_type_id - cloud_type # - delta_t - gust_kmh - gust_kt - air_temp - dewpt - press - press_qnh - press_msl - press_tend - rain_trace - rel_hum - sea_state - swell_dir_worded - swell_height - swell_period - vis_km - weather - wind_dir - wind_spd_kmh - wind_spd_kt
added darksky under sensor like this (seems to be working fine)
sensor: - platform: darksky api_key: !secret darksky forecast: - 1 - 2 - 3 - 4 - 5 monitored_conditions: - icon - summary - nearest_storm_distance - nearest_storm_bearing - humidity - temperature - temperature_high - temperature_low - apparent_temperature - apparent_temperature_high - apparent_temperature_low - wind_speed - wind_bearing - precip_type - precip_probability - precip_accumulation - precip_intensity - precip_intensity_max - uv_index - daily_summary - pressure - visibility update_interval: minutes: 60
While I also tried splitting out the attributes like you suggested, I’m trying to use data from my local xiaomi sensors for current conditions (the xiaomi sensors are working fine) in place of the template sensors.
So in my ui-lovelace.yaml I have:
added a resource:
resources: - url: /local/dist/dark-sky-weather-card.js type: js
and added a card like this:
- id: 3 # Automatically created id
title: Climate
icon: mdi:thermometer-lines
cards:
- type: custom:dark-sky-weather-card
entity_sun: sun.sun
entity_daily_summary: sensor.bom_melbourne_spilt_summary_0
entity_current_conditions: sensor.dark_sky_icon
entity_humidity: sensor.humidity_158d0001b92424
entity_pressure: sensor.pressure_158d0001b92424
entity_temperature: sensor.temperature_158d0001b92424
entity_visibility: sensor.dark_sky_visibility
entity_wind_bearing: sensor.bom_wind_bear
entity_wind_speed: sensor.bom_wind_sp
entity_forecast_high_temp_1: sensor.bom_melbourne_spilt_max_temp_c_1
entity_forecast_high_temp_2: sensor.bom_melbourne_spilt_max_temp_c_2
entity_forecast_high_temp_3: sensor.bom_melbourne_spilt_max_temp_c_3
entity_forecast_high_temp_4: sensor.bom_melbourne_spilt_max_temp_c_4
entity_forecast_high_temp_5: sensor.bom_melbourne_spilt_max_temp_c_5
entity_forecast_low_temp_1: sensor.bom_melbourne_spilt_min_temp_c_1
entity_forecast_low_temp_2: sensor.bom_melbourne_spilt_min_temp_c_2
entity_forecast_low_temp_3: sensor.bom_melbourne_spilt_min_temp_c_3
entity_forecast_low_temp_4: sensor.bom_melbourne_spilt_min_temp_c_4
entity_forecast_low_temp_5: sensor.bom_melbourne_spilt_min_temp_c_5
entity_forecast_icon_1: sensor.dark_sky_icon_1
entity_forecast_icon_2: sensor.dark_sky_icon_2
entity_forecast_icon_3: sensor.dark_sky_icon_3
entity_forecast_icon_4: sensor.dark_sky_icon_4
entity_forecast_icon_5: sensor.dark_sky_icon_5
Does anything immediately jump out as overlooked or an issue? Any suggestions?
Greatly appreciated.
There was a breaking change to that card in a version of HA that broke it and the card hasn’t been updated… Did you make the manual edit to the card?
Oh, ok, I see there is a bit more to it now that I scroll down that thread in more detail (and see your comments @DavidFW1960 ). I’ll use the learnings that thread to trouble shoot. I’ve made the .js and version adjustments, and now the card shows up in my UI, but it’s not presenting properly.
But I haven’t yet followed the other instructions about the .css etc yet, so I’ll work through that next.
Thanks for the pointer.
So I got there in the end! Hooray!
For anyone else trying to implement, do follow @jimpower s instructions, but you do need to read down into the threads to find the adjustments, and also track down the instructions about where to put your .css and icons (that was a new to me). See here: Custom animated weather card for Lovelace
It was straight forward to use my xiaomi sensors where I wanted to.
Thanks heaps @jimpower & @DavidFW1960
so is this using DarkSky data now or BOM? or a bit of both…? because I found DarkSky data to be terrible for Australia
It uses a bit of both. I set mine up yesterday. Basically you can use whatever sensors you want but mine is a mix of BOM data that I can get from bom_forecast and the official HA bom sensors, as well as dark sky for anything I can’t get from BOM. See my lovelace config below.
One thing I did notice with the bom_forecast data, is at some point late at night the days don’t line up properly. eg. bom_melbourne_max_temp_c_1 which should actually be tomorrow’s temperature, is shown for the day after that if that makes sense. Anyone pick this up?
- type: custom:dark-sky-weather-card
entity_sun: sun.sun
entity_daily_summary: sensor.bom_melbourne_detailed_summary_0
entity_current_conditions: sensor.dark_sky_icon
entity_humidity: sensor.bom_relative_humidity
entity_pressure: sensor.bom_pressure_mb
entity_temperature: sensor.bom_air_temp_c
entity_visibility: sensor.dark_sky_visibility
entity_wind_bearing: sensor.bom_wind_direction
entity_wind_speed: sensor.bom_wind_speed_kmh
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_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_forecast_icon_1: sensor.dark_sky_icon_1
entity_forecast_icon_2: sensor.dark_sky_icon_2
entity_forecast_icon_3: sensor.dark_sky_icon_3
entity_forecast_icon_4: sensor.dark_sky_icon_4
entity_forecast_icon_5: sensor.dark_sky_icon_5
Mine’s quite the bastard at this point. The forecast data is all from the method in this thread (BOM FTP). I (mostly) use local sensors in place of “today’s data”, and the icons and visibility are the only bit that refers to Darksky. Take a look at the names in my card.
Are you using xiaomi sensors for current temp, humidity and pressure?
Thats actually genius. I might do the same, have one out on my patio.
Yep! Works well!
I modified bom_forecast.py to trim oversized readings down to 255 characters. Not sure if this is the best way but it works for me.
here are the specifice changes I made:
here is the full file:
Hello all,
I am moving house in 1 week and will be in a rental for about 2-3 months so won’t be able to develop any of this for quite a while. I can transfer ownership in github to someone else if they would like?
I have merged your PR. Thanks for your help!
I can if no one else wants too…although I’ve only been teaching myself python recently so there may be more experienced people out there
Yeah uses mostly BOM data for weather just using the Darksky icons for visual.
Thanks for your efforts @jimpower. Finally got it working. Made a few changes to reflect my own personal weather station for the current conditions, but so far it’s working great!!!