Commit Graph

423 Commits (8fc27cbe43610ede777f684324595fcc1dad7c02)

Author SHA1 Message Date
Robbie Trencheny a5f144cb7c HTML5 notify actions (#2855)
* Add action and callback support to html5 (#2855).

Remove registrations from the callback view since we always get the latest anyway.

We dont put an audience in the claims so we will never hit this error.

Bring tests back up to where they were before callbacks.

Only import jwt where necessary

Fix bracket spacing errors

Fix JWT decode check for loop

Remove stale comment.

Add tests for the callback system.

Shorten line

Disable pylint broad-except and change e to jwt_decode_error.

Verify expiration

Remove duplicate jwt.exceptions.DecodeError

Catch no keys matched and return False

* Switch to using registrations for callbackview instead of json_path

* Only check for URL and such if the data object actually exists

* raise instead of return

* cleanup decode_jwt

* Clean up JWT errors

* Correctly set status_code to 401

* Improve JWT by adding target to claims and attempting to check the given target for a decode match first, as well as pass the target through in the event payload.

* Add tag support and fix formatting issues

* Pass through any keys that dont apply to the payload into the notification.data dictionary

* Remove stale print

* Pass back the data dictionary if it exists

* Actually put the default url even if a notify payload dictionary doesnt exist

* pylint, flake8

* Add subscription validation

* Add validation for the callback event payload and use constants where possible

* Use HTTP_UNAUTHORIZED instead of 401

* Change callback dictionary to dict instead of cv.match_all

* Fix up tests and make subscription required

* Whoops, that test was supposed to fail

* Use the result of CALLBACK_EVENT_PAYLOAD_SCHEMA as event_payload

* Add a test for html5 callback decode_jwt where the device has been renamed since notification has been sent.

* Remove the loop through logic, assume that target is always in JWT

* Always return something instead of possibly None.

* Update frontend
2016-08-17 22:34:12 -07:00
Paulus Schoutsen 2237189c86 Add default badge to push notification (#2859) 2016-08-16 23:05:00 -07:00
Paulus Schoutsen 7720a17c18 Add badge 2016-08-16 23:02:19 -07:00
Paulus Schoutsen dc68f61261 Html5 push notifications notify platform (#2807)
* Initial work to add Chrome Push Notification support

* Remove push.js from home-assistant since it is now in Polymer

* Chrome->HTML5, general cleanup/fixes

* Make html5 generic, move manifest.json into frontend so that we can dynamically add the gcm_sender_id

* Pylint, flake8, pydocstyle frontend init

* HTML5 push fixes

* Update polymer

* Remove crypto req

* Add notify default platform.

* Fix HTML5 push

* Registration fixes

* Linting fix

* pep257 fix

* Add tests

* pep257 fix

* Update frontend
2016-08-14 01:10:07 -07:00
Paulus Schoutsen f845893f8f Update frontend 2016-08-13 10:21:54 -07:00
Paulus Schoutsen 0b404cc0be Update frontend 2016-08-13 09:41:23 -07:00
Paulus Schoutsen 492ade7b1a Update frontend 2016-08-09 20:12:20 -07:00
Paulus Schoutsen 9a575eb6d6 Link prefetch panels (#2748)
* Add link=prefetch to index.html

* Improve http request logging
2016-08-08 17:35:27 -07:00
Paulus Schoutsen dd0b9f2f36 Update frontend 2016-08-08 00:41:32 -07:00
Paulus Schoutsen b9b1d95514 Tweak panel parameters (#2746) 2016-08-07 21:56:17 -07:00
Paulus Schoutsen 231656916c Address last comments 2016-08-04 22:44:37 -07:00
Paulus Schoutsen 792154a6a7 Update frontend 2016-08-03 08:22:47 -07:00
Paulus Schoutsen 1856e0110b Update frontend 2016-07-31 19:07:06 -07:00
Paulus Schoutsen c39c10a088 update frontend 2016-07-31 16:39:07 -07:00
Paulus Schoutsen f4d6ce08e4 Update frontend 2016-07-31 14:47:01 -07:00
Paulus Schoutsen 89ec39f629 Update frontend 2016-07-31 00:43:28 -07:00
Paulus Schoutsen 99b27b1ec6 Update frontend 2016-07-30 11:22:44 -07:00
Paulus Schoutsen 55624bcff9 Add custom panel example using React (#2651) 2016-07-29 00:49:58 -07:00
Paulus Schoutsen ec8802ec44 Update frontend 2016-07-28 09:22:15 -07:00
Paulus Schoutsen 1620680127 Use local timezone for log and history dates (#2622)
* Use local timezone for log and history dates

* home-assistant-js fix

* Submodule updates not included so travis can build

* Separate Date and DateTime http validators

* Include submodule reference

* Update frontend
2016-07-27 20:43:46 -07:00
Paulus Schoutsen 487f3b2951 Update frontend 2016-07-23 10:19:26 -07:00
Paulus Schoutsen a513e1cc35 Update frontend 2016-07-21 08:41:48 -07:00
Paulus Schoutsen 2ea2a62d45 Update service worker 2016-07-20 23:40:40 -07:00
Paulus Schoutsen 59029f2830 Update frontend 2016-07-19 23:36:52 -07:00
Paulus Schoutsen 7c431911d1 Update frontend 2016-07-19 02:37:22 -07:00
Paulus Schoutsen 5001c9729f Update frontend 2016-07-18 21:29:50 -07:00
Paulus Schoutsen 541fffc7fa Update frontend 2016-07-17 23:23:31 -07:00
Paulus Schoutsen 38c50c830f Fix linting errors 2016-07-16 23:45:38 -07:00
Paulus Schoutsen 925a623445 Build frontend 2016-07-16 23:24:17 -07:00
Paulus Schoutsen 22b4aebeb3 Add support for dynamic frontend panels 2016-07-16 23:21:34 -07:00
Paulus Schoutsen 7cff107c17 Update frontend 2016-07-16 02:15:46 -07:00
Paulus Schoutsen e38b7d97d2 Update frontend 2016-07-13 23:05:40 -07:00
Paulus Schoutsen 8984a6b161 update frontend 2016-07-13 19:11:33 -07:00
Paulus Schoutsen 49b595e32e Update frontend 2016-07-13 19:05:25 -07:00
Paulus Schoutsen af736a3e71 Update frontend (temp map solution) 2016-07-13 08:32:13 -07:00
Paulus Schoutsen 8fcfb9136c Update frontend 2016-07-12 09:16:21 -07:00
Paulus Schoutsen 6d60287455 Update frontend 2016-07-12 00:10:05 -07:00
Paulus Schoutsen 6cb91e66c8 Update frontend 2016-07-11 22:07:34 -07:00
Paulus Schoutsen 31b8e49ad2 Fix PyLint 1.6 issues (#2471) 2016-07-07 18:54:16 -07:00
Paulus Schoutsen c5b2df01d9 Update frontend 2016-07-04 10:40:43 -07:00
Paulus Schoutsen cbb897b2cf Update frontend 2016-06-24 22:34:55 -07:00
Antonio Párraga Navarro cbc0833360 Support for Sony Bravia TV (#2243)
* Added Sony Bravia support to HA

* Improvements to make it work on my poor raspberry 1

* Just a typo

* A few fixes in order to pass pylint

* - Remove noqa: was due to the 80 characters max per line restriction
- Move communication logic to a separate library at https://github.com/aparraga/braviarc.git
- Added dependency and adapt the code according to that

* A few improvements

* Just a typo in a comment

* Rebase from HM/dev

* Update requirements by executing the script/gen_requirements_all.py

* More isolation level for braviarc lib

* Remove unnecessary StringIO usage

* Revert submodule polymer commit

* Small refactorization and clean up of unused functions

* Executed script/gen_requirements_all.py

* Added a missing condition to ensure that a map is not null

* Fix missing parameter detected by pylint

* A few improvements, also added an empty line to avoid the lint error

* A typo
2016-06-19 22:35:26 -07:00
Paulus Schoutsen 314fa42298 Version bump to 0.22 2016-06-18 13:19:57 -07:00
Paulus Schoutsen 71157dbec9 Merge branch 'master' into dev
Conflicts:
	homeassistant/components/frontend/version.py
	homeassistant/components/frontend/www_static/core.js.gz
	homeassistant/components/frontend/www_static/frontend.html
	homeassistant/components/frontend/www_static/frontend.html.gz
	homeassistant/components/frontend/www_static/service_worker.js
	homeassistant/components/frontend/www_static/service_worker.js.gz
	homeassistant/const.py
2016-06-18 12:00:38 -07:00
Paulus Schoutsen 2036c44364 Hotfix 21 2 (#2302)
* Update frontend

Conflicts:
	homeassistant/components/frontend/version.py
	homeassistant/components/frontend/www_static/core.js.gz
	homeassistant/components/frontend/www_static/frontend.html
	homeassistant/components/frontend/www_static/frontend.html.gz
	homeassistant/components/frontend/www_static/home-assistant-polymer
	homeassistant/components/frontend/www_static/service_worker.js
	homeassistant/components/frontend/www_static/service_worker.js.gz

* Add a default OPTIONS handler for wsgi (#2301)

When a browser makes a CORS request, it often makes a 'preflight'
options request in order to make sure the resource is valid, and that
it has the right CORS access. This adds a default OPTIONS handler for
all views. If a view needs to customize the OPTIONS handler for some
reason, it's free to, but this way CORS will work.

* Version bump to 0.21.2
2016-06-14 19:54:09 -07:00
Paulus Schoutsen 65750f667b Update frontend 2016-06-14 18:39:44 -07:00
Paulus Schoutsen 9d7c9d1262 Update frontend 2016-06-13 20:11:01 -07:00
Paulus Schoutsen ab48010d14 Add 1024x1024 favicon 2016-06-13 00:04:54 -07:00
Paulus Schoutsen ebe4c39020 Merge branch '0-21-1' into dev
Conflicts:
	homeassistant/components/frontend/www_static/core.js.gz
	homeassistant/components/frontend/www_static/frontend.html.gz
	homeassistant/components/frontend/www_static/service_worker.js.gz
	homeassistant/const.py
	requirements_all.txt
	setup.py
2016-06-12 00:25:36 -07:00
Paulus Schoutsen 5c87883c86 Update frontend 2016-06-12 00:04:37 -07:00