Repository navigation
Add Copeland Sensi Lite ST25Z Z-Wave thermostat driver #3309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
SushantShidore-Copeland
wants to merge
2
commits into
SmartThingsCommunity:main
Choose a base branch
from
SushantShidore-Copeland:copeland/sensi-st25z-zwave
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,220
−0
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
45
drivers/Copeland/sensi-st25z-zwave/profiles/st25z-thermostat.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
27
drivers/Copeland/sensi-st25z-zwave/src/lazy_load_subdriver.lua
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this device battery powered or mains powered?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is battery powered.