Skip to content

Commit

Permalink
Correction to Dev
Browse files Browse the repository at this point in the history
  • Loading branch information
jfarmer08 committed Jan 5, 2023
1 parent be3acfc commit b442adf
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 22 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/npm-publish Dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Node.js Package

on:
push:
branches:
- Dev

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm install

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- run: npm install
- run: npm publish --tag dev
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
# homebridge-wyze-smart-home
## Releases

### v0.5.25-dev.0
- Support for Thermostat
- Support for Wall Switch
- Support for HMS
### v0.5.25-beta.3
- Wall Switch Status update
- HMS
- Lock support is broken
### v0.5.25-beta.2
- Wall Switch was not status being followed
- Unable to turn Wall Switch On or Off.
- LOCK support is broken for this release
### v0.5.25-beta.1
- Wall Switch Support
- Lock changes - Reduce calls to wyze platform
- Major Changes to SDK
- Initial support for Thermostat in SDK
- Initial support for HMS in SDK.

### v0.5.24
- Release

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "homebridge-wyze-smart-home",
"version": "0.5.25-beta.4",
"version": "0.5.25-dev.0",
"description": "Wyze Smart Home plugin for Homebridge",
"license": "MIT",
"main": "src/index.js",
Expand Down
5 changes: 4 additions & 1 deletion src/WyzeSmartHome.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const WyzeMotionSensor = require('./accessories/WyzeMotionSensor')
const WyzeTemperatureHumidity = require('./accessories/WyzeTemperatureHumidity')
const WyzeLeakSensor = require('./accessories/WyzeLeakSensor')
const WyzeCamera = require('./accessories/WyzeCamera')
const WyzeSwitch = require('./accessories/WyzeSwitch')
const WyzeHMS = require('./accessories/WyzeHMS')
const WyzeThermostat = require('./accessories/WyzeThermostat')

Expand Down Expand Up @@ -52,7 +53,6 @@ module.exports = class WyzeSmartHome {

async runLoop() {
const interval = this.config.refreshInterval || DEFAULT_REFRESH_INTERVAL

// eslint-disable-next-line no-constant-condition
while (true) {
try {
Expand Down Expand Up @@ -153,6 +153,9 @@ module.exports = class WyzeSmartHome {
case 'Camera':
if (model === 'WYZEDB3') return
return WyzeCamera
case 'Common':
if (model === 'JA_HP') return
return WyzeSwitch
case 'S1Gateway':
return WyzeHMS
case 'Thermostat':
Expand Down
41 changes: 21 additions & 20 deletions src/accessories/WyzeAccessory.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,25 +294,25 @@ module.exports = class WyzeAccessory {
}
}
break
case "Thermostat":
this.homeKitAccessory.context = {
mac: device.mac,
product_type: device.product_type,
product_model: device.product_model,
nickname: device.nickname,
conn_state: device.conn_state,
push_switch: device.push_switch,
device_params: device.device_params = {
temperature: this.thermostatTemperature,
cool_sp: this.thermostatCoolSetpoint,
heat_sp: this.thermostatHeatSetpoint,
working_state: this.thermostatWorkingState,
temp_unit: this.thermostatTempUnit,
mode_sys: this.thermostatModeSys,
time2temp_val: this.thermostatTime2Temp
}
}
break
case "Thermostat":
this.homeKitAccessory.context = {
mac: device.mac,
product_type: device.product_type,
product_model: device.product_model,
nickname: device.nickname,
conn_state: device.conn_state,
push_switch: device.push_switch,
device_params: device.device_params = {
temperature: this.thermostatTemperature,
cool_sp: this.thermostatCoolSetpoint,
heat_sp: this.thermostatHeatSetpoint,
working_state: this.thermostatWorkingState,
temp_unit: this.thermostatTempUnit,
mode_sys: this.thermostatModeSys,
time2temp_val: this.thermostatTime2Temp
}
}
break
case "S1Gateway":
this.homeKitAccessory.context = {
mac: device.mac,
Expand All @@ -328,7 +328,8 @@ module.exports = class WyzeAccessory {
rssi: device.device_params.rssi,
hmsID: this.hmsHmsID,
hmsStatus: this.hmsStatus
}
}
}
break
default:
this.homeKitAccessory.context = {
Expand Down

0 comments on commit b442adf

Please sign in to comment.