mirror of
https://github.com/magico13/ha-emporia-vue.git
synced 2026-01-09 20:37:59 -05:00
Try setting default values when reading config
This commit is contained in:
@@ -76,10 +76,10 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
|
||||
|
||||
hass.data[DOMAIN][entry.entry_id] = {
|
||||
VUE_DATA: vue,
|
||||
ENABLE_1S: entry_data[ENABLE_1S],
|
||||
ENABLE_1M: entry_data[ENABLE_1M],
|
||||
ENABLE_1D: entry_data[ENABLE_1D],
|
||||
ENABLE_1MON: entry_data[ENABLE_1MON]
|
||||
ENABLE_1S: False if ENABLE_1S not in entry_data else entry_data[ENABLE_1S],
|
||||
ENABLE_1M: True if ENABLE_1M not in entry_data[ENABLE_1M] else entry_data[ENABLE_1M],
|
||||
ENABLE_1D: True if ENABLE_1D not in entry_data else entry_data[ENABLE_1D],
|
||||
ENABLE_1MON: True if ENABLE_1MON not in entry_data else entry_data[ENABLE_1MON]
|
||||
}
|
||||
|
||||
for component in PLATFORMS:
|
||||
|
||||
Reference in New Issue
Block a user