You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`watch`| Re-compile the TypeScript sources and watch for changes. |
37
-
|`test:ts`| Executes the tests you defined in `*.test.ts` files. |
38
-
|`test:package`| Ensures your `package.json` and `io-package.json` are valid. |
39
-
|`test:unit`| Tests the adapter startup with unit tests (fast, but might require module mocks to work). |
40
-
|`test:integration`| Tests the adapter startup with an actual instance of ioBroker. |
41
-
|`test`| Performs a minimal test run on package files and your tests. |
42
-
|`coverage`| Generates code coverage using your test files. |
43
-
44
-
### Writing tests
45
-
When done right, testing code is invaluable, because it gives you the
46
-
confidence to change your code while knowing exactly if and when
47
-
something breaks. A good read on the topic of test-driven development
48
-
is https://hackernoon.com/introduction-to-test-driven-development-tdd-61a13bc92d92.
49
-
Although writing tests before the code might seem strange at first, but it has very
50
-
clear upsides.
51
-
52
-
The template provides you with basic tests for the adapter startup and package files.
53
-
It is recommended that you add your own tests into the mix.
54
-
55
-
### Publishing the adapter
56
-
See the documentation of [ioBroker.repositories](https://github.com/ioBroker/ioBroker.repositories#requirements-for-adapter-to-get-added-to-the-latest-repository).
57
-
58
-
### Test the adapter manually on a local ioBroker installation
59
-
In order to install the adapter locally without publishing, the following steps are recommended:
60
-
1. Create a tarball from your dev directory:
61
-
```bash
62
-
npm pack
63
-
```
64
-
1. Upload the resulting file to your ioBroker host
65
-
1. Install it locally (The paths are different on Windows):
66
-
```bash
67
-
cd /opt/iobroker
68
-
npm i /path/to/tarball.tgz
69
-
```
70
-
71
-
For later updates, the above procedure is not necessary. Just do the following:
72
-
1. Overwrite the changed files in the adapter directory (`/opt/iobroker/node_modules/iobroker.time-switch`)
73
-
1. Execute `iobroker upload time-switch` on the ioBroker host
15
+
This adapter allows the user to switch devices on and off using time schedules.
16
+
The schedules can be fully configured by a vis widget.
17
+
One schedule switches one ioBroker state and consists of one or more actions that define when and how the state should be switched.
18
+
It is possible to configure at which time and on which weekdays the action should be triggered. There can be custom on/off values also.
19
+
In the widget the schedule can be disabled temporarily and the switched state can be controlled manually.
0 commit comments