@@ -99,7 +99,7 @@ async def convert_lovelace(hass: HomeAssistant):
99
99
"""Convert the lovelace configuration."""
100
100
if os .path .exists (hass .config .path (".storage/lovelace" )):
101
101
content = (
102
- json .loads (read_file (hass , ".storage/lovelace" ) or {})
102
+ json .loads (await read_file (hass , ".storage/lovelace" ) or {})
103
103
.get ("data" , {})
104
104
.get ("config" , {})
105
105
)
@@ -131,7 +131,7 @@ async def write_file(
131
131
def write ():
132
132
with open (hass .config .path (path ), "w" ) as open_file :
133
133
if as_yaml :
134
- yaml .dump (content , open_file , default_flow_style = False )
134
+ yaml .dump (content , open_file , default_flow_style = False , allow_unicode = True )
135
135
else :
136
136
open_file .write (content )
137
137
@@ -147,7 +147,7 @@ async def service_generate(_call):
147
147
if hass .data [DOMAIN_DATA ].get ("convert" ) or hass .data [DOMAIN_DATA ].get (
148
148
"convert_lovelace"
149
149
):
150
- convert_lovelace (hass )
150
+ await convert_lovelace (hass )
151
151
152
152
custom_components = await get_custom_integrations (hass )
153
153
hacs_components = get_hacs_components ()
@@ -184,7 +184,7 @@ def get_hacs_components():
184
184
"name" : get_repository_name (repo ),
185
185
"documentation" : f"https://github.com/{ repo .data .full_name } " ,
186
186
}
187
- for repo in hacs .repositories or []
187
+ for repo in hacs .repositories or [] if repo . data . installed
188
188
]
189
189
190
190
0 commit comments