Skip to content

Commit b8d3cbc

Browse files
authored
Add external link to devices. (#2)
1 parent 52701ec commit b8d3cbc

File tree

5 files changed

+13
-6
lines changed

5 files changed

+13
-6
lines changed

.github/workflows/pythonapp.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ jobs:
1919
python-version: 3.7
2020
- name: Install dependencies
2121
run: |
22-
python -m pip install --upgrade pip
23-
pip install flake8
22+
python -m pip install --user flake8
2423
- name: Lint with flake8
2524
run: |
26-
flake8 . --count --max-line-length=79 --statistics
25+
python -m flake8 . --count --max-line-length=79 --statistics

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,5 @@
4545
}
4646
},
4747
"short_name": "Tide",
48-
"version": "0.2.0"
48+
"version": "0.2.1"
4949
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "tide-calendar-adapter",
33
"display_name": "Tide Calendar",
4-
"version": "0.2.0",
4+
"version": "0.2.1",
55
"description": "Tide calendar for Mozilla WebThings Gateway",
66
"author": "Mozilla IoT",
77
"main": "main.py",

pkg/tide_calendar_device.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,14 @@ def __init__(self, adapter, _id, station_id, unit):
124124
0
125125
)
126126

127+
self.links = [
128+
{
129+
'rel': 'alternate',
130+
'mediaType': 'text/html',
131+
'href': 'https://tidesandcurrents.noaa.gov/noaatidepredictions.html?id={}'.format(self.station_id), # noqa
132+
},
133+
]
134+
127135
t = threading.Thread(target=self.poll)
128136
t.daemon = True
129137
t.start()

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
pytz==2019.2
1+
pytz==2019.3
22
requests==2.22.0

0 commit comments

Comments
 (0)