Commit Graph

16 Commits

Author SHA1 Message Date
Fabio Manganiello a7aabd7c52
Fixed handling of `:meth:` docstring annotations with relative paths. 2023-05-22 16:32:30 +02:00
Fabio Manganiello 2d618188c8
Print the full exception stack trace if `.status` fails. 2023-04-22 17:19:23 +02:00
Fabio Manganiello 74aeca5c34
Trigger a sensor event only if abs(old_data - new_data) > tolerance
Not if abs(old_data - new_data) >= tolerance, otherwise events will
always be triggered when tolerance=0, even if the data hasn't changed.
2023-04-17 02:25:01 +02:00
Fabio Manganiello 45e5ca47e7 Fallback for sensor._has_changes 2023-04-02 15:38:49 +02:00
Fabio Manganiello fcdda40c4a
Update the `_last_measurement` only if some events were processed from the new data. 2023-04-02 12:09:45 +02:00
Fabio Manganiello 88784985e1
Should be `abs(old_data - new_data) >= tolerance`.
Not `abs(old_data - new_data) > tolerance`.
2023-04-02 12:08:40 +02:00
Fabio Manganiello 99572f9731
Sanity check to prevent empty objects from being propagated to `sensor.transform_entities` 2023-04-01 23:41:28 +02:00
Fabio Manganiello 3f3726c50a
Fixed another occurrence of "Subscripted generics cannot be used" etc. error 2023-04-01 23:34:22 +02:00
Fabio Manganiello e2e73d0fdb
Fix another Python < 3.10 subscripted generic issue. 2023-04-01 23:23:51 +02:00
Fabio Manganiello 8e0f88ea16
Don't swap the argument of `SensorPlugin.publish_entities` with a list if not required 2023-04-01 23:06:37 +02:00
Fabio Manganiello 0047d85b9d
Dirty fix for "Subscripted generics cannot be used with class and instance checks" on Python < 3.10 2023-04-01 22:52:24 +02:00
Fabio Manganiello 98ec018292
Replaced `NoneType` reference.
`types.NoneType` is not always available on all Python versions, so we
have to make our own type for it.
2023-04-01 22:42:13 +02:00
Fabio Manganiello c23e8867e2
Added `enabled_sensors` to the `sensor` plugin 2023-04-01 21:56:56 +02:00
Fabio Manganiello bf4db76830
Legacy `sensor` backend replaced by an extended `sensor` runnable plugin. 2023-04-01 19:24:35 +02:00
Fabio Manganiello 3bfc5b83ef Moved to manifest files for describing plugins and backends and their dependencies 2021-09-16 17:53:40 +02:00
Fabio Manganiello 6738ff832a get_data/get_measurement/close should be implemented in a base SensorPlugin
class, not specifically in GpioSensorPlugin
2020-01-08 00:20:00 +01:00