23 Commits

Author SHA1 Message Date
Andrey
0b9bd62251 Update canToggleState with toggleable climate (#782) 2018-01-04 23:57:23 -08:00
Nigel Rook
1d13126bb5 Use current date for input_datetime time rendering (#754)
* Use current date for input_datetime time rendering

Chrome has a bug where it fails to render times correctly using
toLocaleTimeString for certain dates in the past with non-normal
daylight saving rules. For the UK and New Zealand, this includes
1970-01-01. Instead of using this as the date when rendering the time
for a time only input_datetime, use the current date.

* Add comment

* Lint
2018-01-02 05:02:26 -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
90e6f59a74
Merge script and automation editor JS (#693)
* Merge script and automation editor JS

* Also consolidate the files
2017-11-30 11:38:21 -08:00
Paulus Schoutsen
8054aa744e
Listen to every change, not just final change event (#688) 2017-11-26 17:21:57 -08:00
Paulus Schoutsen
3ba15cb7b5
Fix error when creating new automation (#683)
* Import correct computeStateDomain

* ha-service-picker to not crash when no hass

* Fix routing be less active

* Fix combo box value sync
2017-11-25 21:43:52 -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
3d90d1d016
Tweak index.html (#657) 2017-11-20 21:52:35 -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
Paulus Schoutsen
6fac4e9027
Expose build type on window (#630)
* Expose build type on window

* Build two panels for Hass.io
2017-11-14 22:39:20 -08:00
Andrey
583abedd34 Support serving ES6 JS to clients (#596)
* Support serving ES6 JS to clients

* Make es6 default dir and es5 a special dir

* Fix package building

* Fix build_frontend script
2017-11-10 09:05:37 -08:00
Andrey
bc0d44ca81 Upgrade eslint to 4.8.0 (#445)
* Upgrade eslint

* Fix post-merge errors
2017-10-08 21:08:06 -07:00
Paulus Schoutsen
07d5d6e8a9 Remove other broken defaults for triggers 2017-08-15 22:27:14 -07:00
Paulus Schoutsen
29f5730545 Fix sun offset being mandatory. Fixes #396 2017-08-15 22:14:22 -07:00
Paulus Schoutsen
faf576d43d Add script editor (#393)
* Add script editor

* Cleanup
2017-08-15 22:09:43 -07:00
Paulus Schoutsen
823a699670 Fix bug in automation editor when no conditions 2017-08-12 14:52:27 -07:00
Paulus Schoutsen
a51b9c1eb5 Bug fixes 2017-08-09 00:44:46 -07:00
Paulus Schoutsen
f02d42d79c Automation update (#382)
* Add missing triggers

* Move onChangeEvent to generic util

* Generate dev service worker in dev mode

* Add actions

* Lint

* Add condition support

* Add condition actions
2017-08-09 00:44:17 -07:00
Paulus Schoutsen
2453d6f397 Organize JS better (#343) 2017-07-16 23:31:19 -07:00