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
3737Add the following entry to your ``` configuration.yaml ```
3838```
3939battery_notes:
40- enable_autodiscovery: true
4140```
4241Restart Home Assistant a final time
4342In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "Battery Notes"
Original file line number Diff line number Diff line change 77
88import logging
99
10+ import homeassistant .helpers .config_validation as cv
11+ import voluptuous as vol
12+
1013from awesomeversion .awesomeversion import AwesomeVersion
1114from homeassistant .config_entries import ConfigEntry
1215from homeassistant .core import HomeAssistant , callback
2124 DOMAIN_CONFIG ,
2225 PLATFORMS ,
2326 CONF_ENABLE_AUTODISCOVERY ,
27+ CONF_LIBRARY ,
2428)
2529
2630MIN_HA_VERSION = "2023.7"
2731
2832_LOGGER = logging .getLogger (__name__ )
2933
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+
3048
3149async def async_setup (hass : HomeAssistant , config : ConfigType ) -> bool :
3250 """Integration setup."""
Original file line number Diff line number Diff line change 99 "integration_type" : " device" ,
1010 "iot_class" : " calculated" ,
1111 "issue_tracker" : " https://github.com/andrew-codechimp/ha-battery-notes/issues" ,
12- "version" : " 1.1.1 "
12+ "version" : " 1.1.2 "
1313}
You can’t perform that action at this time.
0 commit comments