huginn_myq_agent 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/huginn_myq_agent/myq_agent.rb +11 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6bbf489c3434fd3286bde5562929e44a20aff6ccbeca10099f266cb964d5178b
|
4
|
+
data.tar.gz: f9e0fbc594620f534e78db5bbc08dc177b96dfa820a2280fd82665685913d430
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03c520d7611d3b4a663c6ff45d9b5822aa0d0c4ed931a505c23476b04d9a6fe0bc37f59229bb289cfc4c9be06cea696743b35aff4b84d4ccd04f9b0bee5cc8e0
|
7
|
+
data.tar.gz: d9b0a0e2f5f9320a40769eee3bfbb33283a049c1a4d03e98d3aa7a87b22882963ad277a2e308582489d0956f0976819d68819543bf06454cc353e2694cd99c0a
|
@@ -14,14 +14,12 @@ module Agents
|
|
14
14
|
{
|
15
15
|
'email_address' => '',
|
16
16
|
'password' => '',
|
17
|
-
'door_name' => '',
|
18
|
-
'action' => ''
|
19
17
|
}
|
20
18
|
end
|
21
19
|
|
22
|
-
form_configurable :email_address
|
23
|
-
form_configurable :password
|
24
|
-
form_configurable :door_name,
|
20
|
+
form_configurable :email_address
|
21
|
+
form_configurable :password
|
22
|
+
form_configurable :door_name, roles: :completable
|
25
23
|
form_configurable :action, type: :array, values: ['status', 'open', 'close', 'toggle']
|
26
24
|
|
27
25
|
def validate_options
|
@@ -47,13 +45,13 @@ module Agents
|
|
47
45
|
def check
|
48
46
|
door = select_door(interpolated['door_name'])
|
49
47
|
if interpolated['action'] == 'status'
|
50
|
-
create_event :payload => status(door)
|
48
|
+
create_event :payload => status(door.name)
|
51
49
|
elsif interpolated['action'] == 'open'
|
52
50
|
open_door(door)
|
53
|
-
create_event :payload => status(door)
|
51
|
+
create_event :payload => status(door.name)
|
54
52
|
elsif interpolated['action'] == 'close'
|
55
53
|
close(door)
|
56
|
-
create_event :payload => status(door)
|
54
|
+
create_event :payload => status(door.name)
|
57
55
|
end
|
58
56
|
end
|
59
57
|
|
@@ -94,6 +92,11 @@ module Agents
|
|
94
92
|
end
|
95
93
|
end
|
96
94
|
|
95
|
+
def complete_door_name
|
96
|
+
system = create_system
|
97
|
+
system.garage_doors.map { |door| door.name }
|
98
|
+
end
|
99
|
+
|
97
100
|
|
98
101
|
|
99
102
|
# def receive(incoming_events)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: huginn_myq_agent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jesse Gillies
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-11-
|
11
|
+
date: 2020-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|