Remove Workday YAML configuration (#94102)

Remove platform yaml from workday
This commit is contained in:
G Johansson 2023-06-12 11:27:37 +02:00 committed by GitHub
parent 4d3db038d6
commit f2cf92050a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 2 additions and 297 deletions

View file

@ -155,33 +155,6 @@ class WorkdayConfigFlow(ConfigFlow, domain=DOMAIN):
"""Get the options flow for this handler."""
return WorkdayOptionsFlowHandler(config_entry)
async def async_step_import(self, config: dict[str, Any]) -> FlowResult:
"""Import a configuration from config.yaml."""
abort_match = {
CONF_COUNTRY: config[CONF_COUNTRY],
CONF_EXCLUDES: config[CONF_EXCLUDES],
CONF_OFFSET: config[CONF_OFFSET],
CONF_WORKDAYS: config[CONF_WORKDAYS],
CONF_ADD_HOLIDAYS: config[CONF_ADD_HOLIDAYS],
CONF_REMOVE_HOLIDAYS: config[CONF_REMOVE_HOLIDAYS],
CONF_PROVINCE: config.get(CONF_PROVINCE),
}
new_config = config.copy()
new_config[CONF_PROVINCE] = config.get(CONF_PROVINCE)
LOGGER.debug("Importing with %s", new_config)
self._async_abort_entries_match(abort_match)
self.data[CONF_NAME] = config.get(CONF_NAME, DEFAULT_NAME)
self.data[CONF_COUNTRY] = config[CONF_COUNTRY]
LOGGER.debug(
"No duplicate, next step with name %s for country %s",
self.data[CONF_NAME],
self.data[CONF_COUNTRY],
)
return await self.async_step_options(user_input=new_config)
async def async_step_user(
self, user_input: dict[str, Any] | None = None
) -> FlowResult: