homie-mqtt 1.2.1 → 1.2.2

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
  SHA256:
3
- metadata.gz: 92d413dfd5ecc9f6b6e5d672a9990cb9673b294439013e971ce338bb894444ef
4
- data.tar.gz: 5c67d8163c54926ede876caf75d6aa762a98f4377db5ba700954ba596d00d8ca
3
+ metadata.gz: 520ad8e14f8ce8df9fb824ef2cc3b65e1bef81e70d2b530bc5442732e627a913
4
+ data.tar.gz: 801041e538a20ce166eb0528d33cd8c77bb5567e0a7ecea57dba59a63a85bef5
5
5
  SHA512:
6
- metadata.gz: 1e37e57a63dd2797ae8d598716844105a060abf04dd04b79b23cbe8c880f67a40315b9e07d99feb7e9a5b874d376d4421620b02ab27b192c9105a4122fa011d7
7
- data.tar.gz: 5bbb25e06d7001c9e4fb54124e9fcb51b1e0eddd7b6161bfa655cf5c8bd17707cfe6bb8b6e16e82f3503a2581b3f13f0e3674a95b7ad402b7bbf4df6ce46712b
6
+ metadata.gz: efa3b6a779f9814ba7d9bade3bde3b3c65325630ec3e81cea5e1e023c338e105367d1f91b039bf9a43230a43bf6260352dfdf21833b6a3fa08c15e6a980e144b
7
+ data.tar.gz: '09c32c899c26b9ec86ed5022daff775a48aafaa4aa65e95e0a30f306e381dd3d6262b0b398c923d9a5c9b0a778dd42211b1e680cb004be4196160bdbf57f927e'
@@ -127,7 +127,7 @@ module MQTT
127
127
  mqtt.publish("#{topic}/$settable", "true", retain: true, qos: 1) if settable?
128
128
  mqtt.publish("#{topic}/$retained", "false", retain: true, qos: 1) unless retained?
129
129
  mqtt.publish("#{topic}/$unit", unit, retain: true, qos: 1) if unit
130
- mqtt.publish(topic, value.to_s, retain: retained?, qos: 1) if value
130
+ mqtt.publish(topic, value.to_s, retain: retained?, qos: 1) unless value.nil?
131
131
  subscribe
132
132
  end
133
133
 
@@ -149,7 +149,7 @@ module MQTT
149
149
  mqtt.publish("#{topic}/$retained", retain: true, qos: 0) unless retained?
150
150
  mqtt.publish("#{topic}/$unit", retain: true, qos: 0) if unit
151
151
  mqtt.unsubscribe("#{topic}/set") if settable?
152
- mqtt.publish(topic, retain: retained?, qos: 0) if value && retained?
152
+ mqtt.publish(topic, retain: retained?, qos: 0) if !value.nil? && retained?
153
153
  end
154
154
  end
155
155
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module MQTT
4
4
  module Homie
5
- VERSION = '1.2.1'
5
+ VERSION = '1.2.2'
6
6
  end
7
7
  end
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.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cody Cutrer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-25 00:00:00.000000000 Z
11
+ date: 2021-02-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mqtt-ccutrer