Thanks for this great integration. I noticed in a post form a couple of weeks ago that you have introduced a new overlay that will display the time of each gif. As well, you slowed down the FPS. I was wondering how you can enable/control those two features? Is that coming in a new update to the integration within a future HA release? Or, is it something available today in a setting of the camera entity?
There’s an open pull request with these changes, but it’s currently stuck due to a build error. I’ll try to get this fixed for 0.114. In the meantime, you can run the code from release 0.2.0 as a custom component (that’s what I’m doing on my own instance):
Adding new configuration options is trickier, as I can’t do that until I modify the components to work with HA’s new GUI-based configuration. That’s on my list of things to do, but I don’t know right now when I’m going to get to it. If you’re running a custom component you could modify the code locally, which I recognize is less than ideal.
So I manually pulled down this PR onto the 0.113b3 (I see it’s going to be added to b4 or the final release, but while I wait…). The first restart worked fine (no errors), but after restarting once more now I got:
Logger: homeassistant
Source: components/environment_canada/weather.py:155
First occurred: 1:55:31 PM (1 occurrences)
Last logged: 1:55:31 PM
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/homeassistant/helpers/entity_platform.py", line 293, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/local/lib/python3.8/site-packages/homeassistant/helpers/entity_platform.py", line 452, in _async_add_entity
entity.async_write_ha_state()
File "/usr/local/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 290, in async_write_ha_state
self._async_write_ha_state()
File "/usr/local/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 314, in _async_write_ha_state
sstate = self.state
File "/usr/local/lib/python3.8/site-packages/homeassistant/components/weather/__init__.py", line 188, in state
return self.condition
File "/usr/local/lib/python3.8/site-packages/homeassistant/components/environment_canada/weather.py", line 155, in condition
elif self.ec_data.hourly_forecasts[0].get("icon_code"):
IndexError: list index out of range
Hello all, I just found the environment_canada integration and I love it. I set up the default daily and sensors and everything worked fine. but then I decided I wanted both the daily and the hourly, so I set up two weather: definitions and named them _hourly and _daily. everything is fine with the weather component, but the sensor component has stopped working. I only have one sensor definition for it, and there is no “name” to associate it with, but it certainly does not like me having two weather: components.
Any suggestions as to how I could get both daily and hourly, and the sensors to all work?
@michaeldavie, trying to work my way through this, I did notice and I am not sure if this is best practice, but because of the imports in the init.py the modules for data, radar, and hydro are getting imported each time you import any env_canada module. so even if you are not setting up the camera integrations, the radar module is being imported… also I am not sure about python efficiency, but would that not mean it is being loaded 4 times in my case (2 weather, 1 sensor, 1 camera)? to be clear I don’t think this is the source of my issue, just trying to make heads and tails of all this.
Hope you figure that out that hourly daily problem.
I’m having an issue with false TTS announcements for warnings and such and I’m wondering if anybody can tell me whats happening. Currently right now I have the automation to trigger on state change for the sensor which the announcement is to be made. I have not designated what state change in the front end and I believe that it defaults to any state change in that case.
The problem I’m seeing is that periodically through the day I’ll get an announcement that is nothing.
environment_canada_weather_watch_announcement:
alias: environment canada weather watch announcement
sequence:
- service: tts.google_translate_say
data_template:
entity_id: media_player.redacted
message: This is an Environment Canada weather watch declaration. There is an"{{ states('sensor.watches') }} in effect."
Basically nothing or the same is announced in the “{{ states(‘sensor.watches’) }}” portion. This leads me to believe that the sensor has been updated perhaps but not with anything or with the same information.
Is there a way to get rid of the false/repeat announcements ?
Here is my current automation code generated from the gui
Update on the list index out of range error: through some debugging, it looks like sometimes when getting an initial set of EC data, the hourly forecasts list is not populated. This happens to me pretty regularly when Home Assistant starts. By adding this check to line 155 of weather.py, it has been working with no further errors.
elif len(self.ec_data.hourly_forecasts) > 0:
Seems like a trivial fix for me to submit a PR, but let me know if that would help.
Hi all,
I have been using this extension for very long time and it has been great. However since a few days I experience a problem that I can’t figure out: The sensor platform does not seems to update as frequently and as reliably as the weather platform. Unfortunately it affects my automation.
I am not sure what is wrong. I removed the integration and added it again but it seems to be always the same problem.
Similar to post175, I am running into chance_of_precip state unknown. If you look at attached screen shot, if there is no chance, they don’t seem to publish a 0%. If they publish a number the sensor works fine. The problem for me is I use the sensor state to trigger an action, in an esp device. Anyway to set this state to zero if not published? I guess i could make a template sensor possibly with an if then else for this case.
I’m running in to similar delayed sensor updates. The weather platform seems to work great, but the sensor platform often doesn’t update for many hours at a time. This seems new in the past few versions.
Restarting HA always forces an update to the sensor platform, however between restarts is often “locks up” and shows no updates for extended periods. I’m not seeing anything in the logs either.
This is causing me all sorts of issues in other areas of my automations.
@michaeldavie. I have tried to go over this with a fine tooth comb, and I cannot see what the issue is for the sensors not updating when there are two other weather configurations. especially because the camera config works just fine. When I set up some logging, I determined that it does in fact set up the sensor_list just fine, and it adds the entities. but for some reason the update() is not running; no logging I put in there seems to get called. could this be a larger problem with how HA is calling the sensor updates? Any help would be greatly appreciated.
@bcarter Considering the issue that @bob88865 and I are having, I’m not sure that the problem with update() not running is related to multiple weather configurations. I only have one weather configuration, and my sensors frequently don’t update.
Now it’s possible this is 2 unrelated issues, but I’d say maybe this is a larger issue than just multiple weather configs.
Hi ! I added the camera platform in the configuration.yaml so now I have a sensor “camera” in my entities. I’m wondering how can I add it on my UI. I don’t have a camera card when I want to add a card.
Is there any way to debug when receiving “unavailable” for sensor readings? Was working for about 10 hours after I implemented it but since then all the sensor data like uv_index has just read “unavailable”. The weather data seems fine but I cannot get what I want from it (uv_index and other values used in some min_max calculations)