Skip to content

Add IkeaLightBulbWhite device and improve motion automation dimming#85

Draft
JulianKahnert wants to merge 2 commits into
developfrom
feature/ikea-light-bulb-dimming-fix
Draft

Add IkeaLightBulbWhite device and improve motion automation dimming#85
JulianKahnert wants to merge 2 commits into
developfrom
feature/ikea-light-bulb-dimming-fix

Conversation

@JulianKahnert
Copy link
Copy Markdown
Owner

Summary

  • Add IkeaLightBulbWhite class that overrides turnOff() to use brightness control (set to 0) instead of power switch, fixing IKEA bulbs that don't turn off properly with standard turnOff call
  • Update MotionAtNight dimming logic to check brightnessId availability before attempting to set brightness to prevent errors with devices that don't support brightness control
  • Exclude Apps/**/.build directories from SwiftLint to avoid linting build artifacts

Changes

  • New File: Sources/HAModels/Entities/IkeaLightBulbWhite.swift - Custom device class for IKEA white light bulbs
  • Modified: Sources/HAImplementations/Automations/MotionAtNight.swift - Added brightnessId check in dimming guard statement
  • Modified: .swiftlint.yml - Added Apps/**/.build to exclusions

Test plan

  • Swift build passes without warnings
  • SwiftLint no longer processes build directories
  • Test IKEA light bulb turnOff behavior in runtime environment
  • Verify MotionAtNight automation dims lights correctly with devices that support brightness control
  • Verify MotionAtNight automation skips dimming for devices without brightness control

@JulianKahnert JulianKahnert marked this pull request as draft December 25, 2025 12:35
- Add IkeaLightBulbWhite class that overrides turnOff to use brightness control (set to 0) instead of power switch, fixing IKEA bulbs that don't turn off properly with standard turnOff
- Update MotionAtNight dimming logic to check brightnessId availability before attempting to set brightness
- Exclude Apps/**/.build directories from SwiftLint to avoid linting build artifacts
@JulianKahnert JulianKahnert force-pushed the feature/ikea-light-bulb-dimming-fix branch from 55b2757 to f3fdc57 Compare March 17, 2026 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant