File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
custom_components/battery_notes Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -111,8 +111,9 @@ async def async_step_user(
111
111
device_id = user_input [CONF_DEVICE_ID ]
112
112
113
113
if DOMAIN in self .hass .data :
114
- coordinator = self .hass .data [DOMAIN ][DATA_UPDATE_COORDINATOR ]
115
- await coordinator .async_refresh ()
114
+ if DATA_UPDATE_COORDINATOR in self .hass .data [DOMAIN ]:
115
+ coordinator = self .hass .data [DOMAIN ][DATA_UPDATE_COORDINATOR ]
116
+ await coordinator .async_refresh ()
116
117
117
118
device_registry = dr .async_get (self .hass )
118
119
device_entry = device_registry .async_get (device_id )
@@ -140,9 +141,10 @@ async def async_step_user(
140
141
schema = DEVICE_SCHEMA
141
142
# If show_all_devices = is specified and true, don't filter
142
143
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
144
+ if DOMAIN_CONFIG in self .hass .data [DOMAIN ]:
145
+ domain_config = self .hass .data [DOMAIN ][DOMAIN_CONFIG ]
146
+ if domain_config .get (CONF_SHOW_ALL_DEVICES , False ):
147
+ schema = DEVICE_SCHEMA_ALL
146
148
147
149
return self .async_show_form (
148
150
step_id = "user" ,
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.1 "
12
+ "version" : " 1.3.2 "
13
13
}
You can’t perform that action at this time.
0 commit comments