Skip to content
Browse files

Updated plugin to read relative humidity as part of the status

  • Loading branch information...
1 parent 9ec54de commit d912f16edca8f21c407a269d0a3c62ac2909ea13 @chilitechno chilitechno committed Dec 4, 2011
Showing with 9 additions and 3 deletions.
  1. +4 −0 README.md
  2. +5 −3 lib/siriproxy-nestlearningthermostat.rb
View
4 README.md
@@ -7,6 +7,10 @@ This plugin requires a nest.com account and Nest hardware from http://www.nest.c
This plugin was adapted from SiriProxy-Thermostat plugin to call into nest.com.
+Important Note, this plugin is neither developed, nor endorsed by nest.com, do not contact them about problems or issues you encounter with this plugin.
+
+If you're having problems with the plugin, open an issue on github.
+
Config
------
Copy config-info.yml into ~/.siriproxy/config.yml and edit as appropriate.
View
8 lib/siriproxy-nestlearningthermostat.rb
@@ -86,7 +86,9 @@ def show_status_of_thermostat
current_temp = statusResult["shared"][device_serial_id]["current_temperature"]
target_temp = statusResult["shared"][device_serial_id]["target_temperature"]
- temperature_scale = statusResult["device"][device_serial_id]["temperature_scale"]
+
+ current_humidity = statusResult["device"][device_serial_id]["current_humidity"]
+ temperature_scale = statusResult["device"][device_serial_id]["temperature_scale"]
if temperature_scale == "F"
current_temp = (current_temp * 1.8) + 32
@@ -102,9 +104,9 @@ def show_status_of_thermostat
ttt_string = get_time_to_target(statusResult, device_serial_id)
if ttt_string
- say "The #{thermostat_name} Nest is currently set to #{target_temp}° and will reach it in " + ttt_string + ". The current temperature is #{current_temp}°" + temperature_scale + "."
+ say "The #{thermostat_name} Nest is currently set to #{target_temp}° and will reach it in " + ttt_string + ". The current temperature is #{current_temp}°" + temperature_scale + " and the relative humidity is #{current_humidity}%."
else
- say "The #{thermostat_name} Nest is currently set to #{target_temp}°. The current temperature is #{current_temp}°" + temperature_scale + "."
+ say "The #{thermostat_name} Nest is currently set to #{target_temp}°. The current temperature is #{current_temp}°" + temperature_scale + " and the relative humidity is #{current_humidity}%."
end
end
else

0 comments on commit d912f16

Please sign in to comment.
Something went wrong with that request. Please try again.