Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions drivers/Copeland/sensi-st25z-zwave/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: 'Sensi Lite Smart Thermostat Z-Wave'
packageKey: 'copeland-sensi-st25z-zwave'
permissions:
zwave: {}
description: "SmartThings driver for the Sensi Lite Smart Thermostat (Z-Wave), model 1F76U-22ZB"
vendorSupportInformation: "https://support.smartthings.com"
7 changes: 7 additions & 0 deletions drivers/Copeland/sensi-st25z-zwave/fingerprints.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
zwaveManufacturer:
- id: sensi-thermostat-zwave
deviceLabel: Sensi Lite Smart Thermostat Z-Wave
manufacturerId: 0x046B
productType: 0x0004
productId: 0x0002
deviceProfileName: thermostat-sensi-st25z
45 changes: 45 additions & 0 deletions drivers/Copeland/sensi-st25z-zwave/profiles/st25z-thermostat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: thermostat-sensi-st25z
components:
- id: main
capabilities:
- id: temperatureMeasurement
version: 1
- id: relativeHumidityMeasurement
version: 1
- id: thermostatHeatingSetpoint
version: 1
config:
values:
- key: "heatingSetpoint.value"
range: [ 6.99, 36.12 ]
step: 1
- id: thermostatCoolingSetpoint
version: 1
config:
values:
- key: "coolingSetpoint.value"
range: [ 8.33, 37.23 ]
step: 1
- id: thermostatMode
version: 1
- id: thermostatFanMode
version: 1
- id: thermostatOperatingState
version: 1
config:
values:
- key: "thermostatOperatingState.value"
enabledValues:
- heating
- cooling
- fan only
- idle
- pending heat
- pending cool
- vent economizer
- id: battery
version: 1
- id: refresh
version: 1
categories:
- name: Thermostat
65 changes: 65 additions & 0 deletions drivers/Copeland/sensi-st25z-zwave/src/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
-- Copyright 2022 SmartThings
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.

local capabilities = require "st.capabilities"
--- @type st.zwave.Driver
local ZwaveDriver = require "st.zwave.driver"
--- @type st.zwave.defaults
local defaults = require "st.zwave.defaults"
--- @type st.zwave.CommandClass
local cc = require "st.zwave.CommandClass"
--- @type st.zwave.CommandClass.ThermostatFanMode
local ThermostatFanMode = (require "st.zwave.CommandClass.ThermostatFanMode")({version=3})
--- @type st.zwave.CommandClass.ThermostatMode
local ThermostatMode = (require "st.zwave.CommandClass.ThermostatMode")({version=2})

local function device_added(driver, device)
if device:supports_capability_by_id(capabilities.thermostatMode.ID) and
device:is_cc_supported(cc.THERMOSTAT_MODE) then
device:send(ThermostatMode:SupportedGet({}))
end
if device:supports_capability_by_id(capabilities.thermostatFanMode.ID) and
device:is_cc_supported(cc.THERMOSTAT_FAN_MODE) then
device:send(ThermostatFanMode:SupportedGet({}))
end
device:refresh()
end

local driver_template = {
supported_capabilities = {
capabilities.temperatureAlarm,
capabilities.temperatureMeasurement,
capabilities.thermostatHeatingSetpoint,
capabilities.thermostatCoolingSetpoint,
capabilities.thermostatOperatingState,
capabilities.thermostatMode,
capabilities.thermostatFanMode,
capabilities.relativeHumidityMeasurement,
capabilities.battery,
capabilities.powerMeter,
capabilities.energyMeter
},
lifecycle_handlers = {
added = device_added
},
sub_drivers = require("sub_drivers")
}

defaults.register_for_default_handlers(
driver_template,
driver_template.supported_capabilities,
{ native_capability_attrs_enabled = true })
--- @type st.zwave.Driver
local thermostat = ZwaveDriver("zwave_thermostat", driver_template)
thermostat:run()
27 changes: 27 additions & 0 deletions drivers/Copeland/sensi-st25z-zwave/src/lazy_load_subdriver.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-- Copyright 2025 SmartThings, Inc.
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.

return function(sub_driver_name)
-- gets the current lua libs api version
local ZwaveDriver = require "st.zwave.driver"
local version = require "version"

if version.api >= 16 then
return ZwaveDriver.lazy_load_sub_driver_v2(sub_driver_name)
elseif version.api >= 9 then
return ZwaveDriver.lazy_load_sub_driver(require(sub_driver_name))
else
return require(sub_driver_name)
end
end
5 changes: 5 additions & 0 deletions drivers/Copeland/sensi-st25z-zwave/src/sub_drivers.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
local lazy_load_if_possible = require "lazy_load_subdriver"
local sub_drivers = {
lazy_load_if_possible("thermostat-sensi-st25z"),
}
return sub_drivers
Loading
Loading