Skip to content

Commit 2cc2f72

Browse files
Merge branch 'main' into storage
2 parents ea0a58c + c0dba50 commit 2cc2f72

File tree

7 files changed

+259
-50
lines changed

7 files changed

+259
-50
lines changed

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,12 @@ body:
66
- type: markdown
77
attributes:
88
value: Before you open a new issue, search through the existing issues to see if others have had the same problem.
9-
- type: textarea
10-
attributes:
11-
label: "System Health details"
12-
description: "Paste the data from the System Health card in Home Assistant (https://www.home-assistant.io/more-info/system-health)"
13-
validations:
14-
required: true
159
- type: checkboxes
1610
attributes:
1711
label: Checklist
1812
options:
1913
- label: I have added `battery_notes:` to my configuration.yaml and restarted.
2014
required: true
21-
- label: I am using the latest version of Battery Notes (if using the latest beta please mention this in the issue description).
22-
required: true
2315
- label: I have read the [FAQ's](https://andrew-codechimp.github.io/HA-Battery-Notes/faq).
2416
required: true
2517
- label: I have enabled debug logging for my installation.
@@ -30,6 +22,12 @@ body:
3022
required: true
3123
- label: This issue is not a duplicate issue of any [previous issues](https://github.com/andrew-codechimp/ha-battery-notes/issues?q=is%3Aissue+label%3A%22Bug%22+)..
3224
required: true
25+
- type: input
26+
attributes:
27+
label: "Battery Notes Version"
28+
description: "Available from Settings/Devices & Services/Integrations/Battery Notes (you should be running the latest or pre-release)."
29+
validations:
30+
required: true
3331
- type: textarea
3432
attributes:
3533
label: "Describe the issue"
@@ -47,14 +45,19 @@ body:
4745
...
4846
validations:
4947
required: true
48+
- type: textarea
49+
attributes:
50+
label: "System Health details"
51+
description: "Paste the data from the System Health card in Home Assistant (https://www.home-assistant.io/more-info/system-health)"
52+
validations:
53+
required: true
5054
- type: textarea
5155
attributes:
5256
label: "Debug logs"
5357
description: "To enable debug logs check this https://www.home-assistant.io/integrations/logger/, this **needs** to include _everything_ from startup of Home Assistant to the point where you encounter the issue."
5458
render: text
5559
validations:
5660
required: false
57-
5861
- type: textarea
5962
attributes:
6063
label: "Diagnostics dump"

custom_components/battery_notes/translations/nl.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,12 +190,12 @@
190190
},
191191
"issues": {
192192
"missing_device": {
193-
"title": "Orphaned Battery Note",
193+
"title": "Verouderd Battery Note",
194194
"fix_flow": {
195195
"step": {
196196
"confirm": {
197-
"title": "Orphaned Battery Note",
198-
"description": "The associated device or entity no longer exists for the Battery Note entry {name}, the Battery Note should be deleted.\nSelect **Submit** to delete this Battery Note."
197+
"title": "Verouderd Battery Note",
198+
"description": "Het bijbehorende apparaat of entiteit bestaat niet langer voor de Battery Note {name}, de Battery Note moet worden verwijderd.\nSelecteer **Verzenden** om deze Battery Note te verwijderen."
199199
}
200200
}
201201
}

docs/events.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ You can use this to send notifications in your preferred method. An example aut
1919
| `source_entity_id` | `string` | The entity id of the sensor associated with the battery note. |
2020
| `device_name` | `string` | The device name (or associated sensor name if no device). |
2121
| `battery_low` | `bool` | Returns true if the battery has gone below the threshold, false when the battery has returned above the threshold. **Your automations will almost certainly want to examine this value and set/clear notifications or other indicators.** |
22+
| `battery_low_threshold` | `string` | Battery low threshold (or global if 0). |
2223
| `battery_type_and_quantity` | `string` | Battery type & quantity. |
2324
| `battery_type` | `string` | Battery type. |
2425
| `battery_quantity` | `int` | Battery quantity. |
@@ -94,6 +95,7 @@ An example automation below shows how to update the battery_replaced.
9495
| `source_entity_id` | `string` | The entity id of the sensor associated with the battery note. |
9596
| `device_name` | `string` | The device name (or associated sensor name if no device). |
9697
| `battery_low` | `bool` | Returns true if the battery has gone below the threshold, false when the battery has returned above the threshold. |
98+
| `battery_low_threshold` | `string` | Battery low threshold (or global if 0). |
9799
| `battery_type_and_quantity` | `string` | Battery type & quantity. |
98100
| `battery_type` | `string` | Battery type. |
99101
| `battery_quantity` | `int` | Battery quantity. |

docs/faq.md

Lines changed: 42 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,85 @@
11
# FAQ
22

3-
## Does a device have to be in the library?
3+
## Does a device have to be in the library?
4+
45
No, you can always add a device manually by going to Settings -> Integrations -> Battery Notes screen add a new device where you can enter the battery details manually.
56

6-
## Why is my device not being discovered?
7-
It could be missing from the [library](https://github.com/andrew-codechimp/HA-Battery-Notes/blob/main/library.md) or does not exactly match the name that your integration has. ZHA and Z2M for example have different manufacturers/models for the same device, you can still add it manually or contribute to the library.
7+
## Why is my device not being discovered?
8+
9+
It could be missing from the [library](https://github.com/andrew-codechimp/HA-Battery-Notes/blob/main/library.md) or does not exactly match the name that your integration has. ZHA and Z2M for example have different manufacturers/models for the same device, you can still add it manually or contribute to the library.
10+
11+
## When is the library updated?
812

9-
## When is the library updated?
1013
It updates when Home Assistant is restarted and approximately every 24 hours after that.
1114
It will pull the latest devices that have been merged into the main branch, if you have recently submitted a pull request for a new device it will not appear until it has been manually reviewed and merged.
1215

13-
## How do I remove a battery note on a device?
16+
## How do I remove a battery note on a device?
17+
1418
Go into the Settings -> Integrations -> Battery Notes, use the menu on the right of a device and select Delete, this will only delete the battery note, not the whole device.
1519

16-
## Can I edit a battery note?
20+
## Can I edit a battery note?
21+
1722
Go into Settings -> Integrations -> Battery Notes and click Configure on the device you want to edit.
1823

19-
## Why am I only able to see some of my devices when adding manually?
24+
## Why am I only able to see some of my devices when adding manually?
25+
2026
By default Battery Notes filters the device list to only devices with a battery, if you want to add a battery note to a random device then you can disable this filtering by adding the following configuration to your `configuration.yaml` and restart Home Assistant to see all devices.
27+
2128
```
2229
battery_notes:
2330
show_all_devices: True
2431
```
2532

26-
## I only want to add notes to a few devices, can I disable auto discovery?
33+
## I only want to add notes to a few devices, can I disable auto discovery?
34+
2735
If you want to disable this functionality you can add the following to your `configuration.yaml`, after a restart of Home Assistant you will not see discovered battery notes.
36+
2837
```
2938
battery_notes:
3039
enable_autodiscovery: False
3140
```
3241

33-
## I don't want to track battery replacement, can I disable this?
34-
Yes, you can add the following to your `configuration.yaml`, after a restart of Home Assistant *new* devices added to battery notes will have the battery replaced sensor and button disabled. Any devices you have previously added to Battery Notes you will have to disable/enable these sensors manually, which also means you can just enable specific sensors of important ones you want to track.
42+
## I don't want to track battery replacement, can I disable this?
43+
44+
Yes, you can add the following to your `configuration.yaml`, after a restart of Home Assistant _new_ devices added to battery notes will have the battery replaced sensor and button disabled. Any devices you have previously added to Battery Notes you will have to disable/enable these sensors manually, which also means you can just enable specific sensors of important ones you want to track.
45+
3546
```
3647
battery_notes:
3748
enable_replaced: False
3849
```
3950

40-
## My device doesn't show a Battery+ sensor
51+
## My device doesn't show a Battery+ sensor
52+
4153
This is usually because the device does not have a battery percentage, you can create one if your device has a voltage, low indicator or similar by following [these instructions](entities.md/#adding-a-battery-percentage)
4254

55+
## My device is not picking up the proper battery percentage for Battery+
56+
57+
If your device has a different percentage, perhaps a max charge indicator Battery Notes cannot identify the correct battery percentage to monitor. You can either hide the entity you want Battery+ to ignore or you can remove the Battery Notes device, then re-add as an Entity Association Type manually and choose the correct battery percentage to monitor.
58+
59+
## How do I create a battery low template
4360

44-
## How do I create a battery low template
4561
The best way to do this is to test in the developer tools/template section for your sensor.
46-
Be aware that Home Assistant shows friendly alternatives for some sensors, so when you are seeing Normal/Low this may really be a bool, testing in the template tool will allow you to determine the correct template to use. Start by adapting one of these.
62+
Be aware that Home Assistant shows friendly alternatives for some sensors, so when you are seeing Normal/Low this may really be a bool, testing in the template tool will allow you to determine the correct template to use. Start by adapting one of these.
63+
4764
```
4865
{{ states('sensor.mysensor_battery_low') }}
4966
{{ states('sensor.mysensor_battery_level') == "Low" }}
5067
{{ states('sensor.mysensor_battery_voltage') | float(5) < 1 }}
5168
```
69+
5270
Once you have got your template correct you can copy/paste it into the battery notes configuration section for that device and it will use that for detecting the battery is low and raising the battery notes event.
5371

5472
## My Shelly device is not showing a Battery+
55-
There seems to have been an issue with the Shelly integration at some point where the battery entity was not created properly and therefore Battery Notes cannot find it. To fix this do the following:
56-
* Remove the battery note from the Shelly device
57-
* Remove the Shelly device from the Shelly integration
58-
* Re-Add the Shelly device
59-
* Add the battery note to the device
6073

74+
There seems to have been an issue with the Shelly integration at some point where the battery entity was not created properly and therefore Battery Notes cannot find it. To fix this do the following:
75+
76+
- Remove the battery note from the Shelly device
77+
- Remove the Shelly device from the Shelly integration
78+
- Re-Add the Shelly device
79+
- Add the battery note to the device
80+
81+
## How do I install pre-release versions via HACS
6182

62-
## How do I install pre-release versions via HACS
6383
Within Home Assistant go to Settings -> Integrations -> HACS
6484
Select Services
6585
Select Battery Notes
@@ -69,7 +89,8 @@ Select the cog icon
6989
Select Enable
7090
Select Update and wait for the entity to be enabled
7191
Turn on the Pre-release toggle
72-
HACS will now show updates available for pre-releases if there are any
92+
HACS will now show updates available for pre-releases if there are any
93+
94+
## How can I show my support?
7395

74-
## How can I show my support?
7596
[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/yellow_img.png)](https://www.buymeacoffee.com/codechimp)

0 commit comments

Comments
 (0)