16 Commits

Author SHA1 Message Date
Paulus Schoutsen
e57d9f7751
Add websocket helpers to polymer (#1187)
* Add websocket helpers to polymer

* Lint

* Upgrade to home-assistant-js-websocket@2.0.0
2018-05-18 13:25:01 -04:00
Paulus Schoutsen
f70c0aea6c
Org files (#1183)
* Organize files

* Import EventsMixin

* Import NavigateMixin

* Dissolve window.hassMixins

* Apply ElementMixin when we use it

* Update tests to point at right dir

* Eslint

* Clean

* Update mixins inside hassio

* Update lint command"

* Fix polymer lint
2018-05-16 13:47:34 -04:00
Paulus Schoutsen
3b7a206cec
Add an authorize page for authentication (#1147)
* Use authorize page if auth provider

* Add webcomponent polyfill

* More fixes

* ES5 fix

* Lint

* Use redirect_uri

* upgrade uglify to fix tests?

* Update browsers used for testing
2018-05-10 14:25:36 -04:00
Paulus Schoutsen
912969111f
Move all of hassUtil to JS (#1153)
* Move all of hassUtil to JS

* Fix tests
2018-05-09 21:33:31 -04:00
Adam Mills
101794c88e Load and subscribe to backend translations (#894)
* Load backend translations

* Add support for component level state translations

* Fix selected language backend translation loading
2018-02-28 19:32:48 -08:00
Paulus Schoutsen
783f356679
Add timer card and badge (#810)
* Add timer card and badge

* Disable interval on disconnect

* Tests!

* One more test case

* Remove padStart

* Remove state from timer state card
2018-01-19 09:26:06 -08:00
Andrey
0b9bd62251 Update canToggleState with toggleable climate (#782) 2018-01-04 23:57:23 -08:00
Adam Mills
b3ded276b5
Properly localize unknown/unavailable sensors (#752) 2017-12-23 16:16:40 -05:00
Adam Mills
c8c21e6fac
Refactor out our localize custom variant (#743) 2017-12-19 09:18:50 -05:00
Adam Mills
a723c62f4f Separate more JS util logic to be unit tested (#705)
* Move featureClassNames to js util

* Add tests for featureClassNames

* Strip empty feature class names

* Move canToggleDomain to js util

* Add tests for canToggleDomain

* Refactor canToggleDomain to ensure boolean return

* Switch to chai assert for richer syntax options

* Move canToggleState to js util

* Tests for canToggleState

* Enable linting for mocha tests

* Move stateCardType to js util

* Add tests for stateCardType

* Move stateMoreInfoType to js util

* Tests for stateMoreInfoType

* Include mdn Array includes polyfill
2017-12-03 20:56:16 -08:00
Paulus Schoutsen
70d09641f8 Fix mocha opts 2017-11-26 12:08:27 -08:00
Paulus Schoutsen
0707528bd7
Entity dropdown improvement (#674)
* Ignore hass changes while dropdown is open

* Upgrade vaadin-combo-box

* Fix styling on dev-service panel

* Fix styling for ha-entity-dropdown

* Fix height vaadin-combo-box dropdown

* Rename ha-entity-dropdown to ha-entity-picker

* More entity improvement (#675)

* Update script and automation editor to use entity picker

* Add entity and service picker to service dev panel

* Lint
2017-11-25 16:00:43 -08:00
Paulus Schoutsen
28457747e7
Fix eslint import extension (#682)
* Fix eslint import extension

* Update eslint hound

* Enable no unresolved for normal usage
2017-11-25 11:14:44 -08:00
Paulus Schoutsen
a960559639
Add eslint mocha options (#671)
* Add eslint mocha options

* Please hound

* Remove deprecated --compiler option
2017-11-24 21:01:15 -08:00
Adam Mills
3412edb843 Compute state display tests (#643)
* Move computeDomain and format functions to js

* Add tests for computeStateDisplay

* Always recalculate state display

* Remove LANGUAGE from hassUtils object

* Move AppLocalizeBehavior import to mixins

* Import mixins to state-card-display

* Safety check on computeStateDisplay

* Don't store computed domains on stateObj

* Integration tests for state-card-display

* Include extractDomain code in polymer repo

* Remove util function null checking

* Dont render test element without hass and stateObj

* Revert "Don't store computed domains on stateObj"

This reverts commit e3509d71823ff5e42a4dcf4849a98c5bb6cb391c.

* Revert "Always recalculate state display"

This reverts commit 27c24e2694ee6f7c147782532268b3a67998d49b.
2017-11-20 21:46:36 -08:00
Adam Mills
70c082716f MVP tests for hass-util.html (#629)
* MVP tests for hass-util.html

* MVP util.js to allow individual JS function export

* Use mocha to unit test js logic

* Isolate mocha test directory

* Move mocha opts to separate file

* Default export of util function

* Use reify for mocha tests instead of babel
2017-11-15 21:42:54 -08:00