Files
home-assistant-config/appdaemon/apps/controllerx/cx_devices/osram.py
T
fkrebs 5f01411780 chore: initial baseline before refactoring
Initial snapshot of Home Assistant config (HAOS 2026.4.4)
prior to dashboard restructuring and helper YAML migration.

Pre-commit cleanup applied:
- Removed blueprints/switch_manager/ (9.4 MB stale, component already gone)
- Removed .storage/switch_manager
- Removed home-assistant.log.{1,old,fault}
- Removed zigbee2mqtt/configuration_backup_v{1..4}.yaml
- Removed zigbee2mqtt/database.db.tmp.2024-09-27 (1.5y old)
- Created empty themes/ to satisfy configuration.yaml include

.gitignore uses allowlist strategy for .storage/ to keep
all tokens, keys, and PINs out of version control.
2026-05-02 14:24:53 +02:00

39 lines
1.5 KiB
Python

from cx_const import DefaultActionsMapping, Light
from cx_core import LightController
from cx_core.integration import EventData
class OsramAC025XX00NJLightController(LightController):
# This mapping works for: AC0251100NJ / AC0251400NJ / AC0251600NJ / AC0251700NJ
# (different models are just different colours)
def get_deconz_actions_mapping(self) -> DefaultActionsMapping:
return {
1002: Light.ON, # Click Arrow up
1001: Light.HOLD_BRIGHTNESS_UP, # Hold Arrow Up
1003: Light.RELEASE, # Release Arrow Up
2002: Light.OFF, # Click Arrow down
2001: Light.HOLD_BRIGHTNESS_DOWN, # Hold Arrow down
2003: Light.RELEASE, # Release Arrow down
3002: Light.SYNC, # Click Circle button
3001: Light.HOLD_COLOR_UP, # Hold Circle button
3003: Light.RELEASE, # Release Circle button
}
def get_zha_actions_mapping(self) -> DefaultActionsMapping:
return {
"1_on": Light.ON,
"1_move_with_on_off": Light.HOLD_BRIGHTNESS_UP,
"1_stop": Light.RELEASE,
"3_move_to_level_with_on_off": None,
"3_move_to_color_temp": Light.SYNC,
"3_move_to_saturation": Light.HOLD_COLOR_UP,
"3_move_hue": Light.RELEASE,
"2_off": Light.OFF,
"2_move": Light.HOLD_BRIGHTNESS_DOWN,
"2_stop": Light.RELEASE,
}
def get_zha_action(self, data: EventData) -> str:
return f"{data['endpoint_id']}_{data['command']}"