Commit Graph

73 Commits

Author SHA1 Message Date
Koen Kanters 9f31cd86a3 Implemented MQTT group add and remove. https://github.com/Koenkk/zigbee2mqtt/issues/764 2019-03-12 21:19:04 +01:00
Koen Kanters d81a972f1b Allow to override Home Assistant device discovery payload. https://github.com/Koenkk/zigbee2mqtt/pull/1030 2019-03-10 21:48:40 +01:00
Koen Kanters 0f9333f8b9 Fix elapsed being a string value instead of bool. https://github.com/Koenkk/zigbee2mqtt/pull/1206 2019-03-10 21:34:20 +01:00
qm3ster a978b26001 Use toStrictEqual for objects
Not sure why `jest-codemods` didn't do this.
Changed some primitives to use `toBe`.
2019-03-10 13:32:36 +01:00
qm3ster df1825d65e Use mockReturnValue instead of mockImplementation where possible 2019-03-10 13:32:36 +01:00
qm3ster 532b3b2484 Use toHaveBeenNthCalledWith in some cases 2019-03-10 13:32:36 +01:00
qm3ster 84a5277d45 Replace sinon with jest builtins 2019-03-10 13:32:36 +01:00
qm3ster acbab01b7e Apply jest-codemods
`chai` ELIMINATED
2019-03-10 13:32:36 +01:00
qm3ster 6a4073b305 Use jest instead of mocha
Oh nice, coverage works now
2019-03-10 13:32:36 +01:00
qm3ster 3b1fae1452 Remove whitespace 2019-03-09 21:09:39 +01:00
qm3ster cf2f10394a Mock fs in settings test 2019-03-09 21:09:39 +01:00
qm3ster 07765093be Fix all typos of separate 2019-03-09 21:09:39 +01:00
qm3ster a93838be15 codemod: object-shorthand
Also fixed `new (` and `formatter` by hand.
2019-03-09 16:30:05 +01:00
Mihal Malostanidis bb6c226d55 Test improvements (#1207)
* Add missing `zcl-id` dependency

* Improve devicePublish test

Now passes in both mocha and jest
Each test now waits for all publishes, such as readbacks,
and asserts their number.
Replaced `calledOnce` and such with numeric assertion,
for a more informative error message.

* Use sinon default sandbox

* Take assert out of chai

Improves clutter, but also `jest-codemods` also makes use of this.

* Replace proxyquire with simple cache delete

* Reduce shared mutable state in settings.test
2019-03-08 16:56:53 +01:00
Koen Kanters 2c6176ff10 Fix parse topic when topic ends with postfix. https://github.com/Koenkk/zigbee2mqtt/issues/1200 2019-03-06 21:38:49 +01:00
Koen Kanters 6427da244f Implement attribute output. https://github.com/Koenkk/zigbee2mqtt/issues/493 2019-03-04 18:13:36 +01:00
Andreas Brett 1cde620d70 add support for local ISO8601 timestamp format (#1171)
* add support for local ISO8601 timestamp format

added local ISO8601 timestamp format for local rather than UTC-based timestamps

ISO8601 = 2019-03-01T15:32:45.941+0000
ISO8601_Local = 2019-03-01T16:32:45.941+0100 (for TZ GMT+1)

* fixed indentation

* tabs to spaces

* comply with Travis

* comply with Travis once again

* Removed spaces to make Travis happy

* updates
2019-03-02 16:47:36 +01:00
Koen Kanters ae14fa5cd6 Update zigbee-shepherd-converters to 7.2.0. 2019-03-02 16:35:00 +01:00
Koen Kanters 61116ec670 Fix tests. 2019-02-26 21:06:48 +01:00
Koen Kanters 516bd704c6 Allow devices and groups to be specified in separate file. https://github.com/Koenkk/zigbee2mqtt/issues/1148 2019-02-24 15:49:41 +01:00
Koen Kanters 147a130628 Update zigbee-shepherd-converters to 7.1.11 2019-02-23 16:02:45 +01:00
Koen Kanters bdfabeb3da Discover linkquality sensor for all devices. https://github.com/Koenkk/zigbee2mqtt/issues/757 2019-02-20 20:10:38 +01:00
Koen Kanters 17a6fff3ce Publish group state. #764 2019-02-14 18:13:51 +01:00
Koen Kanters f171d54e4b Refactor extension names. 2019-02-13 21:03:23 +01:00
Koen Kanters 8703847337 Merge branch 'master' into dev 2019-02-12 21:26:37 +01:00
Koen Kanters 4592b00fe1 Move docs to zigbee2mqtt.io repo. #1072 2019-02-12 21:16:42 +01:00
Koen Kanters 3d151298ae Update zigbee-shepherd-converters to 7.1.7. 2019-02-10 20:35:26 +01:00
timstanley1985 a0278b7577 Allow to override Home Assistant discovery configuration. (#1030)
* Add expiry_after configuration option

* Failed attempt at moving expire_after to under a homeassistant sub-section

* Update.
2019-02-09 19:42:31 +01:00
Koen Kanters 52fb19360e Revert "Set state of stateless properties to ‘idle’ after publish. #959"
This reverts commit 0826db07d0.
2019-02-09 00:29:40 +01:00
Koen Kanters 63c88cba5b Revert "Fix tests."
This reverts commit b6fda868ed.
2019-02-09 00:28:59 +01:00
Koen Kanters b6fda868ed Fix tests. 2019-02-06 20:52:44 +01:00
Koen Kanters 0826db07d0 Set state of stateless properties to ‘idle’ after publish. #959 2019-02-05 17:41:47 +01:00
Koen Kanters c9c599b60b Refactor publishDeviceState to publishEntityState (for future group support). 2019-02-04 18:36:49 +01:00
Giel 60349171d2 Always read after write for devices that require it. (#1004)
* Always read after write for devices that require it.

Devices with readAfterWriteTime set, even if it's 0, will get their
state read after write because those devices don't automatically
report it themselves.

Devices that are capable of reporting but don't do it by default
should have `report: true` set in the device-specific config and
we won't read after write.

* Fix tests
2019-02-03 14:39:00 +01:00
Koen Kanters 959e7458a4 Fix availability tests. 2019-02-02 18:15:03 +01:00
Koen Kanters ff02e54f25 1.1.1 2019-02-01 23:36:20 +01:00
Koen Kanters 99a29293dd Mock homeassistant zigbee2mqtt version. 2019-01-30 18:07:44 +01:00
Koen Kanters cf7e0d1aa9 1.1.0 2019-01-29 21:45:36 +01:00
Koen Kanters dd6e34a152 Fix tests. 2019-01-22 20:44:40 +01:00
Koen Kanters 86f19affa1 Ensure that state and brightness are executed before other commands. #788 2019-01-21 17:38:06 +01:00
Laurent 7cd30a3a05 configurable last_seen (#874)
* configurable last_seen

* Refactor last_seen.
2019-01-18 20:31:55 +01:00
Ivan Salazar 34a3e3c00b add Sengled E11-G13 bulbs to deviceAvailability.js (#860)
* add Sengled E11-G13 bulbs to deviceAvailability.js

* Update deviceAvailability.js

* Refactor and add tests

* Fix linting issue
2019-01-16 20:41:41 +01:00
Koen Kanters 28e32884d9 Update zigbee-shepherd-converters to 7.0.20 2019-01-15 21:19:07 +01:00
Koenkk 6912f8108d Refactor json_attributes to json_attributes_topic. https://github.com/Koenkk/zigbee2mqtt/issues/840 2019-01-14 18:04:33 +01:00
Koen Kanters dccdc5aafa Publish one MQTT message when a zigbee message is converted twice. #827 2019-01-11 22:38:16 +01:00
Koenkk f6c01a02c9 Home Assistant: set precision in value_template. #787 2019-01-08 19:00:47 +01:00
Koen Kanters 3bb1f0f10b Update zigbee-shepherd-converters to 7.0.10. 2019-01-06 15:31:08 +01:00
Koen Kanters faede151f3 Update zigbee-shepherd-converters to 7.0.7. #142 2018-12-27 22:51:16 +01:00
Koen Kanters ac94b95bba Update zigbee-shepherd-converters to 7.0.6. 2018-12-27 22:23:57 +01:00
Koen Kanters 3bc2ec8c79 Simplify groups api. 2018-12-27 18:43:34 +01:00