[boschshc] Support for Compact Smart Plugs (#13528) (#13533)

* add thing definition with ID "smart-plug-compact"
* add constant for thing type UID
* extract abstract implementation for devices with power switch and
energy monitoring
* let in-wall switch handler and smart plug handler extend the abstract
implementation
* register new handler
* add method with boolean parameter to fetch initial state actively
* make BoschSHCDeviceHandler abstract
* add documentation
* add unit tests

closes #13528

Signed-off-by: David Pace <dev@davidpace.de>
This commit is contained in:
David Pace
2022-10-31 17:21:25 +01:00
committed by GitHub
parent e528564bb6
commit 71da06dac7
14 changed files with 559 additions and 99 deletions

View File

@@ -4,9 +4,10 @@ Binding for the Bosch Smart Home.
- [Bosch Smart Home Binding](#bosch-smart-home-binding)
- [Supported Things](#supported-things)
- [In-Wall switches & Smart Plugs](#in-wall-switches-smart-plugs)
- [TwinGuard smoke detector](#twinguard-smoke-detector)
- [Door/Window contact](#door-window-contact)
- [In-Wall Switch](#in-wall-switch)
- [Compact Smart Plug](#compact-smart-plug)
- [Twinguard Smoke Detector](#twinguard-smoke-detector)
- [Door/Window Contact](#door-window-contact)
- [Motion Detector](#motion-detector)
- [Shutter Control](#shutter-control)
- [Thermostat](#thermostat)
@@ -24,19 +25,31 @@ Binding for the Bosch Smart Home.
## Supported Things
### In-Wall switches & Smart Plugs
### In-Wall Switch
A simple light control.
**Thing Type ID**: `in-wall-switch`
| Channel Type ID | Item Type | Writable | Description |
| ------------------ | ------------- | :------: | -------------------------------------------- |
| power-switch | Switch | &#9745; | Current state of the switch. |
| power-consumption | Number:Power | &#9744; | Current power consumption (W) of the device. |
| energy-consumption | Number:Energy | &#9744; | Energy consumption of the device. |
| Channel Type ID | Item Type | Writable | Description |
| ------------------ | ------------- | :------: | ------------------------------------------------ |
| power-switch | Switch | &#9745; | Current state of the switch. |
| power-consumption | Number:Power | &#9744; | Current power consumption (W) of the device. |
| energy-consumption | Number:Energy | &#9744; | Cumulated energy consumption (Wh) of the device. |
### TwinGuard smoke detector
### Compact Smart Plug
A compact smart plug with energy monitoring capabilities.
**Thing Type ID**: `smart-plug-compact`
| Channel Type ID | Item Type | Writable | Description |
| ------------------ | ------------- | :------: | ------------------------------------------------ |
| power-switch | Switch | &#9745; | Current state of the switch. |
| power-consumption | Number:Power | &#9744; | Current power consumption (W) of the device. |
| energy-consumption | Number:Energy | &#9744; | Cumulated energy consumption (Wh) of the device. |
### Twinguard smoke detector
The Twinguard smoke detector warns you in case of fire and constantly monitors the air.
@@ -53,7 +66,7 @@ The Twinguard smoke detector warns you in case of fire and constantly monitors t
| air-description | String | &#9744; | Overall description of the air quality. |
| combined-rating | String | &#9744; | Combined rating of the air quality. |
### Door/Window contact
### Door/Window Contact
Detects open windows and doors.