mqtt-homie-homeassistant 1.0.1 → 1.0.3

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: b06de01a752c24850d3b2279723225f3e79816fa575e83609f43bba664eba08b
4
- data.tar.gz: 51cc7361190ad340188861e2f5bc55bdf46795040743d91bba2c9f78c886a21c
3
+ metadata.gz: 91c3bd924cf85517b51fec348ae3737c007302e5085922e04e9762e939e3d222
4
+ data.tar.gz: 65894c4e7d2fcd0580d8af570747c9348c8c595465ee834856fa473e28d79ffb
5
5
  SHA512:
6
- metadata.gz: 132e07997fa6d96cdd7095441ed27d5dfbd27784a58518fa76c4823ef9a4ecc6d211b43171bac0ffe1c2789376273f513987c9119389ce5cf736f68a829fbeea
7
- data.tar.gz: 1240e6b353badac9b2a4ac5d236964f32a0e0179db6852cc86f63dee690fe96fbfd3dcd295eb514dac8b8e48aec63e3cef61012b5ea7016aa17ec4e0bb168d70
6
+ metadata.gz: e63fec2ec46a8fe17618a7a7042c22a69d992299d4c1b3ede6c927330a6b52ff4925b5fc5839232af2ff635372873bd65e9baf1aac2bafb54fd4ad7c3776d42b
7
+ data.tar.gz: 27641c17923bb8347e62c5f20b2aa86ae37919740662d57103516480a74521674120f8913e7539f77a0880c6a4d8e0cd56a28d258128c5b3ad69f842cfac1e6f
@@ -34,7 +34,7 @@ module MQTT
34
34
  max = temp_ranges.map(&:end).max
35
35
  kwargs[:temp_range] = min..max
36
36
  end
37
- kwargs[:temperature_unit] = temp_properties.map(&:unit).compact.first
37
+ kwargs[:temperature_unit] = temp_properties.map(&:unit).compact.first&.yield_self { |unit| unit[-1] }
38
38
  if power_property
39
39
  kwargs[:payload_off] = "false"
40
40
  kwargs[:payload_on] = "true"
@@ -133,7 +133,7 @@ module MQTT
133
133
  current_temperature_property
134
134
  ].compact
135
135
  kwargs[:range] = temperature_property&.range
136
- kwargs[:temperature_unit] = temp_properties.map(&:unit).compact.first
136
+ kwargs[:temperature_unit] = temp_properties.map(&:unit).compact.first&.yield_self { |unit| unit[-1] }
137
137
  if power_property
138
138
  kwargs[:payload_off] = "false"
139
139
  kwargs[:payload_on] = "true"
@@ -3,7 +3,7 @@
3
3
  module MQTT
4
4
  module Homie
5
5
  module HomeAssistant
6
- VERSION = "1.0.1"
6
+ VERSION = "1.0.3"
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mqtt-homie-homeassistant
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.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: 2025-01-03 00:00:00.000000000 Z
11
+ date: 2025-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: homie-mqtt
@@ -31,6 +31,9 @@ dependencies:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.0'
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: 1.0.2
34
37
  type: :runtime
35
38
  prerelease: false
36
39
  version_requirements: !ruby/object:Gem::Requirement
@@ -38,6 +41,9 @@ dependencies:
38
41
  - - "~>"
39
42
  - !ruby/object:Gem::Version
40
43
  version: '1.0'
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: 1.0.2
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: rake
43
49
  requirement: !ruby/object:Gem::Requirement