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

v2.2.0 #109

Merged
merged 27 commits into from
May 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
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
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

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

## [2.2.0](https://github.com/donavanbecker/homebridge-august/releases/tag/v2.2.0) (2024-05-25)

### What's Changes
#### Major Changes
- Devices that are Homekit enabled will now not display unless the new `overrideHomekitEnabled` device config flag is set.

#### Other Changes
- All for overriding `PushRate` which allows you to set how quick changes are pushed to August API with the `PushRate` config
- This can be set at device or plugin level
- Added Success Logs(`green`) which requires Homebridge 1.8.0 or higher
- Housekeeping and updated dependencies.

**Full Changelog**: https://github.com/donavanbecker/homebridge-august/compare/v2.1.0...v2.2.0

## [2.1.0](https://github.com/donavanbecker/homebridge-august/releases/tag/v2.1.0) (2024-05-07)

### What's Changes
Expand Down
56 changes: 42 additions & 14 deletions config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@
"type": "object",
"properties": {
"lockId": {
"title": "Device ID",
"title": "Lock ID",
"type": "string",
"placeholder": "TSSQ97FRDMX7TPGU3Z2HWNRDPQXJ9YSM"
},
Expand Down Expand Up @@ -245,24 +245,32 @@
"description": "Allows you to hide the lock and only show the Contact Sensor. Useful for locks that already support HomeKit.",
"type": "boolean",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].lockId);"
"functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].lockId && !model.options.devices[arrayIndices].hide_device);"
}
},
"hide_contactsensor": {
"title": "Hide Lock's Contact Sensor",
"type": "boolean",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].lockId);"
"functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].lockId && !model.options.devices[arrayIndices].hide_device);"
}
}
}
},
"overrideHomeKitEnabled": {
"title": "Override HomeKit Enabled",
"type": "boolean",
"description": "By default, devices tht are HomeKit enabled will be shown in HomeKit. If you want to override this, set this to true and the device will display in the Home app.",
"condition": {
"functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].lockId && !model.options.devices[arrayIndices].hide_device);"
}
},
"firmware": {
"title": "Firmware Override",
"type": "string",
"placeholder": "1.2.8",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].lockId);"
"functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].lockId && !model.options.devices[arrayIndices].hide_device);"
}
},
"refreshRate": {
Expand All @@ -274,6 +282,24 @@
"functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].lockId && !model.options.devices[arrayIndices].hide_device);"
}
},
"updateRate": {
"title": "Device Update Rate",
"type": "number",
"placeholder": 1,
"description": "Indicates the number of seconds between pushes to August API.",
"condition": {
"functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].lockId && !model.options.devices[arrayIndices].hide_device);"
}
},
"pushRate": {
"title": "Device Push Rate",
"type": "number",
"placeholder": 1,
"description": "Indicates the number of seconds between pushes to August API.",
"condition": {
"functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].lockId && !model.options.devices[arrayIndices].hide_device);"
}
},
"external": {
"title": "External Accessory",
"type": "boolean",
Expand Down Expand Up @@ -419,10 +445,20 @@
"options.devices[].configLockName",
"options.devices[].lockId",
"options.devices[].hide_device",
"options.devices[].overrideHomeKitEnabled",
"options.devices[].lock.hide_lock",
"options.devices[].lock.hide_contactsensor",
"options.devices[].firmware",
{
"key": "options.devices[].refreshRate",
"description": "<em class='primary-text'>Specifies the interval, in seconds, for retrieving the latest device status from the August API. This interval applies only to this specific device. Set to </em>0<em class='primary-text'> if you would like to just receive updates from the August API</em>"
},
{
"key": "options.devices[].pushRate",
"description": "<em class='primary-text'>Specifies the interval, in seconds, between pushes to the August API for this specific device.</em>"
},
"options.devices[].refreshRate",
"options.devices[].pushRate",
"options.devices[].external",
"options.devices[].logging"
]
Expand All @@ -435,21 +471,13 @@
"expandable": true,
"expanded": false,
"items": [
{
"type": "help",
"helpvalue": "<h5>Refresh Rate</h5><em class='primary-text'>Refresh Rate indicates the number of seconds between polls of August API.</em>"
},
{
"key": "options.refreshRate",
"notitle": true
},
{
"type": "help",
"helpvalue": "<h5>Push Rate</h5><em class='primary-text'>Push Rate indicates the number of seconds between pushes to August API.</em>"
"description": "<em class='primary-text'>Specifies the interval, in seconds, for retrieving the latest device status from the August API.</em>"
},
{
"key": "options.pushRate",
"notitle": true
"description": "<em class='primary-text'>Specifies the interval, in seconds, between pushes to the August API.</em>"
},
"options.logging"
]
Expand Down
96 changes: 96 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
import pluginJs from '@eslint/js';
import tseslint from 'typescript-eslint';
import stylistic from '@stylistic/eslint-plugin'


export default tseslint.config({
plugins: {
'@stylistic': stylistic,
'@typescript-eslint': tseslint.plugin,
},
languageOptions: {
parser: tseslint.parser,
parserOptions: {
project: true,
},
},
files: ['**/*.ts'],
ignores: ['.dist/*'],
extends: [
pluginJs.configs.recommended,
...tseslint.configs.recommended,
],
rules: {
'@typescript-eslint/array-type': 'error',
'@typescript-eslint/consistent-type-imports': 'error',
'@stylistic/type-annotation-spacing': 'error',
'@stylistic/quotes': [
'warn',
'single',
],
'@stylistic/indent': [
'warn',
2,
{
'SwitchCase': 1,
},
],
'@stylistic/linebreak-style': [
'warn',
'unix',
],
'@stylistic/semi': [
'warn',
'always',
],
'@stylistic/comma-dangle': [
'warn',
'always-multiline',
],
'@stylistic/dot-notation': 'off',
'eqeqeq': 'warn',
'curly': [
'warn',
'all',
],
'@stylistic/brace-style': [
'warn',
],
'prefer-arrow-callback': [
'warn',
],
'@stylistic/max-len': [
'warn',
150,
],
'no-console': [
'warn',
], // use the provided Homebridge log method instead
'no-non-null-assertion': [
'off',
],
'@stylistic/comma-spacing': [
'error',
],
'@stylistic/no-multi-spaces': [
'warn',
{
'ignoreEOLComments': true,
},
],
'@stylistic/no-trailing-spaces': [
'warn',
],
'@stylistic/lines-between-class-members': [
'warn',
'always',
{
'exceptAfterSingleLine': true,
},
],
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
},
});
Loading
Loading