mqtt-homie-homeassistant 1.0.2 → 1.0.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8842ce29f5653c9da5d4263b31c9c0286952e3856c857dd5563c8597d93f5778
|
4
|
+
data.tar.gz: e56288d06b28f1b570aeeafb3baf3ff33ef1a103047aa2c88f83e4370d9b4e10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b62f87dfddd9bbbe18411e3c2e4a296ac4eda608412d0cd45ec36391196e48942a300e4d0bfa9cbfe317440a07f72b7f0509237c86ecabf6b55b6e5cb7510e5d
|
7
|
+
data.tar.gz: 81aef145772f141124f095d975cf13ddcde1a335f5b386e00798e6730db704cf779325ddd829799f8b3655083bbc2b4417ae48a04b83d0f6f73a192b65e28887
|
@@ -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"
|
@@ -32,6 +32,11 @@ module MQTT
|
|
32
32
|
**kwargs)
|
33
33
|
end
|
34
34
|
|
35
|
+
def hass_button(**kwargs)
|
36
|
+
hass_property(kwargs)
|
37
|
+
publish_hass_component(platform: :button, **kwargs)
|
38
|
+
end
|
39
|
+
|
35
40
|
def hass_fan(**kwargs)
|
36
41
|
raise ArgumentError, "Property must be a boolean" unless datatype == :boolean
|
37
42
|
raise ArgumentError, "Property must be settable" unless settable?
|
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.
|
4
|
+
version: 1.0.4
|
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-
|
11
|
+
date: 2025-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: homie-mqtt
|