mqtt-homeassistant 1.2.0 → 1.2.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bdcb88f89dd85120c87beb343b898f59666abeedd588a95fd8698c7001461a29
4
- data.tar.gz: 574647583b9f8f0ffc6554db90792e6f0f3da18060842d6142a960961b19c736
3
+ metadata.gz: a869ec87ef12734319533f54286227f9bccbcb0de615cb2151e20a273d2f1d66
4
+ data.tar.gz: 32809651e0064ba332aa399ee8c81ef644b7d8592849c07951a4097b21812dec
5
5
  SHA512:
6
- metadata.gz: d0fc4207342a16740ef2dc722aa6f6235191fbe50468940f982bb87bca27d376ba9c46ef2660bfbf806c99c42246cfdc2853b83cef89ebf5f65f00641bac4dde
7
- data.tar.gz: '09213fc37970dd8e73ea38cad82c551886e83f696c9ec3710a41c346d1c47ac75d454bc6c9b02f8375aaccead1513fe1dfd84eb23619a719c7b2c9b7e6603795'
6
+ metadata.gz: 1a022babd9c610c4d07c601082a4e8a8d5f81f00c45ae46a24dd431c2e2d6df5a233578a6cff46a8ae90aca897d4ee4e6922edfb45631515defe0fd72a94f15d
7
+ data.tar.gz: 28d55f06bdf24c307b4c94aeca15bff040dec588a74af020d0ee91fa0be93db2b7387929ee34ddcd1a5bb933098361a3e514b97156157b4dd080dc07cb3ea3e0
@@ -12,6 +12,8 @@ module MQTT
12
12
  module HomeAssistant
13
13
  module Client
14
14
  KNOWN_ATTRIBUTES.each_key do |platform|
15
+ next if platform == :device
16
+
15
17
  class_eval <<~RUBY, __FILE__, __LINE__ + 1
16
18
  def publish_hass_#{platform}(object_id, platform: #{platform.inspect}, **kwargs)
17
19
  raise ArgumentError, "platform must be #{platform.inspect}" unless platform == #{platform.inspect}
@@ -59,7 +61,7 @@ module MQTT
59
61
  end
60
62
  end
61
63
 
62
- hass_abbreviate(ABBREVIATIONS, kwargs)
64
+ kwargs = hass_abbreviate(ABBREVIATIONS, kwargs)
63
65
 
64
66
  if migrate_discovery
65
67
  kwargs[:cmps].each do |object_id, component|
@@ -143,7 +145,7 @@ module MQTT
143
145
  end
144
146
  end
145
147
 
146
- hass_abbreviate(ABBREVIATIONS, kwargs)
148
+ kwargs = hass_abbreviate(ABBREVIATIONS, kwargs)
147
149
  if @collected_hass_components
148
150
  kwargs[:p] = platform
149
151
  @collected_hass_components[object_id] = kwargs
@@ -232,12 +234,12 @@ module MQTT
232
234
  end
233
235
  end
234
236
 
235
- hass_abbreviate(abbreviations, config)
237
+ kwargs[special_type] = hass_abbreviate(abbreviations, config)
236
238
  end
237
239
  end
238
240
 
239
241
  def hass_abbreviate(abbreviations, kwargs)
240
- kwargs.transform_keys! { |key| abbreviations[key.to_s] || key }
242
+ kwargs.transform_keys { |key| abbreviations[key.to_s] || key }
241
243
  end
242
244
  end
243
245
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module MQTT
4
4
  module HomeAssistant
