File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed
homeassistant/components/co2signal Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 3838
3939_LOGGER = logging .getLogger (__name__ )
4040
41+ DESCRIPTION_PLACEHOLDER = {
42+ "register_link" : "https://electricitymaps.com/free-tier" ,
43+ }
44+
4145
4246class ElectricityMapsConfigFlow (ConfigFlow , domain = DOMAIN ):
4347 """Handle a config flow for Co2signal."""
@@ -70,6 +74,7 @@ async def async_step_user(
7074 return self .async_show_form (
7175 step_id = "user" ,
7276 data_schema = data_schema ,
77+ description_placeholders = DESCRIPTION_PLACEHOLDER ,
7378 )
7479
7580 data = {CONF_API_KEY : user_input [CONF_API_KEY ]}
@@ -179,4 +184,5 @@ async def _validate_and_create(
179184 step_id = step_id ,
180185 data_schema = data_schema ,
181186 errors = errors ,
187+ description_placeholders = DESCRIPTION_PLACEHOLDER ,
182188 )
Original file line number Diff line number Diff line change 1818 status : todo
1919 comment : |
2020 The config flow misses data descriptions.
21- Remove URLs from data descriptions, they should be replaced with placeholders.
2221 Make use of Electricity Maps zone keys in country code as dropdown.
2322 Make use of location selector for coordinates.
2423 dependency-transparency : done
Original file line number Diff line number Diff line change 66 "location" : " [%key:common::config_flow::data::location%]" ,
77 "api_key" : " [%key:common::config_flow::data::access_token%]"
88 },
9- "description" : " Visit https://electricitymaps.com/free-tier to request a token."
9+ "description" : " Visit the [Electricity Maps page]({register_link}) to request a token."
1010 },
1111 "coordinates" : {
1212 "data" : {
You can’t perform that action at this time.
0 commit comments