-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #923 from tsightler/dev
Release v5.7.2
- Loading branch information
Showing
13 changed files
with
984 additions
and
599 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto | ||
*.sh text | ||
*.sh text eol=lf | ||
*.js text eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import RingSocketDevice from './base-socket-device.js' | ||
|
||
export default class PanicButton extends RingSocketDevice { | ||
constructor(deviceInfo) { | ||
super(deviceInfo, 'alarm') | ||
this.deviceData.mdl = 'Panic Button' | ||
|
||
|
||
// Listen to raw data updates for all devices and log any events | ||
this.device.location.onDataUpdate.subscribe(async (message) => { | ||
if (!this.isOnline()) { return } | ||
|
||
if (message.datatype === 'DeviceInfoDocType' && | ||
message.body?.[0]?.general?.v2?.zid === this.deviceId | ||
) { | ||
this.debug(JSON.stringify(message), 'data') | ||
} | ||
}) | ||
|
||
} | ||
|
||
publishState() { | ||
// This device only has attributes and attribute based entities | ||
this.publishAttributes() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.