-
Notifications
You must be signed in to change notification settings - Fork 506
Add shelly wave motion driver #2381
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
base: main
Are you sure you want to change the base?
Conversation
drivers/SmartThings/zwave-sensor/profiles/shelly-wave-motion.yml
Outdated
Show resolved
Hide resolved
local function notification_report_handler(self, device, cmd) | ||
local event | ||
if cmd.args.notification_type == Notification.notification_type.HOME_SECURITY then | ||
if cmd.args.event == Notification.event.home_security.STATE_IDLE then | ||
device:emit_event(capabilities.motionSensor.motion.inactive()) | ||
elseif cmd.args.event == Notification.event.home_security.MOTION_DETECTION then | ||
event = capabilities.motionSensor.motion.active() | ||
end | ||
end | ||
|
||
if event ~= nil then | ||
device:emit_event(event) | ||
end | ||
end | ||
|
||
local function sensor_multilevel_report_handler(self, device, cmd) | ||
if cmd.args.sensor_type == SensorMultilevel.sensor_type.LUMINANCE then | ||
device:emit_event(capabilities.illuminanceMeasurement.illuminance({value = cmd.args.sensor_value, unit = "lux"})) | ||
end | ||
end |
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.
I believe all of these are covered by our defaults and shouldn't have required any code changes, but you could use a test to verify.
Co-authored-by: Steven Green <[email protected]>
Duplicate profile check: Passed - no duplicate profiles detected. |
Invitation URL: |
Test Results 70 files 450 suites 0s ⏱️ For more details on these errors, see this check. Results for commit 85f2acf. |
Minimum allowed coverage is Generated by 🐒 cobertura-action against 85f2acf |
Check all that apply
Type of Change
Checklist
Description of Change
Summary of Completed Tests