5
- VERSION = "1.2.0"
5
+ VERSION = "1.2.2"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,160 +1,167 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mqtt-homeassistant
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
- - Cody Cutrer
7
+ - Cody Cutrer
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-02-10 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
- - !ruby/object:Gem::Dependency
13
- name: json
14
- requirement: !ruby/object:Gem::Requirement
15
- requirements:
16
- - - "~>"
17
- - !ruby/object:Gem::Version
18
- version: '2.0'
19
- type: :runtime
20
- prerelease: false
21
- version_requirements: !ruby/object:Gem::Requirement
22
- requirements:
23
- - - "~>"
24
- - !ruby/object:Gem::Version
25
- version: '2.0'
26
- - !ruby/object:Gem::Dependency
27
- name: mqtt-ccutrer
28
- requirement: !ruby/object:Gem::Requirement
29
- requirements:
30
- - - "~>"
31
- - !ruby/object:Gem::Version
32
- version: '1.0'
33
- - - ">="
34
- - !ruby/object:Gem::Version
35
- version: 1.0.3
36
- type: :runtime
37
- prerelease: false
38
- version_requirements: !ruby/object:Gem::Requirement
39
- requirements:
40
- - - "~>"
41
- - !ruby/object:Gem::Version
42
- version: '1.0'
43
- - - ">="
44
- - !ruby/object:Gem::Version
45
- version: 1.0.3
12
+ - !ruby/object:Gem::Dependency
13
+ name: json
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ -
17
+ - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: "2.0"
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ -
25
+ - ~>
26
+ - !ruby/object:Gem::Version
27
+ version: "2.0"
28
+ - !ruby/object:Gem::Dependency
29
+ name: mqtt-ccutrer
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ -
33
+ - ~>
34
+ - !ruby/object:Gem::Version
35
+ version: "1.0"
36
+ -
37
+ - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: 1.0.3
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ -
45
+ - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: "1.0"
48
+ -
49
+ - ">="
50
+ - !ruby/object:Gem::Version
51
+ version: 1.0.3
46
52
  email: cody@cutrer.com'
47
53
  executables: []
48
54
  extensions: []
49
55
  extra_rdoc_files: []
50
56
  files:
