Skip to content

Commit a3621ee

Browse files
Docs next (#3322)
* Add new custom user library location * Change library location * Update manual library details
1 parent 928cb5d commit a3621ee

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

docs/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ default_battery_low_threshold | Int | Optional | 10 | The default threshold wher
2424
battery_increase_threshold | Int | Optional | 25 | The threshold where the battery_notes_battery_increased event is fired, use this event for battery replaced automations. The threshold is the difference in increase between previous and current battery level. |
2525
hide_battery | Boolean | Optional | False | Hide the standard battery when adding Battery+. This will not effect existing dashboards, automations etc.|
2626
round_battery | Boolean | Optional | False | Round battery+ to whole percentages.|
27-
user_library | String | Optional | | If specified then a user library file will be searched prior to the main library, the user library must be in the same format as the library and placed in the same folder. Only really used for dev purposes. |
27+
user_library | String | Optional | | If specified then a user library file will be searched prior to the main library, the user library must be in the same format as the library and placed in the same folder (config/.storage/battery_notes). Only really used for dev purposes. |
2828

2929
# Debug Logging
3030

docs/library.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,14 @@ Upon submission using the form above GitHub will attempt to make the required co
1616

1717
Fork the repository, add your device details to the JSON document `library/library.json`, and then submit a pull request. Do not enable GitHub Actions (disabled by default) as this will mess with the pull request and are unnecessary for a library submission.
1818

19-
* The easiest way to get the correct device information is to add the device manually, on the battery type panel you will see a summary at the top of the details required to add to the library. This is also available if you go into configure of the device in battery notes.
20-
* The manufacturer and model should be exactly what is displayed on the Device screen within Home Assistant. If the Device screen has a Model ID or Hardware Version then this should be included.
21-
* In some rare cases models could contain unique identifiers and you want the battery type to apply to all models that match a pattern, in these instances you can use the optional model_match_method attribute. For example Apple iPhone's have a model of iPhoneXX.X but all have a rechargeable battery, here you could use the "model_match_method": "startswith" and just specify iPhone as the model.
22-
* The manufacturer & model names may be different between integrations such as Zigbee2MQTT and ZHA, if you see a similar device please duplicate the entry rather than changing it.
23-
* The `battery_quantity` data is numeric (no quotes) and optional. If a device only requires a single battery, it should be omitted.
24-
* The `battery_type` data should follow the most common naming for general batteries (ex. AAA, D) and the IEC naming for battery cells according to [Wikipedia](https://en.wikipedia.org/wiki/List_of_battery_sizes) (ex. CR2032, 18650)
25-
* If a device has a bespoke rechargeable battery you can use `"battery_type": "Rechargeable"`
26-
* For devices like smoke alarms where the battery is not replaceable you can use `"battery_type": "Irreplaceable"`
27-
* If a device shouldn't be discovered because there are multiple revisions with the same model number but different battery types it can be added to the library with a `"battery_type": "MANUAL"` to note it is a device that shouldn't have a battery definition added to the library to save removal/re-add because people don't realise there are variants.
19+
- The easiest way to get the correct device information is to add the device manually to Battery Notes, on the battery type panel you will see a summary at the top of the details required to add to the library. This is also available if you go into configure of the device in battery notes.
20+
- In some rare cases models could contain unique identifiers and you want the battery type to apply to all models that match a pattern, in these instances you can use the optional model_match_method attribute. For example Apple iPhone's have a model of iPhoneXX.X but all have a rechargeable battery, here you could use the "model_match_method": "startswith" and just specify iPhone as the model.
21+
- The manufacturer & model names may be different between integrations such as Zigbee2MQTT and ZHA, if you see a similar device please duplicate the entry rather than changing it.
22+
- The `battery_quantity` data is numeric (no quotes) and optional. If a device only requires a single battery, it should be omitted.
23+
- The `battery_type` data should follow the most common naming for general batteries (ex. AAA, D) and the IEC naming for battery cells according to [Wikipedia](https://en.wikipedia.org/wiki/List_of_battery_sizes) (ex. CR2032, 18650)
24+
- If a device has a bespoke rechargeable battery you can use `"battery_type": "Rechargeable"`
25+
- For devices like smoke alarms where the battery is not replaceable you can use `"battery_type": "Irreplaceable"`
26+
- If a device shouldn't be discovered because there are multiple revisions with the same model number but different battery types it can be added to the library with a `"battery_type": "MANUAL"` to note it is a device that shouldn't have a battery definition added to the library to save removal/re-add because people don't realise there are variants.
2827

2928
For the example image below, your JSON entry will look like this:
3029

0 commit comments

Comments
 (0)