Customising the BOM Weather and lovelace - now in HACS

Thanks for all the help!

I downloaded yesterday off github so I am assuming so.
Dates on the files are 24/11 for bom_forecast and last friday for the bom-weather-card

and it appears in the JS

var uv_summary = this.config.entity_uv_alert_summary ? html`<li><span class="ha-icon"><ha-icon icon="mdi:weather-sunny"></ha-icon></span>${this.localeText.uvRating} <span id="daytime-uv-text">${this._hass.states[this.config.entity_uv_alert_summary].state}</span></li>` : ``;
 var fire_summary = this.config.entity_fire_danger_summary ? html`<li><span class="ha-icon"><ha-icon icon="mdi:fire"></ha-icon></span>${this.localeText.fireDanger} <span id="daytime-firedanger-text">${this._hass.states[this.config.entity_fire_danger_summary].state}</span></li>` : ``;
    

ok so you might have missed that you need to add the entities to be parsed to the card as well as the slot config then? Also there are template sensors you need in the config as well (same for the current text at the top as well)
The UV and Fire danger either have today or yesterday so the template sensor works out which is valid and that sensor gets parsed through to the card.

Yep missed adding the entities sorry mate!

one more thing i would like to make a UV alert number eg : 13 how hard it is it to move the regex to do the number instead of extreme etc so i can make a colour card for the danger level. Or is there another way we can make like “extreme” purple, etc etc. I am only new to HA (this week). So i don’t know the syntax properly yet.

entity_uv_alert: sensor.bom_uv_alert
entity_uv_alert_summary: sensor.bom_uv_alert_summary
entity_fire_danger: sensor.bom_fire_danger
entity_fire_danger_summary: sensor.bom_fire_danger_summary

I don’t see a number in the XML file I get here for Sydney… Are you seeing a number? I think it’s text in which case you can play with the template with a replace command to return a number.

Sorry - I posted a response to this thread in the non HACS one - but the gist is should the UV attribute work for forecasts for more than one day?

Nope.
The UV and Fire attributes are only there for today OR tomorrow depending on the time of day.
See also my comment in the other thread. Your friendly_state_format is different to what I have tested.

    friendly_state_format: '{max}, {summary}'

Because BOM only has today or tomorrow attribute you need a template sensor as per my docs as well.

Yes i see the number in the summary. I will try to do the shift myself see how it goes thanks a million for your help! (not sure why sunset and sunrise is coming up two times but i will figure that out)

My room temp is always 6 deg above outside temp. I wish it was 29 right now lol!

No difference changing the friendly_state_format:, still throws an error and the days do not appear as sensors.

I’ll continue to have a fiddle but oh do I hate hassio restarts… :unamused:

Oh… the 13[Extreme] - that’s UV not the fire danger… But yeah you can play with the template sensor to get whatever number you want or to parse the uv in any format you like.

+100

I’ll take a look at this tomorrow.

Daryl - my region (IDN11052) seems to have a different area structure defined in the xml file to your one. I configured for your area and it seems to give the same errors you are seeing - did you say that adding the icon condition also errored out? The original dev for the component had avoided documenting the icon monitored condition so it makes me wonder if he knew there was an error with using it.
Anyway, @exxamalte who fixed the UV_Alert and Fire_Danger for us… I asked if he can take a look at it and referred him to the error you posted in the other thread. Hopefully he can help. I had a go at fixing it myself unsuccessfully outlining my limited python skills.

David - I can leave the icon in and it still works fine.

Yeah I suspected that. Good News.

Hi @DavidFW1960, I’m trying to set up a new Hassio system including your BOM plugins and have an issue where no icons show.
I’ve installed both components from HACS and added the sensor and lovelace configs from my working system but there is no ‘icons’ directory in my ‘www’ directory.
If I try to add the ‘icons’ directory manually through samba I get a ‘No such file or directory’ error which I assume is a permissions error but I haven’t seen this before.
Should the ‘icons’ directory be created when you install from HACS?

No you have to manually download the icons - HACS doesn’t do that. In the www folder create the icons folder.

That’s what I thought I had done before, the problem I’m now having is that I can’t create an icons folder in www in samba.

Even if I build the folders first, when I try to copy into config the www folder and everything else copies but I get an error for icons.

If I create the icons folder using configurator in hassio it doesn’t show up in samba, really weird.

OK so re:samba… you will find the samba addon excludes icons so delete that and restart the addon.
Otherwise sounds like permissions problem. Not sure how you have installed hassio.

All the Home Assistant folders will be ‘root’ permissions. Depending on how you are accessing the www/icons folder, you might not have permission to write to it (in say WinSCP).
Try fixing Samba (remove icons from being hidden) and use that to copy files.
If using WinSCP, make sure you set it up for sudo su for the shell scp… I have a blog article about doing that BTW.

Removed the veto of “icon?” in samba and all working now, thanks for your help.

Yeah. That one got me a few weeks back as well…

@DavidFW1960 https://hacs.xyz/docs/publish/plugin#example

If your plugin require files that are not js files, use place all files (including the card file) in the dist directory.