5f01411780
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.
24 lines
809 B
Python
24 lines
809 B
Python
from cx_const import DefaultActionsMapping, Light
|
|
from cx_core import LightController
|
|
from cx_core.integration import EventData
|
|
|
|
|
|
class SNZB01LightController(LightController):
|
|
def get_z2m_actions_mapping(self) -> DefaultActionsMapping:
|
|
return {
|
|
"single": Light.TOGGLE, # single click
|
|
"double": Light.ON_FULL_BRIGHTNESS, # double click
|
|
"long": Light.ON_MIN_BRIGHTNESS, # hold
|
|
}
|
|
|
|
def get_zha_actions_mapping(self) -> DefaultActionsMapping:
|
|
return {
|
|
"toggle": Light.TOGGLE, # single click
|
|
"on": Light.ON_FULL_BRIGHTNESS, # double click
|
|
"off": Light.ON_MIN_BRIGHTNESS, # hold
|
|
}
|
|
|
|
def get_zha_action(self, data: EventData) -> str:
|
|
command: str = data["command"]
|
|
return command
|