home_assistant-generator 0.1.0.pre.alpha.pre.16 → 0.1.0.pre.alpha.pre.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/example_config.rb +22 -1
- data/lib/home_assistant/generator/plural.rb +8 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 806d1f9f109909a0d7286afa0069791c6c9bc3c1
|
4
|
+
data.tar.gz: fd89de7ce72f24750c376855e03a12db4c23de29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba29263376b1d1bd3362780c9c4b37f67f6bbb58eb2eacc2789ba94752abb7b4a7feedf7fc8864c68579bae7aed01816d76e31df476fd5643b5f286b8122a803
|
7
|
+
data.tar.gz: 4c413de923dca17398ea28231d974d5bd488c1691d19a9b5c9acf901365dbfdb6e320295f1d2142e0af7f3a8f43d8168df4270d74d35e37627a53e068257aa83
|
data/example_config.rb
CHANGED
@@ -84,7 +84,7 @@ command_line__switch 'capodimonte_led' do
|
|
84
84
|
end
|
85
85
|
|
86
86
|
command_line__switch 'nzbget_pause' do
|
87
|
-
command_on <<~EOH.split("\n").join(
|
87
|
+
command_on <<~EOH.split("\n").join(' && ')
|
88
88
|
curl -XPOST capodimonte/nzbget/jsonrpc -d '{"method": "pausepost"}'
|
89
89
|
curl -XPOST capodimonte/nzbget/jsonrpc -d '{"method": "pausedownload"}'
|
90
90
|
EOH
|
@@ -92,6 +92,27 @@ command_line__switch 'nzbget_pause' do
|
|
92
92
|
command_state %(curl -s capodimonte/nzbget/jsonrpc -d '{"method": "status"}' |grep -q 'Paused" : true')
|
93
93
|
end
|
94
94
|
|
95
|
+
command_line__cover 'volets_salon' do
|
96
|
+
command_open %(curl -s http://192.168.0.20/up)
|
97
|
+
command_close %(curl -s http://192.168.0.20/down)
|
98
|
+
command_stop %(curl -s http://192.168.0.20/down) # can't do better for now
|
99
|
+
# since "volets" are disconnected very often, output of status pollutes the log TODO
|
100
|
+
# command_status %(curl -s http://192.168.0.20/status)
|
101
|
+
end
|
102
|
+
|
103
|
+
input_boolean do # TODO: improve this kind of declaration
|
104
|
+
light_control_by_kokodi(
|
105
|
+
name: 'Kokodi controle lumière du salon',
|
106
|
+
initial: 'on',
|
107
|
+
icon: 'mdi:toggle-switch'
|
108
|
+
)
|
109
|
+
end
|
110
|
+
|
111
|
+
shell_command do
|
112
|
+
classical_music_on_kodi '/var/lib/hass/play_random_classical_music_kodi.sh'
|
113
|
+
radio_swiss_classic '/var/lib/hass/play_radio_swiss_classic.sh'
|
114
|
+
end
|
115
|
+
|
95
116
|
automation 'Activate movie playing scene' do
|
96
117
|
# trigger.when('KoKodi').from(:paused).to(:playing)
|
97
118
|
|
@@ -36,12 +36,17 @@ module HomeAssistant
|
|
36
36
|
|
37
37
|
def to_h
|
38
38
|
plural = self.class.name.downcase.split('::').last.pluralize
|
39
|
-
|
39
|
+
if properties.key?(plural)
|
40
|
+
# support "dumb" syntax
|
41
|
+
{ 'platform' => @platform }.merge(super)
|
42
|
+
else
|
43
|
+
{ 'platform' => @platform, plural => { @element_name => super } }
|
44
|
+
end
|
40
45
|
end
|
41
46
|
end
|
42
47
|
class DSL
|
43
|
-
class Switch < PluralComponent
|
44
|
-
end
|
48
|
+
class Switch < PluralComponent; end
|
49
|
+
class Cover < PluralComponent; end
|
45
50
|
end
|
46
51
|
end
|
47
52
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: home_assistant-generator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.pre.alpha.pre.
|
4
|
+
version: 0.1.0.pre.alpha.pre.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Grégoire Seux
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|