Commit Graph

8 Commits

Author SHA1 Message Date
Cyborg2017
9f6cf15763 fix: support of wind_pressure sensor for T0xB6(730007H8)
* also update translation_key
2026-01-18 20:07:17 +08:00
Cyborg2017
27b9522851 feat: add device mapping for T0xB6(730007H8)
* Device type: T0xB6, Sn8: 730007H8, model: CXW-140-AK7 PRO.
2026-01-07 11:23:51 +08:00
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
8417fb380a fix: remove redundant imports. 2025-12-20 12:47:21 +08:00
sususweet
8aa0fc93fc feat: add control protocol v2 for T0xB6. 2025-12-20 12:44:16 +08:00
sususweet
266419e3a9 refactor: remove inner number type conversion in attr calculate. 2025-11-27 21:39:07 +08:00
sususweet
2a91ce9914 fix: add entities for T0xB6. Ref #45. 2025-11-14 21:14:11 +08:00
sususweet
1ddfa9f020 feat: update device mapping for T0xB6. Fix #26. 2025-10-11 20:44:33 +08:00