Skip to content

Conversation

@nrbrt
Copy link

@nrbrt nrbrt commented Jan 25, 2026

Summary

This PR adds support for remotePressEvent messages from lightController-type remotes like STYRBAR and RODRET.

Previously, these controllers were not usable in Home Assistant automations because:

  • They are deviceType: "lightController" (not shortcutController)
  • They have canSend: ["isOn", "lightLevel"] (no press events)
  • The hub sends remotePressEvent WebSocket messages which were discarded as "non state message"

Changes

Added parse_remote_press_event() function in hub_event_listener.py that:

  • Parses remotePressEvent messages from lightController devices
  • Converts clickPattern to trigger types (single_click, long_press, double_click)
  • Handles multi-button controllers using the _N suffix (e.g., button2_single_click)
  • Debounces duplicate events within 1 second (IKEA bug workaround)
  • Fires dirigera_platform_event for Home Assistant automations

Tested with

  • RODRET wireless dimmer (2-button)
  • STYRBAR remote control (4-button, model "Remote Control N2")

Event format

{"type":"remotePressEvent","data":{"id":"xxx_1","clickPattern":"singlePress"}}

Fires as:

{'type': 'button1_single_click', 'device_id': '...', 'entity_id': 'sensor.remote_name'}

🤖 Generated with Claude Code

nrbrt and others added 9 commits January 13, 2026 11:33
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>
STYRBAR has 4 buttons but was treated as 1-button controller.
This enables button1_*, button2_*, button3_*, button4_* triggers.
Adds English translations for button3_* and button4_* triggers
to support 4-button controllers like STYRBAR.
STYRBAR, RODRET and similar lightController-type remotes send
remotePressEvent messages via WebSocket instead of sceneUpdated.
Previously these were discarded as "non state message".

This commit adds a new handler (parse_remote_press_event) that:
- Parses remotePressEvent messages from lightController devices
- Converts clickPattern to trigger types (single_click, long_press, etc)
- Handles multi-button controllers using the _N suffix
- Debounces duplicate events within 1 second (IKEA bug workaround)
- Fires dirigera_platform_event for Home Assistant automations

Enables use of STYRBAR 4-button and RODRET 2-button remotes in
Home Assistant automations without requiring scene configuration.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
nrbrt and others added 2 commits January 25, 2026 12:04
The min_color_temp_kelvin, max_color_temp_kelvin, and color_temp_kelvin
properties were returning raw mired values from Dirigera instead of
converting them to Kelvin as Home Assistant expects.

Also fixed async_turn_on to use direct API patch for setting color
temperature, bypassing the dirigera library's broken validation that
rejects valid Kelvin values.

Fixes sanjoyg#181

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Changed OptionsFlowHandler to inherit from OptionsFlowWithConfigEntry
instead of OptionsFlow with explicit self.config_entry assignment.

This fixes the deprecation warning:
"Detected that custom integration 'dirigera_platform' sets option flow
config_entry explicitly, which is deprecated"

Fixes sanjoyg#170

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The IKEA ALPSTUGA air quality monitor reports CO2 levels via the
currentCO2 attribute, but the dirigera library doesn't have this
field in its EnvironmentSensorAttributes pydantic model yet.

This commit:
- Creates patched EnvironmentSensorAttributesX with current_c_o2 field
- Creates EnvironmentSensorX class using the patched attributes
- Adds get_environment_sensors/get_environment_sensor_by_id to HubX
- Updates add_environment_sensors to create CO2 entities
- Adds None default to getattr calls for safer attribute checking

Fixes sanjoyg#178

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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