51
- - lib/home_assistant/mqtt/discovery.rb
52
- - lib/mqtt-homeassistant.rb
53
- - lib/mqtt/home_assistant.rb
54
- - lib/mqtt/home_assistant/client.rb
55
- - lib/mqtt/home_assistant/version.rb
56
- - python/homeassistant/components/alarm_control_panel/__init__.py
57
- - python/homeassistant/components/alarm_control_panel/const.py
58
- - python/homeassistant/components/binary_sensor/__init__.py
59
- - python/homeassistant/components/button/__init__.py
60
- - python/homeassistant/components/climate/__init__.py
61
- - python/homeassistant/components/climate/const.py
62
- - python/homeassistant/components/cover/__init__.py
63
- - python/homeassistant/components/device_tracker/__init__.py
64
- - python/homeassistant/components/device_tracker/const.py
65
- - python/homeassistant/components/event/__init__.py
66
- - python/homeassistant/components/humidifier/__init__.py
67
- - python/homeassistant/components/humidifier/const.py
68
- - python/homeassistant/components/light/__init__.py
69
- - python/homeassistant/components/light/const.py
70
- - python/homeassistant/components/mqtt/abbreviations.py
71
- - python/homeassistant/components/mqtt/alarm_control_panel.py
72
- - python/homeassistant/components/mqtt/binary_sensor.py
73
- - python/homeassistant/components/mqtt/button.py
74
- - python/homeassistant/components/mqtt/camera.py
75
- - python/homeassistant/components/mqtt/climate.py
76
- - python/homeassistant/components/mqtt/config.py
77
- - python/homeassistant/components/mqtt/const.py
78
- - python/homeassistant/components/mqtt/cover.py
79
- - python/homeassistant/components/mqtt/device_tracker.py
80
- - python/homeassistant/components/mqtt/device_trigger.py
81
- - python/homeassistant/components/mqtt/discovery.py
82
- - python/homeassistant/components/mqtt/event.py
83
- - python/homeassistant/components/mqtt/fan.py
84
- - python/homeassistant/components/mqtt/humidifier.py
85
- - python/homeassistant/components/mqtt/image.py
86
- - python/homeassistant/components/mqtt/lawn_mower.py
87
- - python/homeassistant/components/mqtt/light/__init__.py
88
- - python/homeassistant/components/mqtt/light/schema.py
89
- - python/homeassistant/components/mqtt/light/schema_basic.py
90
- - python/homeassistant/components/mqtt/light/schema_json.py
91
- - python/homeassistant/components/mqtt/light/schema_template.py
92
- - python/homeassistant/components/mqtt/lock.py
93
- - python/homeassistant/components/mqtt/models.py
94
- - python/homeassistant/components/mqtt/notify.py
95
- - python/homeassistant/components/mqtt/number.py
96
- - python/homeassistant/components/mqtt/scene.py
97
- - python/homeassistant/components/mqtt/schemas.py
98
- - python/homeassistant/components/mqtt/select.py
99
- - python/homeassistant/components/mqtt/sensor.py
100
- - python/homeassistant/components/mqtt/siren.py
101
- - python/homeassistant/components/mqtt/switch.py
102
- - python/homeassistant/components/mqtt/tag.py
103
- - python/homeassistant/components/mqtt/text.py
104
- - python/homeassistant/components/mqtt/update.py
105
- - python/homeassistant/components/mqtt/util.py
106
- - python/homeassistant/components/mqtt/vacuum.py
107
- - python/homeassistant/components/mqtt/valve.py
108
- - python/homeassistant/components/mqtt/water_heater.py
109
- - python/homeassistant/components/number/__init__.py
110
- - python/homeassistant/components/number/const.py
111
- - python/homeassistant/components/sensor/__init__.py
112
- - python/homeassistant/components/sensor/const.py
113
- - python/homeassistant/components/switch/__init__.py
114
- - python/homeassistant/components/text/__init__.py
115
- - python/homeassistant/components/update/__init__.py
116
- - python/homeassistant/components/vacuum/__init__.py
117
- - python/homeassistant/components/valve/__init__.py
118
- - python/homeassistant/components/valve/const.py
119
- - python/homeassistant/components/water_heater/__init__.py
120
- - python/homeassistant/const.py
121
- - python/homeassistant/exceptions.py
122
- - python/homeassistant/generated/entity_platforms.py
123
- - python/homeassistant/helpers/config_validation.py
124
- - python/homeassistant/helpers/entity.py
125
- - python/homeassistant/helpers/frame.py
126
- - python/homeassistant/helpers/service_info/mqtt.py
127
- - python/homeassistant/helpers/template/__init__.py
128
- - python/homeassistant/helpers/template/extensions/__init__.py
129
- - python/homeassistant/helpers/template/extensions/base.py
130
- - python/homeassistant/helpers/template/extensions/base64.py
131
- - python/homeassistant/helpers/template/extensions/crypto.py
132
- - python/homeassistant/helpers/typing.py
133
- - python/homeassistant/util/__init__.py
134
- - python/homeassistant/util/dt.py
135
- - python/homeassistant/util/json.py
136
- - python/homeassistant/util/yaml/objects.py
137
- homepage: https://github.com/ccutrer/ruby-mqtt-homeassistant
57
+ - lib/home_assistant/mqtt/discovery.rb
58
+ - lib/mqtt-homeassistant.rb
59
+ - lib/mqtt/home_assistant.rb
60
+ - lib/mqtt/home_assistant/client.rb
61
+ - lib/mqtt/home_assistant/version.rb
62
+ - python/homeassistant/components/alarm_control_panel/__init__.py
63
+ - python/homeassistant/components/alarm_control_panel/const.py
64
+ - python/homeassistant/components/binary_sensor/__init__.py
65
+ - python/homeassistant/components/button/__init__.py
66
+ - python/homeassistant/components/climate/__init__.py
67
+ - python/homeassistant/components/climate/const.py
68
+ - python/homeassistant/components/cover/__init__.py
69
+ - python/homeassistant/components/device_tracker/__init__.py
70
+ - python/homeassistant/components/device_tracker/const.py
71
+ - python/homeassistant/components/event/__init__.py
72
+ - python/homeassistant/components/humidifier/__init__.py
73
+ - python/homeassistant/components/humidifier/const.py
74
+ - python/homeassistant/components/light/__init__.py
75
+ - python/homeassistant/components/light/const.py
76
+ - python/homeassistant/components/mqtt/abbreviations.py
77
+ - python/homeassistant/components/mqtt/alarm_control_panel.py
78
+ - python/homeassistant/components/mqtt/binary_sensor.py
79
+ - python/homeassistant/components/mqtt/button.py
80
+ - python/homeassistant/components/mqtt/camera.py
81
+ - python/homeassistant/components/mqtt/climate.py
82
+ - python/homeassistant/components/mqtt/config.py
83
+ - python/homeassistant/components/mqtt/const.py
84
+ - python/homeassistant/components/mqtt/cover.py
85
+ - python/homeassistant/components/mqtt/device_tracker.py
86
+ - python/homeassistant/components/mqtt/device_trigger.py
87
+ - python/homeassistant/components/mqtt/discovery.py
88
+ - python/homeassistant/components/mqtt/event.py
89
+ - python/homeassistant/components/mqtt/fan.py
90
+ - python/homeassistant/components/mqtt/humidifier.py
91
+ - python/homeassistant/components/mqtt/image.py
92
+ - python/homeassistant/components/mqtt/lawn_mower.py
93
+ - python/homeassistant/components/mqtt/light/__init__.py
94
+ - python/homeassistant/components/mqtt/light/schema.py
95
+ - python/homeassistant/components/mqtt/light/schema_basic.py
96
+ - python/homeassistant/components/mqtt/light/schema_json.py
97
+ - python/homeassistant/components/mqtt/light/schema_template.py
98
+ - python/homeassistant/components/mqtt/lock.py
99
+ - python/homeassistant/components/mqtt/models.py
100
+ - python/homeassistant/components/mqtt/notify.py
101
+ - python/homeassistant/components/mqtt/number.py
102
+ - python/homeassistant/components/mqtt/scene.py
103
+ - python/homeassistant/components/mqtt/schemas.py
104
+ - python/homeassistant/components/mqtt/select.py
105
+ - python/homeassistant/components/mqtt/sensor.py
106
+ - python/homeassistant/components/mqtt/siren.py
107
+ - python/homeassistant/components/mqtt/switch.py
108
+ - python/homeassistant/components/mqtt/tag.py
109
+ - python/homeassistant/components/mqtt/text.py
110
+ - python/homeassistant/components/mqtt/update.py
111
+ - python/homeassistant/components/mqtt/util.py
112
+ - python/homeassistant/components/mqtt/vacuum.py
113
+ - python/homeassistant/components/mqtt/valve.py
114
+ - python/homeassistant/components/mqtt/water_heater.py
115
+ - python/homeassistant/components/number/__init__.py
116
+ - python/homeassistant/components/number/const.py
117
+ - python/homeassistant/components/sensor/__init__.py
118
+ - python/homeassistant/components/sensor/const.py
119
+ - python/homeassistant/components/switch/__init__.py
120
+ - python/homeassistant/components/text/__init__.py
121
+ - python/homeassistant/components/update/__init__.py
122
+ - python/homeassistant/components/vacuum/__init__.py
123
+ - python/homeassistant/components/valve/__init__.py
124
+ - python/homeassistant/components/valve/const.py
125
+ - python/homeassistant/components/water_heater/__init__.py
126
+ - python/homeassistant/const.py
127
+ - python/homeassistant/exceptions.py
128
+ - python/homeassistant/generated/entity_platforms.py
129
+ - python/homeassistant/helpers/config_validation.py
130
+ - python/homeassistant/helpers/entity.py
131
+ - python/homeassistant/helpers/frame.py
132
+ - python/homeassistant/helpers/service_info/mqtt.py
133
+ - python/homeassistant/helpers/template/__init__.py
134
+ - python/homeassistant/helpers/template/extensions/__init__.py
135
+ - python/homeassistant/helpers/template/extensions/base.py
136
+ - python/homeassistant/helpers/template/extensions/base64.py
137
+ - python/homeassistant/helpers/template/extensions/crypto.py
138
+ - python/homeassistant/helpers/typing.py
139
+ - python/homeassistant/util/__init__.py
140
+ - python/homeassistant/util/dt.py
141
+ - python/homeassistant/util/json.py
142
+ - python/homeassistant/util/yaml/objects.py
143
+ homepage: "https://github.com/ccutrer/ruby-mqtt-homeassistant"
138
144
  licenses:
139
- - MIT
145
+ - MIT
140
146
  metadata:
141
- rubygems_mfa_required: 'true'
147
+ rubygems_mfa_required: "true"
142
148
  rdoc_options: []
143
149
  require_paths:
144
- - lib
150
+ - lib
145
151
  required_ruby_version: !ruby/object:Gem::Requirement
146
152
  requirements:
147
- - - ">="
148
- - !ruby/object:Gem::Version
149
- version: '3.2'
153
+ -
154
+ - ">="
155
+ - !ruby/object:Gem::Version
156
+ version: "3.2"
150
157
  required_rubygems_version: !ruby/object:Gem::Requirement
151
158
  requirements:
152
- - - ">="
153
- - !ruby/object:Gem::Version
154
- version: '0'
159
+ -
160
+ - ">="
161
+ - !ruby/object:Gem::Version
162
+ version: "0"
155
163
  requirements: []
156
- rubygems_version: 3.6.3
164
+ rubygems_version: 4.1.0
157
165
  specification_version: 4
158
- summary: Library for publishing device auto-discovery configuration for Home Assistant
159
- via MQTT.
166
+ summary: Library for publishing device auto-discovery configuration for Home Assistant via MQTT.
160
167
  test_files: []