Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mmip #55

Merged
merged 42 commits into from
Apr 15, 2024
Merged

mmip #55

Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
872a93f
feat(new-cards): add new cards
jeroenwienk May 22, 2022
369b4c9
feat(new-cards): add new cards
jeroenwienk May 22, 2022
86914e7
feat(new-cards): add new cards
jeroenwienk Jun 10, 2022
45565a8
feat(new-cards): add new cards
jeroenwienk Jun 17, 2022
24cbda8
feat(new-cards): add new cards
jeroenwienk Jun 22, 2022
efd2d13
feat(new-cards): add new cards
jeroenwienk Jun 22, 2022
4449bab
Merge remote-tracking branch 'upstream/master' into feature/new-cards2
jeroenwienk Jun 28, 2022
eef7fb1
feat(new-cards): update translations
jeroenwienk Jun 28, 2022
7345a1b
feat(new-cards): run lint
jeroenwienk Jun 28, 2022
89ad4c6
feat(new-cards): update app json
jeroenwienk Jun 28, 2022
6bfc4cb
Merge pull request #41 from jeroenwienk/feature/new-cards2
jeroenwienk Jun 28, 2022
6fc3ef3
update lockfile
jeroenwienk Jun 28, 2022
1fe96ce
Bump version to v3.4.0
jeroenwienk Jun 28, 2022
3f29b87
Update JSDocs template to 1.5.2
HarwinBorger Jun 29, 2022
3fe1179
upgrade athom-api
jeroenwienk Jul 6, 2022
eb92bff
Bump version to v3.4.1
jeroenwienk Jul 6, 2022
941695d
use new api in scripts
jeroenwienk Sep 25, 2023
4014fac
Merge pull request #42 from athombv/jsdocs/1.5.2
jeroenwienk Sep 25, 2023
889d8a1
use new api in scripts
jeroenwienk Oct 18, 2023
800de29
chore: fix link to HomeyScript reference
RobinBol Nov 29, 2023
960d7b0
update homey-api
jeroenwienk Apr 5, 2024
3f7d3eb
add all new cards
jeroenwienk Apr 7, 2024
e1b0486
pass version to run script
jeroenwienk Apr 7, 2024
47bebf8
remove rejection handler
jeroenwienk Apr 7, 2024
e77554f
update v1 examples
jeroenwienk Apr 7, 2024
5b15379
Merge branch 'master' into feature/homey-api
jeroenwienk Apr 7, 2024
52e8307
rename
jeroenwienk Apr 7, 2024
7c9c184
upgrade deps
jeroenwienk Apr 7, 2024
44673d7
add rejection handler
jeroenwienk Apr 9, 2024
0ad58cd
Bump version to v3.4.2
jeroenwienk Apr 9, 2024
f41bf40
docs wip
jeroenwienk Apr 11, 2024
bb38502
update docs
jeroenwienk Apr 11, 2024
4be2e74
update docs
jeroenwienk Apr 11, 2024
7ca51b3
fix lint
jeroenwienk Apr 11, 2024
3042f9c
update title
jeroenwienk Apr 11, 2024
648f69f
update editorconfig
jeroenwienk Apr 11, 2024
e026df0
update homey-api
jeroenwienk Apr 15, 2024
9f90408
update actions
jeroenwienk Apr 15, 2024
77bf08f
update actions
jeroenwienk Apr 15, 2024
5cd3bb3
update actions
jeroenwienk Apr 15, 2024
79ab4d5
Merge pull request #54 from athombv/feature/homey-api
jeroenwienk Apr 15, 2024
179b01b
Bump version to v3.5.0
jeroenwienk Apr 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove rejection handler
jeroenwienk committed Apr 7, 2024
commit 47bebf8a4f4b8dee31826df259ddb8af227ac949
11 changes: 10 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
@@ -39,6 +39,13 @@ module.exports = class HomeyScriptApp extends Homey.App {
static RUN_TIMEOUT = 1000 * 30; // 30s

async onInit() {
// Remove since alot of them will be caused by user errors.
process.removeAllListeners('unhandledRejection');

process.on('unhandledRejection', (reason, promise) => {
this.error('Unhandled Rejection at:', promise, 'reason:', reason);
});

// Init Scripts
this.scripts = this.homey.settings.get('scripts');

@@ -180,7 +187,8 @@ module.exports = class HomeyScriptApp extends Homey.App {

getHomeyAPI({ version }) {
if (version >= 2) {
return this.createAppApi();
const api = this.createAppApi();
return api;
}

const api = new HomeyAPILegacy({
@@ -199,6 +207,7 @@ module.exports = class HomeyScriptApp extends Homey.App {

async onFlowGetScriptAutocomplete(query) {
const scripts = await this.getScripts();

return Object.values(scripts)
.filter(script => script.name.toLowerCase().includes(query.toLowerCase()))
.map(script => ({