Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Environment Canada weather, sensor, and camera platforms #21110

Merged
merged 27 commits into from Jun 6, 2019
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
d57bedc
Added Environment Canada weather platform
michaeldavie Feb 16, 2019
2f119c6
Added Environment Canada weather platform
michaeldavie Feb 16, 2019
73f8ce1
Migrate to new folder structure
michaeldavie Feb 21, 2019
c24dbe9
Migrate to new folder structure
michaeldavie Feb 21, 2019
795be43
Fix updates
michaeldavie Feb 22, 2019
4610c1d
Fix updates again
michaeldavie Feb 22, 2019
083efdd
Bump env_canada to 0.0.4
michaeldavie Feb 25, 2019
28653e3
Bump env_canada to 0.0.4
michaeldavie Feb 25, 2019
c2f5e40
Bump env_canada to 0.0.4 in requirements_all.txt
michaeldavie Feb 25, 2019
fdea590
Change daily forecast timestamp and high/low test
michaeldavie Feb 26, 2019
67bb466
Change daily forecast timestamp and high/low test
michaeldavie Feb 26, 2019
eb1fe67
Bump env_canada to 0.0.5
michaeldavie Mar 2, 2019
d95ac29
Break alerts into multiple sensors, bump env_canada to 0.0.6
michaeldavie Mar 4, 2019
27ea8ae
Bump env_canada to 0.0.7
michaeldavie Mar 5, 2019
664f9c0
Remove blank line
michaeldavie Mar 9, 2019
53d449a
Remove 'ec' sensor prefix, bump env_canada to 0.0.8
michaeldavie Mar 16, 2019
b390c57
Corrections
michaeldavie Apr 12, 2019
953afa9
Change to manifests.json
michaeldavie Apr 13, 2019
6ea5d01
Add docstring to __init.py__
michaeldavie Apr 13, 2019
e7848e2
Update CODEOWNERS
michaeldavie Apr 13, 2019
88d6122
pylint correction
michaeldavie Apr 14, 2019
8e2250e
pylint correction
michaeldavie Apr 14, 2019
39a7523
Add alert details, bump env_canada to 0.0.9
michaeldavie Apr 20, 2019
786b7aa
Update requirements_all.txt
michaeldavie Apr 20, 2019
75ffd4c
Update .coveragerc
michaeldavie Apr 24, 2019
cc7259a
Bump env_canada to 0.0.10
michaeldavie May 10, 2019
fea2b8d
Update requirements_all.txt
michaeldavie May 10, 2019
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Break alerts into multiple sensors, bump env_canada to 0.0.6

  • Loading branch information...
michaeldavie committed Mar 4, 2019
commit d95ac2969fee7cc2afcfe4c4a6a14382434f0b2d
@@ -17,7 +17,7 @@
from homeassistant.util import Throttle
import homeassistant.helpers.config_validation as cv

REQUIREMENTS = ['env_canada==0.0.5']
REQUIREMENTS = ['env_canada==0.0.6']

_LOGGER = logging.getLogger(__name__)

@@ -19,7 +19,7 @@
import homeassistant.util.dt as dt
import homeassistant.helpers.config_validation as cv

REQUIREMENTS = ['env_canada==0.0.5']
REQUIREMENTS = ['env_canada==0.0.6']

_LOGGER = logging.getLogger(__name__)

@@ -59,7 +59,11 @@
'unit': TEMP_CELSIUS},
'pop': {'name': 'Chance of Precip.',
'unit': '%'},
'warning': {'name': 'Warning'}
'warnings': {'name': 'Warnings'},
'watches': {'name': 'Watches'},
'advisories': {'name': 'Advisories'},
'statements': {'name': 'Statements'},
'endings': {'name': 'Ended'}
}


@@ -139,7 +143,13 @@ def unit_of_measurement(self):
def update(self):
"""Update current conditions."""
self.ec_data.update()
self._state = self.ec_data.conditions.get(self.sensor_type)
self.ec_data.conditions.update(self.ec_data.alerts)

sensor_data = self.ec_data.conditions.get(self.sensor_type)
if isinstance(sensor_data, list):
self._state = ', '.join(sensor_data)
else:
self._state = sensor_data

timestamp = self.ec_data.conditions.get('timestamp')
if timestamp:
@@ -20,7 +20,7 @@
import homeassistant.util.dt as dt
import homeassistant.helpers.config_validation as cv

REQUIREMENTS = ['env_canada==0.0.5']
REQUIREMENTS = ['env_canada==0.0.6']

_LOGGER = logging.getLogger(__name__)

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.