Perhaps a stupid request, if the component supports having multiple, could you post an example config for multiple cities and radars? I want to do detected default local station and maybe where my relatives live or something like that.
Sure, I’ve been doing exactly that to test the English and French versions side by side. Here’s one for my local (Ottawa) and Brandon, MB (the sensors didn’t fit in the screen capture):
Hi, i tried running this component that is integrated in the 0.95.4 Home Assistant with a freshly updated python to 3.7.3 I am not sure if it is because python was updated or another problem, but I tried and could not get it up and running. Here is my error log.
Wed Jul 17 2019 23:05:34 GMT-0300 (Atlantic Daylight Time)
Error while setting up platform environment_canada
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform
SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
return fut.result()
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/environment_canada/camera.py", line 43, in setup_platform
from env_canada import ECRadar
File "/srv/homeassistant/lib/python3.7/site-packages/env_canada/__init__.py", line 1, in <module>
from .env_canada import *
File "/srv/homeassistant/lib/python3.7/site-packages/env_canada/env_canada.py", line 3, in <module>
from PIL import Image
File "/srv/homeassistant/lib/python3.7/site-packages/PIL/Image.py", line 93, in <module>
from . import _imaging as core
ImportError: libopenjp2.so.7: cannot open shared object file: No such file or directory
This a problem with numpy. In the latest version (which didn’t make it into 0.96) I’ve isolated this requirement to the camera platform, but I still need to dig into it more. It seems to only affect Debian / Raspbian / Hassbian.
Please try running this and restarting: pip install numpy==1.16.4 --force-reinstall --ignore-installed --no-binary :all:
I tried installing numpy within and outside Home Assistant and I still have the same error. I also tried to disable the camera platform (I forgot to add it to my previous post of the config) and still could not load. I still have the same error…
Been loving this integration for my home. I have set up automatons to alert me when warnings are posted, which has been working well. I apologize if this has been addressed, but is it possible for me to increase the refresh rate on the warnings, faster than the 10 minutes for the other sensors?
@biochemguy No, quite a few people have reported the same issue. I still haven’t been able to replicate it as I don’t have a Raspberry Pi to test on, but it seems that on Raspbian / Hassbian you need to install these dependencies:
I’m not sure. It’s not using any kind of API though, it’s mostly just reading the XML files that they host. It’s one of the most popular websites in Canada, so I don’t think they’ll notice.
I’ll add my vote to setting the default update interval back to 10 min, and allowing the user to lower it as needed. While it could be cool to get the bad weather notifications within 60 sec of Env Canada posting them, is getting them within 10 mins that bad?
1 min polling by every user of this integration will definitely be visible to them as it is does not look like organic traffic. The last thing we need is for the admins on the Env Canada side to blacklist the Home Assistant user agent or worse, ask you to take down the integration.
I’ve been working on setting up automation for warnings, advisories, watches. Curious how the ‘hidden’ attribute is toggled?
Would it be appropriate to use in an automation condition so that it only fires when there actually something to look at (ie the alert/warning/advisory is populated)?
If not, what’s the cleanest way to do this?
Current progress:
"Outside, it will be {{ states('sensor.condition') }} with a current temperature of {{ states('sensor.temperature') }} degrees.
The forecast for today is a high of {{ states('sensor.high_temperature') }} degrees and a low of {{ states('sensor.low_temperature') }} degrees.
{% if state_attr('sensor.warnings', 'hidden')!='true' %} There is a {{ states('sensor.warnings') }} in effect. {% endif %}
{% if state_attr('sensor.advisories', 'hidden')!=true %} There is a {{ states(' sensor.advisories') }} in effect. {% endif %}
{% if state_attr('sensor.ended', 'hidden')!=true %} The {{ states('sensor.ended') }} {% endif %}
There was a bit of this at the very end of the earlier thread:
I’ve also added the basic TTS script that I wrote to the documentation for the next release.
As of right now the hidden attribute is toggled based on whether there’s a value for the state or not. However, as of the next release it won’t be using the hidden attribute; entities can be hidden or shown using Lovelace instead (admittedly, I’m not sure how to do this myself).
On the automation side, you could try something like this: