Skip to content
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

Rolling up beta to production #1790

Merged
merged 14 commits into from
Dec 2, 2024
Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/create-channel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
head_ref: ${{ steps.head_ref.outputs.head_ref }}
steps:
- name: Download artifacts
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v6
with:
workflow: upload-driver-packages.yml
run_id: ${{ github.event.workflow_run.id }}
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:
driver: ${{ fromJSON(needs.download-artifacts.outputs.drivers) }}
steps:
- name: Download artifacts
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v6
with:
workflow: upload-driver-packages.yml
name: ${{ matrix.driver }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/duplicate-profiles-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download comment artifact
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v6
with:
workflow: duplicate-profiles.yml
run_id: ${{ github.event.workflow_run.id }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-test-results.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v6
with:
workflow: run-tests.yml
run_id: ${{ github.event.workflow_run.id }}
Expand Down
1 change: 1 addition & 0 deletions drivers/SmartThings/matter-switch/src/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ local device_type_attribute_map = {
}

local child_device_profile_overrides = {
{ vendor_id = 0x1321, product_id = 0x000C, child_profile = "switch-binary" },
{ vendor_id = 0x1321, product_id = 0x000D, child_profile = "switch-binary" },
}

Expand Down
5 changes: 5 additions & 0 deletions drivers/SmartThings/matter-window-covering/fingerprints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ matterManufacturer:
vendorId: 0x139C
productId: 0xFF15
deviceProfileName: window-covering
- id: "5020/64017"
deviceLabel: Zemismart ZM25C Smart Curtain
vendorId: 0x139C
productId: 0xFA11
deviceProfileName: window-covering
matterGeneric:
- id: "windowcovering"
deviceLabel: Matter Window Covering
Expand Down
20 changes: 19 additions & 1 deletion drivers/SmartThings/zigbee-dimmer-remote/src/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,20 @@
local capabilities = require "st.capabilities"
local ZigbeeDriver = require "st.zigbee"
local defaults = require "st.zigbee.defaults"
local zcl_clusters = require "st.zigbee.zcl.clusters"

local battery_attribute_configuration = {
cluster = zcl_clusters.PowerConfiguration.ID,
attribute = zcl_clusters.PowerConfiguration.attributes.BatteryPercentageRemaining.ID,
minimum_interval = 30,
maximum_interval = 14300, -- ~4hrs
data_type = zcl_clusters.PowerConfiguration.attributes.BatteryPercentageRemaining.base_type,
reportable_change = 1
}

local function device_init(driver, device)
device:add_configured_attribute(battery_attribute_configuration)
end

local zigbee_dimmer_remote_driver_template = {
supported_capabilities = {
Expand All @@ -23,7 +37,11 @@ local zigbee_dimmer_remote_driver_template = {
capabilities.switch,
capabilities.switchLevel
},
sub_drivers = { require("zigbee-accessory-dimmer"), require("zigbee-battery-accessory-dimmer")}
lifecycle_handlers = {
init = device_init,
},
sub_drivers = { require("zigbee-accessory-dimmer"), require("zigbee-battery-accessory-dimmer")},
health_check = false,
}

defaults.register_for_default_handlers(zigbee_dimmer_remote_driver_template, zigbee_dimmer_remote_driver_template.supported_capabilities)
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,24 @@ local is_centralite_systems = function(opts, driver, device)
return false
end

local voltage_configuration = {
cluster = zcl_clusters.PowerConfiguration.ID,
attribute = zcl_clusters.PowerConfiguration.attributes.BatteryVoltage.ID,
minimum_interval = 30,
maximum_interval = 14300,
data_type = zcl_clusters.PowerConfiguration.attributes.BatteryVoltage.base_type,
reportable_change = 1
}

local function device_init(driver, device)
device:add_configured_attribute(voltage_configuration)
device:add_monitored_attribute(voltage_configuration)
device:remove_monitored_attribute(zcl_clusters.PowerConfiguration.ID, zcl_clusters.PowerConfiguration.attributes.BatteryPercentageRemaining.ID)
device:remove_configured_attribute(zcl_clusters.PowerConfiguration.ID, zcl_clusters.PowerConfiguration.attributes.BatteryPercentageRemaining.ID)
device:set_field(battery_defaults.DEVICE_MIN_VOLTAGE_KEY, 2.3)
device:set_field(battery_defaults.DEVICE_MAX_VOLTAGE_KEY, 3.0)
end

local centralite_systems = {
NAME = "centralite systems",
zigbee_handlers = {
Expand All @@ -98,7 +116,7 @@ local centralite_systems = {
}
},
lifecycle_handlers = {
init = battery_defaults.build_linear_voltage_init(2.3, 3.0),
init = device_init,
doConfigure = do_configure
},
can_handle = is_centralite_systems
Expand Down
3 changes: 2 additions & 1 deletion drivers/SmartThings/zigbee-sound-sensor/src/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ local zigbee_sound_sensor_driver_template = {
added = added_handler,
doConfigure = do_configure,
init = battery_defaults.build_linear_voltage_init(2.2, 3.0)
}
},
health_check = false,
}

defaults.register_for_default_handlers(zigbee_sound_sensor_driver_template, zigbee_sound_sensor_driver_template.supported_capabilities)
Expand Down
80 changes: 80 additions & 0 deletions drivers/SmartThings/zigbee-valve/src/ezex/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
-- Copyright 2024 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 clusters = require "st.zigbee.zcl.clusters"
local capabilities = require "st.capabilities"

local IASZone = clusters.IASZone
local Basic = clusters.Basic
local OnOff = clusters.OnOff

local configuration = {
{
cluster = IASZone.ID,
attribute = IASZone.attributes.ZoneStatus.ID,
minimum_interval = 0,
maximum_interval = 3600,
data_type = IASZone.attributes.ZoneStatus.base_type,
reportable_change = 1
},
{
cluster = Basic.ID,
attribute = Basic.attributes.PowerSource.ID,
minimum_interval = 30,
maximum_interval = 21600,
data_type = Basic.attributes.PowerSource.base_type,
},
{
cluster = OnOff.ID,
attribute = OnOff.attributes.OnOff.ID,
minimum_interval = 0,
maximum_interval = 600,
data_type = OnOff.attributes.OnOff.base_type
}
}

local function ias_zone_status_attr_handler(driver, device, zone_status, zb_rx)
-- this is cribbed from the DTH
if zone_status:is_battery_low_set() then
device:emit_event(capabilities.battery.battery(5))
else
device:emit_event(capabilities.battery.battery(50))
end
end

local function device_init(driver, device)
for _, attribute in ipairs(configuration) do
device:add_configured_attribute(attribute)
device:add_monitored_attribute(attribute)
end
end

local ezex_valve = {
NAME = "Ezex Valve",
zigbee_handlers = {
attr = {
[IASZone.ID] = {
[IASZone.attributes.ZoneStatus.ID] = ias_zone_status_attr_handler
},
}
},
lifecycle_handlers = {
init = device_init
},
can_handle = function(opts, driver, device, ...)
return device:get_model() == "E253-KR0B0ZX-HA" and not device:supports_server_cluster(clusters.PowerConfiguration.ID)
end
}

return ezex_valve
3 changes: 2 additions & 1 deletion drivers/SmartThings/zigbee-valve/src/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ local zigbee_valve_driver_template = {
added = device_added
},
sub_drivers = {
require("sinope")
require("sinope"),
require("ezex")
}
}

Expand Down
Loading
Loading