Fabio Manganiello
c3337ccc6c
[ #311 ] Docs deps autogen sphinx plugin.
...
continuous-integration/drone/push Build is passing
Details
Added an `add_dependencies` plugin to the Sphinx build process that
parses the manifest files of the scanned backends and plugins and
automatically generates the documentation for the required dependencies
and triggered events.
This means that those dependencies are no longer required to be listed
in the docstring of the class itself.
Also in this commit:
- Black/LINT for some integrations that hadn't been touched in a long
time.
- Deleted some leftovers from previous refactors (deprecated
`backend.mqtt`, `backend.zwave.mqtt`, `backend.http.request.rss`).
- Deleted deprecated `inotify` backend - replaced by `file.monitor` (see
#289 ).
2023-09-24 17:00:08 +02:00
Fabio Manganiello
3e8d6bb01e
Removed `typing-extensions` dependency.
...
continuous-integration/drone/push Build is failing
Details
The package isn't present on older versions of Debian.
2023-09-18 14:05:39 +02:00
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