I wanted to create a custom card. Per the first Github link, I added the weather.yaml file into content/packages, and merged the content above into it as the weather.yaml had less monitored conditions. I also added to configuration.yaml - weather: !include_dir_list /content/packages.
Now I get nothing. The automation within weather.yaml appears as an entity but none of the BOM sensors. I then added the core BOM sensors into sensors.yaml and they turned up again…
What gives? Can someone guide me through this shamble? Seems like some serious bugs going on in this system.
I can confirm that when they are removed from sensors.yaml, they disappear, and when they’re added back in they appear again. No idea why the exact same sensor code in weather.yaml fails to load…
If you copied the weather.yaml from the Github link into /content/packages, then you need to add this entry in configuration.yaml packages: !include_dir_named content/packages
and remove the weather: !include_dir_list /content/packages from configuration.yaml, as this is then already defined inside the package. I suggest reading up on splitting your config here and about packages here.
I don’t thinks anything you observed is a bug, just wrong configuration.
Thanks Burningstone, I added packages: !include_dir_named config/packages
but now I’m getting this log error: Component error: packages - Integration ‘packages’ not found.
I confirm that config/packages does exist and it has the weather.yaml file in there. I was a bit confused when you said that weather.yaml is already definied inside the package? Do you mean that when I call the packages folder, all yaml files are automatically active?
Any thoughts on why I’m getting the integration component error?
Also, I realised I had already fixed up the indentation problem.
Then you packages folder needs to be inside the same folder as your configuration.yaml and inside the packages folder you have the weather.yaml file.
I didn’t say the weather.yaml is already defined, I said weather is already defined. The package you got from the github link, includes a block weather: ...., so it already defines the weather, that’s why you need to remove weather: from your configuration.yaml. Read the two links I provided in the previous post, they should make things clearer.
And thank you for clarifying that the package defines weather. From what I understand the title of each yaml in packages becomes the blod when using include_dir_named. So weather.yaml is defined as the code block weather for instance.
tells home assistant that it finds the packages inside the folder packages and each package is an individual file. The weather.yaml file is one of these individual files. The name doesn’t matter, it could also be named e.g. awesome_bom_weather_forecast.yaml. However inside the weather.yaml file is a section that starts with weather: this defines the weather code block.
The advantage of all this is to keep configuration for the same thing together and also your configuration.yaml doesn’t grow to a huge file. For example a package for your living room, where you have a switch: section, a remote: section and an input_select: section.
However it’s up to you on how you want to structure your configuration.
Thanks for all your help, think I probably picked a harder plugin for my first go lol.
One thing I’m not understanding, you mentioned the weather.yaml package having a weather: block, but I can’t see it in any of the code. That’s where I assumed it must have come from the title.
Ok, now I’m confused. I thought I saw it somewhere. I’ll take it back, however it still applies that weather.yaml doesn’t define the weather block code. This means you should be able to have weather: in addition to this package.
Your not alone.
I have same issue
All the bom_forecast_x
return unknown
When I look at the states page for BOM
none of those sensors in template exist
Current text doesn’t exist either.
I didn’t install it as a package just pasted it in my sensors.yaml file
Change Gosford to Sydney and still doesn’t work for me. @DavidFW1960
Edit: I think I just found my issue
I have
weather: in my configuration.yaml for BOM
As well without any info or monitored conditions.
It’s been there since day dot.
The BOM SENSOR does not use weather: it is a sensor.
If you guys are having an issue, please log an issue in my repo.
If the BOM forecast is not giving a valid status, check the product ID - the repo gives instructions on how to get the product ID.
Someone on the weekend also had an issue with the forecast component and it turned out that HACS wasn’t pulling the component correctly so he manually downloaded everything and it started working.
Anyway, this component DOES work -many people are using it. If you can’t get it working, log an issue and I will help you.