No problems. Here are the appropriate sections of the files in case anyone can assist:
Homeassistant.rb:
#Update the weather ever so often
SCHEDULER.every '15m', :first_in => 0 do |job|
#Current weather
response = ha_api("states/sensor.dark_sky_temperature", "get")
temp = response["state"]
response = ha_api("states/sensor.dark_sky_humidity", "get")
humidity = response["state"]
response = ha_api("states/sensor.dark_sky_precip_probability", "get")
precip = response["state"]
response = ha_api("states/sensor.dark_sky_precip_intensity", "get")
precipintensity = response["state"]
response = ha_api("states/sensor.dark_sky_wind_speed", "get")
windspeed = response["state"]
response = ha_api("states/sensor.dark_sky_pressure", "get")
pressure = response["state"]
response = ha_api("states/sensor.dark_sky_wind_bearing", "get")
windbearing = response["state"]
response = ha_api("states/sensor.dark_sky_daily_high_temperature", "get")
tempmax = response["state"]
response = ha_api("states/sensor.dark_sky_daily_low_temperature", "get")
tempmin = response["state"]
response = ha_api("states/sensor.dark_sky_apparent_temperature", "get")
tempchill = response["state"]
response = ha_api("states/sensor.dark_sky_icon", "get")
icon = response["state"].gsub(/-/, '_')
#Emit the event
send_event('weather', {
temp: temp,
humidity: humidity,
icon: icon,
tempchill: tempchill,
precipintensity: precipintensity,
precip: precip,
windspeed: windspeed,
windbearing: windbearing,
pressure: pressure,
tempmax: tempmax,
tempmin: tempmin
})
Haweather.coffee:
class Dashing.Haweather extends Dashing.Widget
constructor: ->
super
@_icons =
rain: '',
snow: '',
sleet: '',
wind: '',
fog: '',
cloudy: '',
clear_day: '',
clear_night: '',
partly_cloudy_day: '',
partly_cloudy_night: ''
@accessor 'climacon', ->
new Batman.TerminalAccessible (attr) =>
@_icons[attr]
@accessor 'now_temp',
get: -> if @_temp then Math.floor(@_temp) else 0
set: (key, value) -> @_temp = value
ready: ->
if @get('bgcolor')
$(@node).css("background-color", @get('bgcolor'))
onData: (data) ->
Haweather.html:
<p class="secondary-info colored">Today's High/Low:</p>
<p class="secondary-info colored" data-bind="tempmax | append '°'"></p>
<p class="secondary-info colored">/</p>
<p class="secondary-info colored" data-bind="tempmin | append '°'"></p>
Anyone see anything that I have missed?