File tree Expand file tree Collapse file tree 4 files changed +22
-19
lines changed
custom_components/battery_notes Expand file tree Collapse file tree 4 files changed +22
-19
lines changed Original file line number Diff line number Diff line change @@ -37,16 +37,13 @@ Platform | Name | Description
3737Or
3838Search for ` Battery Notes ` in HACS and install it under the "Integrations" category.
3939
40-
41- Restart Home Assistant
42-
4340** Important**
4441
4542Add the following entry to your ` configuration.yaml `
4643```
4744battery_notes:
4845```
49- Restart Home Assistant a final time
46+ Restart Home Assistant
5047In the HA UI go to Settings -> Integrations click "+" and search for "Battery Notes"
5148
5249### Manual Installation
Original file line number Diff line number Diff line change @@ -110,9 +110,9 @@ async def async_step_user(
110110
111111 device_id = user_input [CONF_DEVICE_ID ]
112112
113- coordinator = self .hass .data [ DOMAIN ][ DATA_UPDATE_COORDINATOR ]
114-
115- await coordinator .async_refresh ()
113+ if DOMAIN in self .hass .data :
114+ coordinator = self . hass . data [ DOMAIN ][ DATA_UPDATE_COORDINATOR ]
115+ await coordinator .async_refresh ()
116116
117117 device_registry = dr .async_get (self .hass )
118118 device_entry = device_registry .async_get (device_id )
@@ -137,12 +137,12 @@ async def async_step_user(
137137
138138 return await self .async_step_battery ()
139139
140- domain_config = self .hass .data [DOMAIN ][DOMAIN_CONFIG ]
141-
142140 schema = DEVICE_SCHEMA
143141 # If show_all_devices = is specified and true, don't filter
144- if domain_config .get (CONF_SHOW_ALL_DEVICES , False ):
145- schema = DEVICE_SCHEMA_ALL
142+ if DOMAIN in self .hass .data :
143+ domain_config = self .hass .data [DOMAIN ][DOMAIN_CONFIG ]
144+ if domain_config .get (CONF_SHOW_ALL_DEVICES , False ):
145+ schema = DEVICE_SCHEMA_ALL
146146
147147 return self .async_show_form (
148148 step_id = "user" ,
Original file line number Diff line number Diff line change 313313 "model" : " KR1" ,
314314 "battery_type" : " CR2"
315315 },
316- {
317- "manufacturer" : " Google" ,
318- "model" : " Topaz-2.7" ,
319- "battery_type" : " AA" ,
320- "battery_quantity" : 3
321- },
322316 {
323317 "manufacturer" : " Govee" ,
324318 "model" : " H5101/H5102/H5177" ,
458452 "battery_type" : " AA" ,
459453 "battery_quantity" : 4
460454 },
455+ {
456+ "manufacturer" : " Kwikset" ,
457+ "model" : " Kevo" ,
458+ "battery_type" : " AA" ,
459+ "battery_quantity" : 4
460+ },
461461 {
462462 "manufacturer" : " Kwikset" ,
463463 "model" : " SMARTCODE_DEADBOLT_10T" ,
664664 "model" : " Electra Washbasin Faucet" ,
665665 "battery_type" : " 2CR5"
666666 },
667+ {
668+ "manufacturer" : " Orbit BHyve" ,
669+ "model" : " HT25-0000" ,
670+ "battery_type" : " AA" ,
671+ "battery_quantity" : 2
672+ },
667673 {
668674 "manufacturer" : " ORVIBO" ,
669675 "model" : " e70f96b3773a4c9283c6862dbafb6a99" ,
13941400 "battery_quantity" : 2
13951401 }
13961402 ]
1397- }
1403+ }
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.3.0 "
12+ "version" : " 1.3.1 "
1313}
You can’t perform that action at this time.
0 commit comments