Skip to content

Conversation

@nrbrt
Copy link

@nrbrt nrbrt commented Jan 13, 2026

Summary

IKEA MYGGSPRAY motion sensors (E2494) report as deviceType: "occupancySensor" instead of "motionSensor". They also lack the is_on attribute that regular motion sensors have.

This causes the sensors to not be detected by the integration.

Changes

  • Override get_motion_sensors() in HubX to include both motionSensor and occupancySensor device types
  • Override get_motion_sensor_by_id() to accept both device types
  • Add MotionSensorX class with optional is_on attribute for MYGGSPRAY compatibility

Testing

Tested with IKEA MYGGSPRAY E2494 sensors on Home Assistant 2026.1.1 with dirigera library 1.2.5.

Sensors are now correctly detected and report motion state via is_detected attribute.

IKEA MYGGSPRAY motion sensors (E2494) report as deviceType
'occupancySensor' instead of 'motionSensor'. They also lack the
'is_on' attribute that regular motion sensors have.

This PR fixes both issues by:
- Including 'occupancySensor' in motion sensor queries
- Creating MotionSensorX with optional is_on attribute
- Overriding get_motion_sensors() and get_motion_sensor_by_id()

Tested with IKEA MYGGSPRAY E2494 sensors on Home Assistant 2026.1.1.
MYGGSPRAY motion sensors send events as occupancySensor device type.
Without this, the hub_event_listener ignores real-time state changes
from these sensors.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@PatrikJasek
Copy link

Hi, when it will be released?

Thank you

@nrbrt
Copy link
Author

nrbrt commented Jan 25, 2026

For those who don't want to wait for this to be merged: I've created a fork at nrbrt/dirigera_platform with this fix on the main branch, along with the other pending PRs (#161, #163, #174, #182).

You can install it via HACS by adding nrbrt/dirigera_platform as a custom repository (Integration category).

@nrbrt
Copy link
Author

nrbrt commented Jan 26, 2026

Closing in favor of PR #186 which combines all fixes including MYGGSPRAY support

@nrbrt nrbrt closed this Jan 26, 2026
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