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

Add device cleanup as a new feature #754

Merged
merged 20 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,9 @@ alexaDiscovery.json
tools/after.json
tools/output.txt

gh-md-toc
gh-md-toc
/test/hbConfig/accessories
/test/hbConfig/backups
/test/hbConfig/persist
test/hbConfig/config.json
test/hbConfig/homebridge-alexa-discovery.json
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ README.md.toc.*
tools/*
publish.sh
beta.sh

test/*
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

All notable changes to this project will be documented in this file. This project uses [Semantic Versioning](https://semver.org/).

## 0.8.0 (2024-12-24)

## [Version 0.8.0](https://github.com/northernman54/homebridge-alexa/compare/v0.7.1...v0.8.0)

#### Changes

- Changed behaviour for missing devices, and have updated the plugin inform Alexa about some missing devices so they can be automatically deleted. Feature is enabled with the config option `deviceCleanup`. Currently only removes devices when it detects that the homebridge instance / child bridge associated with the device is no longer available.

- Improved performance on `Alexa turn off all the lights`

## 0.7.1 (2024-09-24)

## [Version 0.7.1](https://github.com/northernman54/homebridge-alexa/compare/v0.7.0...v0.7.1)
Expand Down
16 changes: 0 additions & 16 deletions beta.sh

This file was deleted.

7 changes: 7 additions & 0 deletions config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@
"placeholder": false,
"description": "Enable beta test environment. Only available by invitation."
},
"deviceCleanup": {
"title": "<b>Cleanup of Not Responding Devices</b>",
"type": "boolean",
"default": true,
"description": "Enables cleanup of devices that are not responding. This will remove devices from Alexa that are not responding. Defaults to true."
},
"refresh": {
"title": "<b>Accessory Cache Refresh Interval</b>",
"type": "integer",
Expand Down Expand Up @@ -255,6 +261,7 @@
"items": [
"pin",
"routines",
"deviceCleanup",
"debug",
"thermostatTurnOn",
"enhancedSkip",
Expand Down
34 changes: 34 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/** @type {import('eslint').FlatConfig[]} */
import pluginJs from "@eslint/js";
import pluginJest from "eslint-plugin-jest";
import globals from "globals";


export default [
{
files: ["**/*.js"],
languageOptions: {
sourceType: "commonjs", // This is necessary to parse imports/exports
globals: {
...globals.browser,
...globals.es2021,
...globals.jest, // Add Jest globals
},
},
// Add any other specific rules here
},
pluginJs.configs.recommended,
{
plugins: {
jest: pluginJest,
},
rules: {
...pluginJest.configs.recommended.rules,
"no-unused-vars": "warn", // Change no-unused-vars to a warning
},
},
{
// Exclude test, tools, and lib directories from linting
ignores: ["test/**/*", "tools/**/*js"], // Exclude these files from linting
}
];
197 changes: 0 additions & 197 deletions lib/alexaLocal.js

This file was deleted.

Loading
Loading