Skip to content

Conversation

@JulianKahnert
Copy link
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

- 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 marked this pull request as draft December 25, 2025 12:35
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.

2 participants