Skip to content

Commit 5f7e1b4

Browse files
authored
Merge pull request #128 from twrecked/print-version
Allow version to be printed
2 parents 20d6934 + 662ccb5 commit 5f7e1b4

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

changelog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
0.3.0a1: set up stream view programatically
22
add both locks and lights to the stream view
33
remove old configuration support
4+
print version out when requested
45
0.3.0a0: moved to HTMLElement
56
fixed lock/light in stream player
67
fixed bell2 display

dist/hass-aarlo.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
* @module Lovelace class for accessing Arlo camera through the AArlo
33
* module.
44
*
5-
* this._version = "0.3.0a1"
6-
*
75
* Startup Notes:
86
* - hass(); called at startup; set initial internal status and then updates
97
* image element data
@@ -106,6 +104,9 @@ class AarloGlance extends HTMLElement {
106104
constructor() {
107105
super();
108106

107+
// current version
108+
this._version = "0.3.0a1"
109+
109110
// State and config.
110111
this._ready = "stopped"
111112
this._hass = null;
@@ -1062,6 +1063,12 @@ class AarloGlance extends HTMLElement {
10621063
// Grab name if there
10631064
cc.name = _value( config.name, null )
10641065

1066+
// Get the version out.
1067+
if ("version" in config) {
1068+
this.throwError(`version: ${this._version}`)
1069+
return
1070+
}
1071+
10651072
// Save layout
10661073
cc.image_top = config.image_top
10671074
cc.image_bottom = config.image_bottom

0 commit comments

Comments
 (0)