homie-mqtt 1.6.2 → 1.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mqtt/homie/property.rb +3 -3
- data/lib/mqtt/homie/version.rb +1 -1
- 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: eb087a1fa491f77b56c7231be4578549e946f243546544d26eb02b729ff0f1e0
|
4
|
+
data.tar.gz: 21aeb256936a4425c10262bfbb695712708c607358391ff8c7cc886aa9d5cbbf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad9843d1d1d2210050dd0e1149bd77ac83213bab6916e168514f632c809f1609192d3d4091f5bac6f1801441d6ba7c95e129b33f6a9f6e32df310ce8e671d1e8
|
7
|
+
data.tar.gz: 933767440a03109805b509d9486a3b299c94b713652c4910310d02275a97309a764f98372dbbcd9c6d8c4be0ecd77f26a74161897e9861b2eb2dde145e0cc8d2
|
data/lib/mqtt/homie/property.rb
CHANGED
@@ -82,7 +82,7 @@ module MQTT
|
|
82
82
|
return if @value == value
|
83
83
|
|
84
84
|
@value = value if retained?
|
85
|
-
publish_value if published?
|
85
|
+
publish_value(value) if published?
|
86
86
|
end
|
87
87
|
|
88
88
|
def unit=(unit)
|
@@ -193,7 +193,7 @@ module MQTT
|
|
193
193
|
mqtt.publish("#{topic}/$settable", "true", retain: true, qos: 1) if settable?
|
194
194
|
mqtt.publish("#{topic}/$retained", "false", retain: true, qos: 1) unless retained?
|
195
195
|
mqtt.publish("#{topic}/$unit", unit, retain: true, qos: 1) if unit
|
196
|
-
publish_value unless value.nil?
|
196
|
+
publish_value(value) unless value.nil?
|
197
197
|
subscribe
|
198
198
|
end
|
199
199
|
|
@@ -221,7 +221,7 @@ module MQTT
|
|
221
221
|
|
222
222
|
private
|
223
223
|
|
224
|
-
def publish_value
|
224
|
+
def publish_value(value)
|
225
225
|
serialized = value
|
226
226
|
serialized = serialized&.iso8601 if %i[datetime duration].include?(datatype)
|
227
227
|
serialized = serialized.to_s
|
data/lib/mqtt/homie/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: homie-mqtt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cody Cutrer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mqtt-ccutrer
|