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.
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
from cx_const import DefaultActionsMapping, Light
|
||||
from cx_core import LightController
|
||||
from cx_core.integration import EventData
|
||||
|
||||
|
||||
class AUA1ZBR2GWLightController(LightController):
|
||||
# Different states reported from the controller:
|
||||
# on, off, brightness_step_up, brightness_step_down,
|
||||
# color_temperature_step_up, color_temperature_step_down
|
||||
# There is one copy of these actions per endpoint
|
||||
|
||||
def get_zha_actions_mapping(self) -> DefaultActionsMapping:
|
||||
return {
|
||||
"1_toggle": Light.TOGGLE,
|
||||
"1_step_up": Light.CLICK_BRIGHTNESS_UP,
|
||||
"1_step_down": Light.CLICK_BRIGHTNESS_DOWN,
|
||||
"1_step_color_temp_up": Light.CLICK_COLOR_TEMP_UP,
|
||||
"1_step_color_temp_down": Light.CLICK_COLOR_TEMP_DOWN,
|
||||
"2_toggle": Light.TOGGLE,
|
||||
"2_step_up": Light.CLICK_BRIGHTNESS_UP,
|
||||
"2_step_down": Light.CLICK_BRIGHTNESS_DOWN,
|
||||
"2_step_color_temp_up": Light.CLICK_COLOR_TEMP_UP,
|
||||
"2_step_color_temp_down": Light.CLICK_COLOR_TEMP_DOWN,
|
||||
}
|
||||
|
||||
def get_zha_action(self, data: EventData) -> str:
|
||||
endpoint_id = data.get("endpoint_id", 1)
|
||||
command: str = data["command"]
|
||||
action = command
|
||||
args = data.get("args", [])
|
||||
if command == "step" or command == "step_color_temp":
|
||||
args_mapping = {0: "up", 1: "down", 3: "up"}
|
||||
action = "_".join((action, args_mapping[args[0]]))
|
||||
if command == "on" or command == "off":
|
||||
action = "toggle"
|
||||
action = f"{endpoint_id}_{action}"
|
||||
return action
|
||||
Reference in New Issue
Block a user