Skip to content

Commit

Permalink
v1.3 release
Browse files Browse the repository at this point in the history
  • Loading branch information
watou committed Aug 12, 2015
1 parent b78fcc4 commit 96d6e5a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/I_Ecobee1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ decompress_lzo_file() {
end

-- constants
local PLUGIN_VERSION = "1.2"
local PLUGIN_VERSION = "1.3"
local ECOBEE_SID = "urn:ecobee-com:serviceId:Ecobee1"
local TEMP_SENSOR_SID = "urn:upnp-org:serviceId:TemperatureSensor1"
local TEMP_SETPOINT_HEAT_SID = "urn:upnp-org:serviceId:TemperatureSetpoint1_Heat"
Expand Down Expand Up @@ -383,6 +383,8 @@ decompress_lzo_file() {

local ecobeeLog

local auth_token_failures = 0

local function loadSession()
local session = {}

Expand All @@ -399,6 +401,8 @@ decompress_lzo_file() {
session.auth_token = luup.variable_get(ECOBEE_SID, "auth_token", PARENT_DEVICE)
if session.auth_token == "" then session.auth_token = nil end

session.auth_token_failures = auth_token_failures

session.access_token = luup.variable_get(ECOBEE_SID, "access_token", PARENT_DEVICE)
if session.access_token == "" then session.access_token = nil end

Expand All @@ -419,6 +423,7 @@ decompress_lzo_file() {
end

writeVariableIfChanged(PARENT_DEVICE, ECOBEE_SID, "auth_token", session.auth_token or "")
auth_token_failures = session.auth_token_failures or 0
writeVariableIfChanged(PARENT_DEVICE, ECOBEE_SID, "access_token", session.access_token or "")
writeVariableIfChanged(PARENT_DEVICE, ECOBEE_SID, "token_type", session.token_type or "")
writeVariableIfChanged(PARENT_DEVICE, ECOBEE_SID, "refresh_token", session.refresh_token or "")
Expand Down
1 change: 1 addition & 0 deletions src/S_Ecobee1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<stateVariable>
<name>currentClimateRef</name>
<dataType>string</dataType>
<sendEventsAttribute>yes</sendEventsAttribute>
</stateVariable>
</serviceStateTable>
<actionList>
Expand Down

0 comments on commit 96d6e5a

Please sign in to comment.