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,47 @@
|
||||
from cx_const import DefaultActionsMapping, Light, Z2MLight
|
||||
from cx_core import LightController, Z2MLightController
|
||||
|
||||
|
||||
class HG06323LightController(LightController):
|
||||
# Different states reported from the controller:
|
||||
# on, off, brightness_step_up, brightness_move_up,
|
||||
# brightness_step_down, brightness_move_down, brightness_stop
|
||||
|
||||
def get_z2m_actions_mapping(self) -> DefaultActionsMapping:
|
||||
return {
|
||||
"on": Light.ON,
|
||||
"brightness_step_up": Light.CLICK_BRIGHTNESS_UP,
|
||||
"brightness_move_up": Light.HOLD_BRIGHTNESS_UP,
|
||||
"brightness_stop": Light.RELEASE,
|
||||
"brightness_step_down": Light.CLICK_BRIGHTNESS_DOWN,
|
||||
"brightness_move_down": Light.HOLD_BRIGHTNESS_DOWN,
|
||||
"off": Light.OFF,
|
||||
}
|
||||
|
||||
def get_zha_actions_mapping(self) -> DefaultActionsMapping:
|
||||
return {
|
||||
"on": Light.ON,
|
||||
"step_0_51_10": Light.CLICK_BRIGHTNESS_UP,
|
||||
"move_0_51": Light.HOLD_BRIGHTNESS_UP,
|
||||
"stop": Light.RELEASE,
|
||||
"step_1_51_10": Light.CLICK_BRIGHTNESS_DOWN,
|
||||
"move_1_51": Light.HOLD_BRIGHTNESS_DOWN,
|
||||
"off": Light.OFF,
|
||||
}
|
||||
|
||||
|
||||
class HG06323Z2MLightController(Z2MLightController):
|
||||
# Different states reported from the controller:
|
||||
# on, off, brightness_step_up, brightness_move_up,
|
||||
# brightness_step_down, brightness_move_down, brightness_stop
|
||||
|
||||
def get_z2m_actions_mapping(self) -> DefaultActionsMapping:
|
||||
return {
|
||||
"on": Z2MLight.ON,
|
||||
"brightness_step_up": Z2MLight.CLICK_BRIGHTNESS_UP,
|
||||
"brightness_move_up": Z2MLight.HOLD_BRIGHTNESS_UP,
|
||||
"brightness_stop": Z2MLight.RELEASE,
|
||||
"brightness_step_down": Z2MLight.CLICK_BRIGHTNESS_DOWN,
|
||||
"brightness_move_down": Z2MLight.HOLD_BRIGHTNESS_DOWN,
|
||||
"off": Z2MLight.OFF,
|
||||
}
|
||||
Reference in New Issue
Block a user