Skip to content

Commit

Permalink
v2.0.0 (#474)
Browse files Browse the repository at this point in the history
## [Version 2.0.0](https://github.com/OpenWonderLabs/homebridge-switchbot/releases/tag/v2.0.0) (2022-10-12)

## What's Changed

- Moved from v1.0 to v1.1 of [OpenAPI](https://github.com/OpenWonderLabs/SwitchBotAPI)
- Publish device(s) as an external accessory.
- Added `connectionType` config, this replaces the `BLE` config.
  - You can now select Both Connections, Only OpenAPI, Only BLE, or Disable.
    - `Both` will use BLE as the default connection and will use OpenAPI as a backup connection.
    - `OpenAPI` will only allow connections through the OpenAPI.
    - `BLE` will only allow connections through Bluetooth (BLE), .
    - `Disable` will disable all connections. This will also allow you to disable commands and refreshes for a specific device but leave it in HomeKit.
- Added Support for Ceiling Light & Ceiling Light Pro
- Fixes Smart Lock Issues fixed in v1.1 of OpenAPI. [#462](#462)
= Fixes excesive logging from node-switchbot. [#435](#435), [#444](#444), [#446](#446) 
- Housekeeping and updated dependencies.

**Full Changelog**: v1.15.0...v2.0.0
  • Loading branch information
donavanbecker committed Oct 12, 2022
1 parent 366349f commit 20811cf
Show file tree
Hide file tree
Showing 47 changed files with 9,958 additions and 5,934 deletions.
Binary file modified .github/.DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ assignees:
- SwitchBot-Wonderlabs
- Minsheng
- Devin-Wonderlabs
- chenliuyun
body:
- type: markdown
attributes:
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ assignees:
- SwitchBot-Wonderlabs
- Minsheng
- Devin-Wonderlabs
- chenliuyun
body:
- type: markdown
attributes:
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/support-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ assignees:
- SwitchBot-Wonderlabs
- Minsheng
- Devin-Wonderlabs
- chenliuyun
body:
- type: markdown
attributes:
Expand Down
Binary file added .github/Old Releaser.zip
Binary file not shown.
13 changes: 0 additions & 13 deletions .github/labeler.yml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/beta-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Node-CI Beta

on:
push:
branches: [beta-*.*.*, beta]
workflow_dispatch:

jobs:
build_and_test:
uses: OpenWonderLabs/.github/.github/workflows/nodejs-build-and-test.yml@latest
with:
enable_coverage: true
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
lint:
needs: build_and_test
uses: OpenWonderLabs/.github/.github/workflows/eslint.yml@latest

publish:
needs: lint

if: ${{ github.repository == 'OpenWonderLabs/homebridge-switchbot' }}

uses: OpenWonderLabs/.github/.github/workflows/npm-publish.yml@latest
with:
tag: 'beta'
dynamically_adjust_version: true
npm_version_command: 'pre'
pre_id: 'beta'
secrets:
npm_auth_token: ${{ secrets.npm_token }}
18 changes: 18 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Node Build

on:
push:
branches: [latest]
pull_request:
workflow_dispatch:

jobs:
build_and_test:
uses: OpenWonderLabs/.github/.github/workflows/nodejs-build-and-test.yml@latest
with:
enable_coverage: true
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
lint:
needs: build_and_test
uses: OpenWonderLabs/.github/.github/workflows/eslint.yml@latest
68 changes: 5 additions & 63 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,71 +1,13 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: 'CodeQL'
name: "CodeQL"

on:
push:
branches: [beta]
branches: [ latest, beta* ]
pull_request:
# The branches below must be a subset of the branches above
branches: [beta]
branches: [ latest, beta* ]
schedule:
- cron: '39 20 * * 5'
- cron: '17 9 * * 2'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: ['javascript']
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: OpenWonderLabs/.github/.github/workflows/codeql-analysis.yml@latest
12 changes: 5 additions & 7 deletions .github/workflows/label.yml → .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@
#
# To use this workflow, you will need to set up a .github/labeler.yml
# file with configuration. For more information, see:
# https://github.com/actions/labeler/blob/master/README.md
# https://github.com/actions/labeler/blob/main/README.md

name: Labeler

on: [pull_request]

jobs:
label:
runs-on: ubuntu-latest

steps:
- uses: actions/labeler@v4
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
uses: OpenWonderLabs/.github/.github/workflows/labeler.yml@latest
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
42 changes: 0 additions & 42 deletions .github/workflows/nodejs-beta.yml

This file was deleted.

47 changes: 0 additions & 47 deletions .github/workflows/nodejs.yml

This file was deleted.

34 changes: 0 additions & 34 deletions .github/workflows/prerelease-beta.js

This file was deleted.

14 changes: 14 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Release Drafter

on:
push:
branches: [latest]
pull_request: # required for autolabeler
types: [opened, reopened, synchronize]
workflow_dispatch:

jobs:
stale:
uses: OpenWonderLabs/.github/.github/workflows/release-drafter.yml@latest
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
24 changes: 24 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Node Release

on:
push:
tags:
- 'v*.*.*'
workflow_dispatch:

jobs:
build_and_test:
uses: OpenWonderLabs/.github/.github/workflows/nodejs-build-and-test.yml@latest
with:
enable_coverage: true
secrets:
token: ${{ secrets.GITHUB_TOKEN }}

publish:
needs: build_and_test

if: ${{ github.repository == 'OpenWonderLabs/homebridge-switchbot' }}

uses: OpenWonderLabs/.github/.github/workflows/npm-publish.yml@latest
secrets:
npm_auth_token: ${{ secrets.npm_token }}
28 changes: 6 additions & 22 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,12 @@
name: Stale
name: Stale workflow

on:
issues:
types: [reopened]
workflow_dispatch:
schedule:
- cron: '*/60 * * * *'
- cron: '45 11 * * *'

jobs:
stale:
runs-on: ubuntu-latest
env:
ACTIONS_STEP_DEBUG: true
steps:
- uses: actions/stale@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.'
stale-pr-message: 'This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.'
stale-issue-label: 'stale'
stale-pr-label: 'stale'
days-before-stale: 15
days-before-close: 2
exempt-issue-labels: 'pinned'
exempt-pr-labels: 'awaiting-approval,work-in-progress'
remove-stale-when-updated: true
close-issue-message: 'This issue has been automatically closed because it has not had recent activity. Thank you for your contributions.'
close-pr-message: 'This pull request has been automatically closed because it has not had recent activity. Thank you for your contributions.'
uses: OpenWonderLabs/.github/.github/workflows/stale.yml@latest
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
.DS_Store
src/.DS_Store
src/.DS_Store
examples
Loading

0 comments on commit 20811cf

Please sign in to comment.