Skip to content

Commit 0994927

Browse files
authored
Merge pull request #69 from mweinelt/options-doc
Update documentation
2 parents 10d59ce + da6da6a commit 0994927

3 files changed

Lines changed: 21 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Changelog
2+
13
## 1.1.3
24

35
- Migrate from Throttle decorator to SCAN_INTERVAL

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@ Contributions welcome!
88

99
Tested against Home Asisstant 2025.8.3.
1010

11+
## Options
12+
13+
| Name | Type | Default | Description |
14+
|---------------------|--------|----------|-------------|
15+
| name | string | required | Friendly name |
16+
| expr | string | required | [PromQL](https://prometheus.io/docs/prometheus/latest/querying/basics/) expression |
17+
| unique_id | string | optional | [Unique ID](https://www.home-assistant.io/faq/unique_id/) |
18+
| unit_of_measurement | string | optional | Unit of the measurement |
19+
| device_class | string | optional | [Device class](https://www.home-assistant.io/integrations/sensor/#device-class) |
20+
| state_class | string | optional | [State class](https://developers.home-assistant.io/docs/core/entity/sensor/#available-state-classes) |
21+
1122
## Example usage
1223

1324
```yaml
@@ -36,7 +47,7 @@ sensor:
3647
3748
I tried to get this component merged into home-assistant in 2020/12.
3849
39-
https://github.com/home-assistant/core/pull/44508
50+
<https://github.com/home-assistant/core/pull/44508>
4051
4152
That effort failed when the requirement to create a third party
4253
library to handle the interaction with the Prometheus API came up.

flake.nix

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@
4242
pre-commit = git-hooks.lib.${system}.run {
4343
src = ./.;
4444
hooks = {
45+
markdownlint = {
46+
enable = true;
47+
settings.configuration = {
48+
# Don't enforce a max line length
49+
MD013 = false;
50+
};
51+
};
4552
ruff.enable = true;
4653
ruff-format.enable = true;
4754
pyright = {

0 commit comments

Comments
 (0)