This change adds support for obtaining the battery state for the following devices: * Motion Detector * Thermostat * Twinguard * Wall Thermostat * Window/Door Contact The following changes were made: * Add system.battery-level and system.low-battery channels to Motion Detector, Thermostat, Twinguard, Wall Thermostat and Window/Door Contact * Add constant for battery-level and low-battery channels in BoschSHCBindingConstants * Implement abstract handler and service for battery-powered devices * Let appropriate devices inherit the abstract implementation * Add missing super calls in initializeServices() methods * Rename existing getServiceURL() to getServiceStateURL() in HTTP client * Add methods to retrieve service states without the suffix "/state" in the URL * Rename DeviceStatusUpdate to DeviceServiceData * Let DeviceServiceData extend BoschSHCServiceState * Extend DeviceServiceData DTO with model for faults * Enhance bridge handler: handle updates without state sub-objects, extract methods to enhance readability * Add unit tests for all affected devices * Minor code enhancements * Update documentation Signed-off-by: David Pace <dev@davidpace.de>
This commit is contained in:
@@ -49,7 +49,7 @@ A compact smart plug with energy monitoring capabilities.
|
||||
| power-consumption | Number:Power | ☐ | Current power consumption (W) of the device. |
|
||||
| energy-consumption | Number:Energy | ☐ | Cumulated energy consumption (Wh) of the device. |
|
||||
|
||||
### Twinguard smoke detector
|
||||
### Twinguard Smoke Detector
|
||||
|
||||
The Twinguard smoke detector warns you in case of fire and constantly monitors the air.
|
||||
|
||||
@@ -65,6 +65,8 @@ The Twinguard smoke detector warns you in case of fire and constantly monitors t
|
||||
| purity-rating | String | ☐ | Rating of current measured purity. |
|
||||
| air-description | String | ☐ | Overall description of the air quality. |
|
||||
| combined-rating | String | ☐ | Combined rating of the air quality. |
|
||||
| battery-level | Number | ☐ | Current battery level percentage as integer number. Bosch-specific battery levels are mapped to numbers as follows: `OK`: 100, `LOW_BATTERY`: 10, `CRITICAL_LOW`: 1, `CRITICALLY_LOW_BATTERY`: 1, `NOT_AVAILABLE`: `UNDEF`. |
|
||||
| low-battery | Switch | ☐ | Indicates whether the battery is low (`ON`) or OK (`OFF`). |
|
||||
|
||||
### Door/Window Contact
|
||||
|
||||
@@ -75,6 +77,8 @@ Detects open windows and doors.
|
||||
| Channel Type ID | Item Type | Writable | Description |
|
||||
| --------------- | --------- | :------: | ---------------------------- |
|
||||
| contact | Contact | ☐ | Contact state of the device. |
|
||||
| battery-level | Number | ☐ | Current battery level percentage as integer number. Bosch-specific battery levels are mapped to numbers as follows: `OK`: 100, `LOW_BATTERY`: 10, `CRITICAL_LOW`: 1, `CRITICALLY_LOW_BATTERY`: 1, `NOT_AVAILABLE`: `UNDEF`. |
|
||||
| low-battery | Switch | ☐ | Indicates whether the battery is low (`ON`) or OK (`OFF`). |
|
||||
|
||||
### Motion Detector
|
||||
|
||||
@@ -85,6 +89,8 @@ Detects every movement through an intelligent combination of passive infra-red t
|
||||
| Channel Type ID | Item Type | Writable | Description |
|
||||
| --------------- | --------- | :------: | ------------------------------ |
|
||||
| latest-motion | DateTime | ☐ | The date of the latest motion. |
|
||||
| battery-level | Number | ☐ | Current battery level percentage as integer number. Bosch-specific battery levels are mapped to numbers as follows: `OK`: 100, `LOW_BATTERY`: 10, `CRITICAL_LOW`: 1, `CRITICALLY_LOW_BATTERY`: 1, `NOT_AVAILABLE`: `UNDEF`. |
|
||||
| low-battery | Switch | ☐ | Indicates whether the battery is low (`ON`) or OK (`OFF`). |
|
||||
|
||||
### Shutter Control
|
||||
|
||||
@@ -107,6 +113,8 @@ Radiator thermostat
|
||||
| temperature | Number:Temperature | ☐ | Current measured temperature. |
|
||||
| valve-tappet-position | Number:Dimensionless | ☐ | Current open ratio of valve tappet (0 to 100). |
|
||||
| child-lock | Switch | ☑ | Indicates if child lock is active. |
|
||||
| battery-level | Number | ☐ | Current battery level percentage as integer number. Bosch-specific battery levels are mapped to numbers as follows: `OK`: 100, `LOW_BATTERY`: 10, `CRITICAL_LOW`: 1, `CRITICALLY_LOW_BATTERY`: 1, `NOT_AVAILABLE`: `UNDEF`. |
|
||||
| low-battery | Switch | ☐ | Indicates whether the battery is low (`ON`) or OK (`OFF`). |
|
||||
|
||||
### Climate Control
|
||||
|
||||
@@ -129,6 +137,8 @@ Display of the current room temperature as well as the relative humidity in the
|
||||
| --------------- | -------------------- | :------: | ------------------------------------- |
|
||||
| temperature | Number:Temperature | ☐ | Current measured temperature. |
|
||||
| humidity | Number:Dimensionless | ☐ | Current measured humidity (0 to 100). |
|
||||
| battery-level | Number | ☐ | Current battery level percentage as integer number. Bosch-specific battery levels are mapped to numbers as follows: `OK`: 100, `LOW_BATTERY`: 10, `CRITICAL_LOW`: 1, `CRITICALLY_LOW_BATTERY`: 1, `NOT_AVAILABLE`: `UNDEF`. |
|
||||
| low-battery | Switch | ☐ | Indicates whether the battery is low (`ON`) or OK (`OFF`). |
|
||||
|
||||
### Security Camera 360
|
||||
|
||||
|
||||
Reference in New Issue
Block a user