Commit graph

15 commits

Author SHA1 Message Date
d872835093
New API to check if a table class exists before defining it.
- Check if it's part of the metadata through a function call rather than
  checking `Base.metadata` in every single module.

- Make it possible to override them (mostly for doc generation logic
  that needs to be able to import those classes).

- Make it possible to extend them.
2023-10-09 01:33:44 +02:00
65481dc6b4
Added PercentSensor entity type. 2023-04-17 02:25:02 +02:00
31f411868c
Message.Encoder should serialize binary data to 0x-led hex strings. 2023-04-02 02:43:06 +02:00
ead4513915
Added optional unit column to RawSensor entity. 2023-03-03 01:59:27 +01:00
dc7cbe743d
Refactored/improved RawSensor entity.
It will now automatically deal with most of the native types and convert
them to strings on the db.
2023-02-22 02:19:19 +01:00
2fa45fc5a3
Documentation and LINT fixes for sensor entities. 2023-02-21 23:10:05 +01:00
afdeb91f66
Implemented remaining supported entities for the smartthings integration 2023-01-26 22:10:02 +01:00
147f36c86c
All Sensor instances should have is_read_only=True by default 2023-01-22 21:05:14 +01:00
3615a269fe
Use Float instead of Numeric on NumericSensor table.
The Numeric type may have casting/rounding issues with SQLite.
2022-12-18 15:25:22 +01:00
ecba72935f
Check for table metadata existance in Base.metadata instead of having a separate entity registry 2022-12-04 16:28:46 +01:00
b9e6614b04
Added support for EnumSensor entities 2022-11-21 00:04:07 +01:00
801ed05684
Added support for binary sensors (in zigbee.mqtt for now) 2022-11-05 01:47:50 +01:00
64513be6b8
Initial implementation of sensor entities.
Implemented (at least in `zigbee.mqtt`, for now):

- `TemperatureSensor`
- `HumiditySensor`
- `VoltageSensor`
- `CurrentSensor`
- `EnergySensor`
- `PowerSensor`
- `NumericSensor` (generic fallback 1)
- `RawSensor` (generic fallback 2)
- `Sensor` (root class)
2022-11-02 16:38:17 +01:00
a1cf671334
Added support for link_quality entities to zigbee.mqtt 2022-10-30 11:03:22 +01:00
d61b053f72
Support for battery entities 2022-10-29 13:38:42 +02:00