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
37
37
Or
38
38
Search for ` Battery Notes ` in HACS and install it under the "Integrations" category.
39
39
40
-
41
- Restart Home Assistant
42
-
43
40
** Important**
44
41
45
42
Add the following entry to your ` configuration.yaml `
46
43
```
47
44
battery_notes:
48
45
```
49
- Restart Home Assistant a final time
46
+ Restart Home Assistant
50
47
In the HA UI go to Settings -> Integrations click "+" and search for "Battery Notes"
51
48
52
49
### Manual Installation
Original file line number Diff line number Diff line change @@ -110,9 +110,9 @@ async def async_step_user(
110
110
111
111
device_id = user_input [CONF_DEVICE_ID ]
112
112
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 ()
116
116
117
117
device_registry = dr .async_get (self .hass )
118
118
device_entry = device_registry .async_get (device_id )
@@ -137,12 +137,12 @@ async def async_step_user(
137
137
138
138
return await self .async_step_battery ()
139
139
140
- domain_config = self .hass .data [DOMAIN ][DOMAIN_CONFIG ]
141
-
142
140
schema = DEVICE_SCHEMA
143
141
# 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
146
146
147
147
return self .async_show_form (
148
148
step_id = "user" ,
Original file line number Diff line number Diff line change 313
313
"model" : " KR1" ,
314
314
"battery_type" : " CR2"
315
315
},
316
- {
317
- "manufacturer" : " Google" ,
318
- "model" : " Topaz-2.7" ,
319
- "battery_type" : " AA" ,
320
- "battery_quantity" : 3
321
- },
322
316
{
323
317
"manufacturer" : " Govee" ,
324
318
"model" : " H5101/H5102/H5177" ,
458
452
"battery_type" : " AA" ,
459
453
"battery_quantity" : 4
460
454
},
455
+ {
456
+ "manufacturer" : " Kwikset" ,
457
+ "model" : " Kevo" ,
458
+ "battery_type" : " AA" ,
459
+ "battery_quantity" : 4
460
+ },
461
461
{
462
462
"manufacturer" : " Kwikset" ,
463
463
"model" : " SMARTCODE_DEADBOLT_10T" ,
664
664
"model" : " Electra Washbasin Faucet" ,
665
665
"battery_type" : " 2CR5"
666
666
},
667
+ {
668
+ "manufacturer" : " Orbit BHyve" ,
669
+ "model" : " HT25-0000" ,
670
+ "battery_type" : " AA" ,
671
+ "battery_quantity" : 2
672
+ },
667
673
{
668
674
"manufacturer" : " ORVIBO" ,
669
675
"model" : " e70f96b3773a4c9283c6862dbafb6a99" ,
1394
1400
"battery_quantity" : 2
1395
1401
}
1396
1402
]
1397
- }
1403
+ }
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.3.0 "
12
+ "version" : " 1.3.1 "
13
13
}
You can’t perform that action at this time.
0 commit comments