File tree Expand file tree Collapse file tree 3 files changed +19
-2
lines changed
custom_components/battery_notes Expand file tree Collapse file tree 3 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,6 @@ Restart Home Assistant
37
37
Add the following entry to your ``` configuration.yaml ```
38
38
```
39
39
battery_notes:
40
- enable_autodiscovery: true
41
40
```
42
41
Restart Home Assistant a final time
43
42
In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "Battery Notes"
Original file line number Diff line number Diff line change 7
7
8
8
import logging
9
9
10
+ import homeassistant .helpers .config_validation as cv
11
+ import voluptuous as vol
12
+
10
13
from awesomeversion .awesomeversion import AwesomeVersion
11
14
from homeassistant .config_entries import ConfigEntry
12
15
from homeassistant .core import HomeAssistant , callback
21
24
DOMAIN_CONFIG ,
22
25
PLATFORMS ,
23
26
CONF_ENABLE_AUTODISCOVERY ,
27
+ CONF_LIBRARY ,
24
28
)
25
29
26
30
MIN_HA_VERSION = "2023.7"
27
31
28
32
_LOGGER = logging .getLogger (__name__ )
29
33
34
+ CONFIG_SCHEMA = vol .Schema (
35
+ {
36
+ DOMAIN : vol .All (
37
+ vol .Schema (
38
+ {
39
+ vol .Optional (CONF_ENABLE_AUTODISCOVERY , default = True ): cv .boolean ,
40
+ vol .Optional (CONF_LIBRARY , default = "library.json" ): cv .string ,
41
+ },
42
+ ),
43
+ ),
44
+ },
45
+ extra = vol .ALLOW_EXTRA ,
46
+ )
47
+
30
48
31
49
async def async_setup (hass : HomeAssistant , config : ConfigType ) -> bool :
32
50
"""Integration setup."""
Original file line number Diff line number Diff line change 9
9
"integration_type" : " device" ,
10
10
"iot_class" : " calculated" ,
11
11
"issue_tracker" : " https://github.com/andrew-codechimp/ha-battery-notes/issues" ,
12
- "version" : " 1.1.1 "
12
+ "version" : " 1.1.2 "
13
13
}
You can’t perform that action at this time.
0 commit comments