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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c2eb391bd803fa114fd12d0a348aa7ffa0890d5e
4
- data.tar.gz: 0e35575e164c6ea2159db9d2a3b10ff9dc0a73e7
3
+ metadata.gz: 806d1f9f109909a0d7286afa0069791c6c9bc3c1
4
+ data.tar.gz: fd89de7ce72f24750c376855e03a12db4c23de29
5
5
  SHA512:
6
- metadata.gz: afe65f955631ad4f44e223c3f9b8f9b1cd09e81ce3867fbd292d37bebb706540015ab90d0a4e4ec3b4b87350213f3814cd66e1592620645f011f15b674b12bf1
7
- data.tar.gz: b9e2903cf8154135b561d165e65fe9138549cb0ca3efb7012058da58bdf5993a53628a10a7556cc3473b642f30ae6511edc3f7e0825f7247c931b7f8d4a80aa7
6
+ metadata.gz: ba29263376b1d1bd3362780c9c4b37f67f6bbb58eb2eacc2789ba94752abb7b4a7feedf7fc8864c68579bae7aed01816d76e31df476fd5643b5f286b8122a803
7
+ data.tar.gz: 4c413de923dca17398ea28231d974d5bd488c1691d19a9b5c9acf901365dbfdb6e320295f1d2142e0af7f3a8f43d8168df4270d74d35e37627a53e068257aa83
@@ -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
- { 'platform' => @platform, plural => { @element_name => super } }
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.16
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-04 00:00:00.000000000 Z
11
+ date: 2017-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler