The release of 2021.11 includes a major update to the Environment Canada integration, made possible by the generous support of @gwww. As the previous support thread was getting quite long, we thought it would be best to start a new one. Below is a summary of the changes.
Installation
Remove any references to environment_canada from your configuration YAML files, including the weather, sensor, and camera components.
Remove any versions manually installed in the custom_components directory.
Configure the integration via the GUI at Configuration ā Integrations ā + Add Integration
Improvements
Support for config flow, i.e. configuration via the Home Assistant GUI
Asynchronous updates
Shared data coordinator to pull data for weather and sensor entities
Sadly, although I keep getting reminded of this new capability, any attempt to configure the autodiscovered Environment Canada simply results in an āAbortedā message. Maybe I need to edit out the entries in my current config.yaml, but I see not indication of that in the existing doc.
Thanks so much its been a long road! I am sure all the Canadian hass enthusiasts are really happy at how far this integration has come and I look forward to it telling me I have a blizzard on the way lol.
That being said with the new integration flow how can I stop this integration from pulling in an extra weather station that is in my area that I dont want?
I have always designated the station using the weather station code and this worked well for me but for some reason the integration also pulls in now where it didnāt before another unmanned less usefull weather station in my area that is not required. Iām guessing because of hassos lat and long? I tried to designate the lat and long in my weather config for this integration but it keeps bringing the extra station that I dont want?
Sorry, we did a cutover from the old documentation to the new, without anything on transition. As @123 suggested, make sure to remove the environment_canada entries from your configuration.yaml file.
You should be able to specify the station by ID in the same way using the GUI. The lat/lon are auto-filled, but should be ignored if a station ID is specified. You should also be able to remove the lat/lon values if a station ID is specified.
I no longer see two discovery entries, but it is still going into discovery mode every time I restart the server.
I click configure, then submit, I get the aborted dialog then the correct weather station shows as configured. 2021.11.1
I went through and removed references to sensor.air_quality_health_index which was removed in this version and I was using, still seeing this discovery issue on startup.
So Iāve had intermittent issues in the past with the old integration - where some days it would just fail to connect to the EnvCanada servers (but then sometimes work).
I removed all entries in my config, rebooted HA and removed all of the old entities.
When adding the new integration in (specifying my weather station (MB/s0000193), rather than going by coordinates), I initially got the error āfailed to connectā but hitting submit again worked (but I have been unable to replicate this).
Deleting the integration, rebooting, and trying again gives me a new error: āunknown error has occurredā then āabortedā if I click submit again; no errors noted in the log when this happens. I tried a different city, which did not work either.
This is the error on the configuration page from earlier when it did āinstallā
Retrying setup: Cannot connect to host geo.weather.gc.ca:443 ssl:default [Try again]
And the entry in the log:
2021-11-10 02:43:36 WARNING (MainThread) [homeassistant.config_entries] Config entry āWinnipegā for environment_canada integration not ready yet: Cannot connect to host dd.weather.gc.ca:443 ssl:default [Try again]; Retrying in background
2021-11-10 02:54:45 WARNING (MainThread) [homeassistant.config_entries] Config entry āWinnipegā for environment_canada integration not ready yet: Cannot connect to host geo.weather.gc.ca:443 ssl:default [Connect call failed (ā205.189.10.51ā, 443)]; Retrying in background
I can only imagine that HA really cannot connect to EC. The code to connect is failing, which is not something that can be debugged beyond what the error message is.
Do you have stable internet? Is your DNS server responding? Since it is intermittent (if I understand correctly) that would suggest that a firewall is not blocking. I canāt think of any cause within the code for this to happen.
EC has been known to be flaky in the past, but that usually clears up in under an hour.
Nothing Iām seeing in the logs.
I was running 2021.11.1 but just updated to 11.2 this morning.
I JUST figured it out though. At some point in time, the latest version was only available on github. So I had cloned the github repo into my custom_components folder and had been using that for a while. Removing that folder and rebooting let the config flow go through and everything is good now.
Thanks for your work on this!
Itās terribly smokey here today and Iād love to see the AQHI sensor re-added. How quickly we start to rely on some of these simple things to control our homes! Had to manually adjust my air-exchangerā¦
I suggest creating a bug. Make sure that it is tagged with the Environment Canada integration. No guarantees but Iāll see if we can get it into a patch release. If not I will try to get into next monthly release. @michaeldavie and I will be notified when you create the bug report.
** Pull requests are R E A L L Y slow at the moment. No idea why. Patches are usually faster, so fingers crossed.
Thanks for the great work guys. I was getting 2 or 3 auto discovers, as I still had the manual config file going. Went through the update process at the beginning of this thread and rebooted, good to go!
Though I still have an air quality health index sensor, iām not sure where this is coming from or if its just a place holder in the new version for when it eventually worksā¦
But I always have two new discovered entities, my guess is both camera snow and rainā¦ So this has stopped workingā¦ Is there anyway to make this work again or what would be the best way to do it now ?
Iāll keep this response simple for now since there is some investigation/discussion on radar support with Environment Canada. The integration is querying their ādatabaseā too often. I would suspect calls are being rate limited. The path forward is being looked at and I donāt know when, if ever, this will be stable. As we learn more we can update this thread.