Commit Graph

7 Commits

Author SHA1 Message Date
Cyborg2017
2ac5880eb6 feat: add command template support for device control
- Add command field support to MideaNumberEntity and MideaSelectEntity
- Command templates allow defining fixed parameters in configuration
- Options/values are merged with command template before sending to device
- Backward compatible - existing configurations continue to work

Examples in device_mapping:

1. For NUMBER platform - brightness control with protocol template:
```yaml
Platform.NUMBER: {
    "lightness": {
        "min": 10,
        "max": 100,
        "step": 5,
        "command": {
            "electronic_control_version": 2,
            "type": "b6",
            "b6_action": "setting",
            "setting": "light",
            "lightness": "{value}"  # {value} placeholder for actual number value
        }
    }
}

2.For SELECT platform - gesture selection with protocol template:
```yaml
Platform.SELECT: {
    "gesture": {
        "options": {
            "off": {"gesture": "off"},
            "on": {"gesture": "on"}
        },
        "command": {  # Protocol template for gesture control
            "electronic_control_version": 2,
            "type": "b6",
            "b6_action": "setting",
            "setting": "gesture"
            # {gesture} value from options will be merged automatically
        }
    }
}
2026-01-07 11:22:04 +08:00
sususweet
1f0662154a fix: add translations to washing machine. Fix #63. 2025-12-02 23:17:23 +08:00
sususweet
8cb30ebb3e feat: update device control for T0xCC and T0xAC 2025-10-01 18:00:18 +08:00
sususweet
848a086977 fix: device control of T0xD9 2025-09-30 17:12:35 +08:00
sususweet
bbf4d168e7 fix: remote control for device T0xED. 2025-09-30 14:38:50 +08:00
sususweet
51f0fcc8dc feat: refactor code to add more attributes. 2025-09-24 19:57:11 +08:00
sususweet
63ec7de48f Rename project 2025-09-17 23:22:01 +08:00