homie-mqtt 1.6.0 → 1.6.1
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 +5 -1
- 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: d70ea4b44d22d3f2b5348e3e30b4ec4d624b0e3679f9f8da28813563a9296616
|
4
|
+
data.tar.gz: 1a7d48f60cc074d9f38a1190fd60e2a6df53f815ca733610ce32aef58c494a1e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0119a668ccb19e5568d52c8dad148f882a9a17b8913c6f523e5b84c32f738c87437e0d765d780e771bc0b477cbf4bc9287e3004f258185ee1e6b9595de3c1641'
|
7
|
+
data.tar.gz: 4be69c2086e1ad51e67972858a6f3d37a84b73ca247c2e37ae6a436934b87130499e04f9fd9e813f626f1a6e667c60e424c5360b45f18bc0b386717ea5738f69
|
data/lib/mqtt/homie/property.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "time"
|
4
|
+
|
3
5
|
module MQTT
|
4
6
|
module Homie
|
5
7
|
class Property < Base
|
@@ -158,7 +160,9 @@ module MQTT
|
|
158
160
|
end
|
159
161
|
end
|
160
162
|
case datatype
|
161
|
-
when :integer, :float
|
163
|
+
when :integer, :float
|
164
|
+
casted_value = nil if format && !range.cover?(casted_value)
|
165
|
+
when :enum
|
162
166
|
casted_value = nil if format && !range.include?(casted_value)
|
163
167
|
when :color
|
164
168
|
casted_value = nil if (format == "rgb" && value.max > 255) ||
|
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.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cody Cutrer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mqtt-ccutrer
|