Skip to content

Commit

Permalink
Illuminance fix and lowbat for sockets (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
Apollon77 authored Dec 15, 2024
1 parent dda2fd2 commit a5e1d96
Show file tree
Hide file tree
Showing 5 changed files with 302 additions and 88 deletions.
29 changes: 15 additions & 14 deletions DEVICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ In [brackets] is given the class name of device.
### Illuminance sensor [illuminance]
| R | Name | Role | Unit | Type | Wr | Ind | Mult | Regex |
|---|----------|-------------------------------|------|---------|----|-----|------|------------------------------------------------------------------------------|
| * | ACTUAL | value.brightness | % | number | - | | | `/brightness$/` |
| * | ACTUAL | value.brightness | lux | number | - | | | `/brightness$/` |
| | UNREACH | indicator.maintenance.unreach | | boolean | | X | | `/^indicator(\.maintenance)?\.unreach$/` |
| | LOWBAT | indicator.maintenance.lowbat | | boolean | | X | | `/^indicator(\.maintenance)?\.lowbat$|^indicator(\.maintenance)?\.battery$/` |
| | MAINTAIN | indicator.maintenance | | boolean | | X | | `/^indicator\.maintenance$/` |
Expand Down Expand Up @@ -568,19 +568,20 @@ In [brackets] is given the class name of device.


### Socket [socket]
| R | Name | Role | Unit | Type | Wr | Ind | Mult | Regex |
|---|----------------|-------------------------------|------|---------|----|-----|------|------------------------------------------|
| * | SET | switch | | boolean | W | | | `/^switch$|^state$|^switch\.active$/` |
| | ACTUAL | sensor.switch | | boolean | - | | | `/^state$|^state\.active$/` |
| | ELECTRIC_POWER | value.power | W | number | - | | | `/^value\.power$/` |
| | CURRENT | value.current | mA | number | - | | | `/^value\.current$/` |
| | VOLTAGE | value.voltage | V | number | - | | | `/^value\.voltage$/` |
| | CONSUMPTION | value.power.consumption | Wh | number | - | | | `/^value\.power\.consumption$/` |
| | FREQUENCY | value.frequency | Hz | number | - | | | `/^value\.frequency$/` |
| | WORKING | indicator.working | | | | X | | `/^indicator\.working$/` |
| | UNREACH | indicator.maintenance.unreach | | boolean | | X | | `/^indicator(\.maintenance)?\.unreach$/` |
| | MAINTAIN | indicator.maintenance | | boolean | | X | | `/^indicator\.maintenance$/` |
| | ERROR | indicator.error | | | | X | | `/^indicator\.error$/` |
| R | Name | Role | Unit | Type | Wr | Ind | Mult | Regex |
|---|----------------|-------------------------------|------|---------|----|-----|------|------------------------------------------------------------------------------|
| * | SET | switch | | boolean | W | | | `/^switch$|^state$|^switch\.active$/` |
| | ACTUAL | sensor.switch | | boolean | - | | | `/^state$|^state\.active$/` |
| | ELECTRIC_POWER | value.power | W | number | - | | | `/^value\.power$/` |
| | CURRENT | value.current | mA | number | - | | | `/^value\.current$/` |
| | VOLTAGE | value.voltage | V | number | - | | | `/^value\.voltage$/` |
| | CONSUMPTION | value.power.consumption | Wh | number | - | | | `/^value\.power\.consumption$/` |
| | FREQUENCY | value.frequency | Hz | number | - | | | `/^value\.frequency$/` |
| | WORKING | indicator.working | | | | X | | `/^indicator\.working$/` |
| | UNREACH | indicator.maintenance.unreach | | boolean | | X | | `/^indicator(\.maintenance)?\.unreach$/` |
| | LOWBAT | indicator.maintenance.lowbat | | boolean | | X | | `/^indicator(\.maintenance)?\.lowbat$|^indicator(\.maintenance)?\.battery$/` |
| | MAINTAIN | indicator.maintenance | | boolean | | X | | `/^indicator\.maintenance$/` |
| | ERROR | indicator.error | | | | X | | `/^indicator\.error$/` |


### Temperature [temperature]
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ if (controls) {
-->

## Changelog

### __WORK IN PROGRESS__
- (@Apollon77) Fixed default unit for Illuminance to "lux"
- (@Apollon77) Added Low-Battery state for switch to be consistent with other devices

### 4.1.0 (2024-12-06)

- (@Garfonso) Added new device type - illuminance (brightness sensor)
Expand Down
Loading

0 comments on commit a5e1d96

Please sign in to comment.