core/homeassistant/components/seventeentrack/strings.json

119 lines
4.6 KiB
JSON
Raw Normal View History

Add ConfigFlow for seventeentrack integration (#111196) * Add config flow to 17Track * Import config from configuration.yaml * 1. move import to async_setup_platform 2. add USERNAME (email) in title for uniqueness * Add options flow * Add tests * Add CONF_SHOW_ARCHIVED and CONF_SHOW_DELIVERED to data from options * Update homeassistant/components/seventeentrack/__init__.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/__init__.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/config_flow.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/manifest.json Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/config_flow.py Co-authored-by: Christopher Fenner <9592452+CFenner@users.noreply.github.com> * Update homeassistant/components/seventeentrack/__init__.py Co-authored-by: Christopher Fenner <9592452+CFenner@users.noreply.github.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Christopher Fenner <9592452+CFenner@users.noreply.github.com> * 1. Added repair issues 2. _async_validate_input inlined 3. added unique id 4. take default scan interval * fix * 1. move async_create_issue to async_setup_platform 2. fix tests 3. black + pylint * combine USER_SCHEMA and OPTIONS_SCHEMA * small fix * remove async_setup * fix tests and add 100% coverage * 1. remove CONFIG_SCHEMA 2. remove error log 3. add issue with more description when import issues happen 4. some linting * Update homeassistant/components/seventeentrack/config_flow.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * use freezer use AsyncMock fix tests * add test_flow_fails parametrize tests where needed test_import_flow_already_configured - where a unique id already configured (abort flow) * lint * fix rebase issues * some more fix * 17Track revert tests and put them in a different PR * adapt tests to MockConfigEntry * Update tests/components/seventeentrack/test_sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update tests/components/seventeentrack/__init__.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * 1. create fixture for config and another with options 2. set options with default values 3. remove CONFIG_SCHEMA * Update tests/components/seventeentrack/conftest.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update tests/components/seventeentrack/conftest.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * 1. get options from import data and default if not present 2. rename mock_config_entry_no_options -> mock_config_entry_with_default_options * move ACCOUNT_ID to mock_seventeentrack_api.return_value.profile.account_id * Apply suggestions from code review * Update tests/components/seventeentrack/test_config_flow.py --------- Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> Co-authored-by: Christopher Fenner <9592452+CFenner@users.noreply.github.com>
2024-03-11 11:47:39 +00:00
{
"config": {
"step": {
"user": {
"data": {
"username": "[%key:common::config_flow::data::username%]",
"password": "[%key:common::config_flow::data::password%]"
}
}
},
"abort": {
"already_configured": "[%key:common::config_flow::abort::already_configured_service%]",
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]",
"invalid_auth": "[%key:common::config_flow::error::invalid_auth%]"
Add ConfigFlow for seventeentrack integration (#111196) * Add config flow to 17Track * Import config from configuration.yaml * 1. move import to async_setup_platform 2. add USERNAME (email) in title for uniqueness * Add options flow * Add tests * Add CONF_SHOW_ARCHIVED and CONF_SHOW_DELIVERED to data from options * Update homeassistant/components/seventeentrack/__init__.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/__init__.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/config_flow.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/manifest.json Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/config_flow.py Co-authored-by: Christopher Fenner <9592452+CFenner@users.noreply.github.com> * Update homeassistant/components/seventeentrack/__init__.py Co-authored-by: Christopher Fenner <9592452+CFenner@users.noreply.github.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Christopher Fenner <9592452+CFenner@users.noreply.github.com> * 1. Added repair issues 2. _async_validate_input inlined 3. added unique id 4. take default scan interval * fix * 1. move async_create_issue to async_setup_platform 2. fix tests 3. black + pylint * combine USER_SCHEMA and OPTIONS_SCHEMA * small fix * remove async_setup * fix tests and add 100% coverage * 1. remove CONFIG_SCHEMA 2. remove error log 3. add issue with more description when import issues happen 4. some linting * Update homeassistant/components/seventeentrack/config_flow.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * use freezer use AsyncMock fix tests * add test_flow_fails parametrize tests where needed test_import_flow_already_configured - where a unique id already configured (abort flow) * lint * fix rebase issues * some more fix * 17Track revert tests and put them in a different PR * adapt tests to MockConfigEntry * Update tests/components/seventeentrack/test_sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update tests/components/seventeentrack/__init__.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * 1. create fixture for config and another with options 2. set options with default values 3. remove CONFIG_SCHEMA * Update tests/components/seventeentrack/conftest.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update tests/components/seventeentrack/conftest.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * 1. get options from import data and default if not present 2. rename mock_config_entry_no_options -> mock_config_entry_with_default_options * move ACCOUNT_ID to mock_seventeentrack_api.return_value.profile.account_id * Apply suggestions from code review * Update tests/components/seventeentrack/test_config_flow.py --------- Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> Co-authored-by: Christopher Fenner <9592452+CFenner@users.noreply.github.com>
2024-03-11 11:47:39 +00:00
},
"error": {
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]",
"invalid_auth": "[%key:common::config_flow::error::invalid_auth%]"
Add ConfigFlow for seventeentrack integration (#111196) * Add config flow to 17Track * Import config from configuration.yaml * 1. move import to async_setup_platform 2. add USERNAME (email) in title for uniqueness * Add options flow * Add tests * Add CONF_SHOW_ARCHIVED and CONF_SHOW_DELIVERED to data from options * Update homeassistant/components/seventeentrack/__init__.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/__init__.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/config_flow.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/manifest.json Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/config_flow.py Co-authored-by: Christopher Fenner <9592452+CFenner@users.noreply.github.com> * Update homeassistant/components/seventeentrack/__init__.py Co-authored-by: Christopher Fenner <9592452+CFenner@users.noreply.github.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Christopher Fenner <9592452+CFenner@users.noreply.github.com> * 1. Added repair issues 2. _async_validate_input inlined 3. added unique id 4. take default scan interval * fix * 1. move async_create_issue to async_setup_platform 2. fix tests 3. black + pylint * combine USER_SCHEMA and OPTIONS_SCHEMA * small fix * remove async_setup * fix tests and add 100% coverage * 1. remove CONFIG_SCHEMA 2. remove error log 3. add issue with more description when import issues happen 4. some linting * Update homeassistant/components/seventeentrack/config_flow.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * use freezer use AsyncMock fix tests * add test_flow_fails parametrize tests where needed test_import_flow_already_configured - where a unique id already configured (abort flow) * lint * fix rebase issues * some more fix * 17Track revert tests and put them in a different PR * adapt tests to MockConfigEntry * Update tests/components/seventeentrack/test_sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update tests/components/seventeentrack/__init__.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * 1. create fixture for config and another with options 2. set options with default values 3. remove CONFIG_SCHEMA * Update tests/components/seventeentrack/conftest.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update tests/components/seventeentrack/conftest.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * 1. get options from import data and default if not present 2. rename mock_config_entry_no_options -> mock_config_entry_with_default_options * move ACCOUNT_ID to mock_seventeentrack_api.return_value.profile.account_id * Apply suggestions from code review * Update tests/components/seventeentrack/test_config_flow.py --------- Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> Co-authored-by: Christopher Fenner <9592452+CFenner@users.noreply.github.com>
2024-03-11 11:47:39 +00:00
}
},
"exceptions": {
"invalid_config_entry": {
"message": "Invalid config entry provided. Got {config_entry_id}"
},
"unloaded_config_entry": {
"message": "Invalid config entry provided. {config_entry_id} is not loaded."
}
},
Add ConfigFlow for seventeentrack integration (#111196) * Add config flow to 17Track * Import config from configuration.yaml * 1. move import to async_setup_platform 2. add USERNAME (email) in title for uniqueness * Add options flow * Add tests * Add CONF_SHOW_ARCHIVED and CONF_SHOW_DELIVERED to data from options * Update homeassistant/components/seventeentrack/__init__.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/__init__.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/config_flow.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/manifest.json Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/config_flow.py Co-authored-by: Christopher Fenner <9592452+CFenner@users.noreply.github.com> * Update homeassistant/components/seventeentrack/__init__.py Co-authored-by: Christopher Fenner <9592452+CFenner@users.noreply.github.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Christopher Fenner <9592452+CFenner@users.noreply.github.com> * 1. Added repair issues 2. _async_validate_input inlined 3. added unique id 4. take default scan interval * fix * 1. move async_create_issue to async_setup_platform 2. fix tests 3. black + pylint * combine USER_SCHEMA and OPTIONS_SCHEMA * small fix * remove async_setup * fix tests and add 100% coverage * 1. remove CONFIG_SCHEMA 2. remove error log 3. add issue with more description when import issues happen 4. some linting * Update homeassistant/components/seventeentrack/config_flow.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * use freezer use AsyncMock fix tests * add test_flow_fails parametrize tests where needed test_import_flow_already_configured - where a unique id already configured (abort flow) * lint * fix rebase issues * some more fix * 17Track revert tests and put them in a different PR * adapt tests to MockConfigEntry * Update tests/components/seventeentrack/test_sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update tests/components/seventeentrack/__init__.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * 1. create fixture for config and another with options 2. set options with default values 3. remove CONFIG_SCHEMA * Update tests/components/seventeentrack/conftest.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update tests/components/seventeentrack/conftest.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * 1. get options from import data and default if not present 2. rename mock_config_entry_no_options -> mock_config_entry_with_default_options * move ACCOUNT_ID to mock_seventeentrack_api.return_value.profile.account_id * Apply suggestions from code review * Update tests/components/seventeentrack/test_config_flow.py --------- Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> Co-authored-by: Christopher Fenner <9592452+CFenner@users.noreply.github.com>
2024-03-11 11:47:39 +00:00
"options": {
"step": {
"init": {
"description": "Configure general settings",
"data": {
"show_archived": "Whether sensors should be created for archived packages",
"show_delivered": "Whether sensors should be created for delivered packages"
}
}
}
},
"issues": {
"deprecated_yaml_import_issue_cannot_connect": {
"title": "The 17Track YAML configuration import cannot connect to server",
"description": "Configuring 17Track using YAML is being removed but there was a connection error importing your YAML configuration.\n\nThings you can try:\nMake sure your home assistant can reach the web.\n\nThen restart Home Assistant to try importing this integration again.\n\nAlternatively, you may remove the 17Track configuration from your YAML configuration entirely, restart Home Assistant, and add the 17Track integration manually."
},
"deprecated_yaml_import_issue_invalid_auth": {
"title": "The 17Track YAML configuration import request failed due to invalid authentication",
Add ConfigFlow for seventeentrack integration (#111196) * Add config flow to 17Track * Import config from configuration.yaml * 1. move import to async_setup_platform 2. add USERNAME (email) in title for uniqueness * Add options flow * Add tests * Add CONF_SHOW_ARCHIVED and CONF_SHOW_DELIVERED to data from options * Update homeassistant/components/seventeentrack/__init__.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/__init__.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/config_flow.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/manifest.json Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/config_flow.py Co-authored-by: Christopher Fenner <9592452+CFenner@users.noreply.github.com> * Update homeassistant/components/seventeentrack/__init__.py Co-authored-by: Christopher Fenner <9592452+CFenner@users.noreply.github.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Christopher Fenner <9592452+CFenner@users.noreply.github.com> * 1. Added repair issues 2. _async_validate_input inlined 3. added unique id 4. take default scan interval * fix * 1. move async_create_issue to async_setup_platform 2. fix tests 3. black + pylint * combine USER_SCHEMA and OPTIONS_SCHEMA * small fix * remove async_setup * fix tests and add 100% coverage * 1. remove CONFIG_SCHEMA 2. remove error log 3. add issue with more description when import issues happen 4. some linting * Update homeassistant/components/seventeentrack/config_flow.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * use freezer use AsyncMock fix tests * add test_flow_fails parametrize tests where needed test_import_flow_already_configured - where a unique id already configured (abort flow) * lint * fix rebase issues * some more fix * 17Track revert tests and put them in a different PR * adapt tests to MockConfigEntry * Update tests/components/seventeentrack/test_sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update tests/components/seventeentrack/__init__.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * 1. create fixture for config and another with options 2. set options with default values 3. remove CONFIG_SCHEMA * Update tests/components/seventeentrack/conftest.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update tests/components/seventeentrack/conftest.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * 1. get options from import data and default if not present 2. rename mock_config_entry_no_options -> mock_config_entry_with_default_options * move ACCOUNT_ID to mock_seventeentrack_api.return_value.profile.account_id * Apply suggestions from code review * Update tests/components/seventeentrack/test_config_flow.py --------- Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> Co-authored-by: Christopher Fenner <9592452+CFenner@users.noreply.github.com>
2024-03-11 11:47:39 +00:00
"description": "Configuring 17Track using YAML is being removed but there were invalid credentials provided while importing your existing configuration.\nSetup will not proceed.\n\nVerify that your 17Track credentials are correct and restart Home Assistant to attempt the import again.\n\nAlternatively, you may remove the 17Track configuration from your YAML configuration entirely, restart Home Assistant, and add the 17Track integration manually."
},
"deprecate_sensor": {
"title": "17Track package sensors are being deprecated",
"fix_flow": {
"step": {
"confirm": {
"title": "[%key:component::seventeentrack::issues::deprecate_sensor::title%]",
"description": "17Track package sensors are deprecated and will be removed.\nPlease update your automations and scripts to get data using the `seventeentrack.get_packages` action."
}
}
}
Add ConfigFlow for seventeentrack integration (#111196) * Add config flow to 17Track * Import config from configuration.yaml * 1. move import to async_setup_platform 2. add USERNAME (email) in title for uniqueness * Add options flow * Add tests * Add CONF_SHOW_ARCHIVED and CONF_SHOW_DELIVERED to data from options * Update homeassistant/components/seventeentrack/__init__.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/__init__.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/config_flow.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/manifest.json Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/config_flow.py Co-authored-by: Christopher Fenner <9592452+CFenner@users.noreply.github.com> * Update homeassistant/components/seventeentrack/__init__.py Co-authored-by: Christopher Fenner <9592452+CFenner@users.noreply.github.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Christopher Fenner <9592452+CFenner@users.noreply.github.com> * 1. Added repair issues 2. _async_validate_input inlined 3. added unique id 4. take default scan interval * fix * 1. move async_create_issue to async_setup_platform 2. fix tests 3. black + pylint * combine USER_SCHEMA and OPTIONS_SCHEMA * small fix * remove async_setup * fix tests and add 100% coverage * 1. remove CONFIG_SCHEMA 2. remove error log 3. add issue with more description when import issues happen 4. some linting * Update homeassistant/components/seventeentrack/config_flow.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * use freezer use AsyncMock fix tests * add test_flow_fails parametrize tests where needed test_import_flow_already_configured - where a unique id already configured (abort flow) * lint * fix rebase issues * some more fix * 17Track revert tests and put them in a different PR * adapt tests to MockConfigEntry * Update tests/components/seventeentrack/test_sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update tests/components/seventeentrack/__init__.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * 1. create fixture for config and another with options 2. set options with default values 3. remove CONFIG_SCHEMA * Update tests/components/seventeentrack/conftest.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update tests/components/seventeentrack/conftest.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * 1. get options from import data and default if not present 2. rename mock_config_entry_no_options -> mock_config_entry_with_default_options * move ACCOUNT_ID to mock_seventeentrack_api.return_value.profile.account_id * Apply suggestions from code review * Update tests/components/seventeentrack/test_config_flow.py --------- Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> Co-authored-by: Christopher Fenner <9592452+CFenner@users.noreply.github.com>
2024-03-11 11:47:39 +00:00
}
},
"entity": {
"sensor": {
"not_found": {
"name": "Not found"
},
"in_transit": {
"name": "In transit"
},
"expired": {
"name": "Expired"
},
"ready_to_be_picked_up": {
"name": "Ready to be picked up"
},
"undelivered": {
"name": "Undelivered"
},
"delivered": {
"name": "Delivered"
},
"returned": {
"name": "Returned"
},
"package": {
"name": "Package {name}"
}
}
},
"services": {
"get_packages": {
"name": "Get packages",
"description": "Get packages from 17Track",
"fields": {
"package_state": {
"name": "Package states",
"description": "Only return packages with the specified states. Returns all packages if not specified."
},
"config_entry_id": {
"name": "17Track service",
"description": "The packages will be retrieved for the selected service."
}
}
}
},
"selector": {
"package_state": {
"options": {
"not_found": "[%key:component::seventeentrack::entity::sensor::not_found::name%]",
"in_transit": "[%key:component::seventeentrack::entity::sensor::in_transit::name%]",
"expired": "[%key:component::seventeentrack::entity::sensor::expired::name%]",
"ready_to_be_picked_up": "[%key:component::seventeentrack::entity::sensor::ready_to_be_picked_up::name%]",
"undelivered": "[%key:component::seventeentrack::entity::sensor::undelivered::name%]",
"delivered": "[%key:component::seventeentrack::entity::sensor::delivered::name%]",
"returned": "[%key:component::seventeentrack::entity::sensor::returned::name%]"
}
}
Add ConfigFlow for seventeentrack integration (#111196) * Add config flow to 17Track * Import config from configuration.yaml * 1. move import to async_setup_platform 2. add USERNAME (email) in title for uniqueness * Add options flow * Add tests * Add CONF_SHOW_ARCHIVED and CONF_SHOW_DELIVERED to data from options * Update homeassistant/components/seventeentrack/__init__.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/__init__.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/config_flow.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/manifest.json Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/config_flow.py Co-authored-by: Christopher Fenner <9592452+CFenner@users.noreply.github.com> * Update homeassistant/components/seventeentrack/__init__.py Co-authored-by: Christopher Fenner <9592452+CFenner@users.noreply.github.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Christopher Fenner <9592452+CFenner@users.noreply.github.com> * 1. Added repair issues 2. _async_validate_input inlined 3. added unique id 4. take default scan interval * fix * 1. move async_create_issue to async_setup_platform 2. fix tests 3. black + pylint * combine USER_SCHEMA and OPTIONS_SCHEMA * small fix * remove async_setup * fix tests and add 100% coverage * 1. remove CONFIG_SCHEMA 2. remove error log 3. add issue with more description when import issues happen 4. some linting * Update homeassistant/components/seventeentrack/config_flow.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * use freezer use AsyncMock fix tests * add test_flow_fails parametrize tests where needed test_import_flow_already_configured - where a unique id already configured (abort flow) * lint * fix rebase issues * some more fix * 17Track revert tests and put them in a different PR * adapt tests to MockConfigEntry * Update tests/components/seventeentrack/test_sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/seventeentrack/sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update tests/components/seventeentrack/__init__.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * 1. create fixture for config and another with options 2. set options with default values 3. remove CONFIG_SCHEMA * Update tests/components/seventeentrack/conftest.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update tests/components/seventeentrack/conftest.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * 1. get options from import data and default if not present 2. rename mock_config_entry_no_options -> mock_config_entry_with_default_options * move ACCOUNT_ID to mock_seventeentrack_api.return_value.profile.account_id * Apply suggestions from code review * Update tests/components/seventeentrack/test_config_flow.py --------- Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> Co-authored-by: Christopher Fenner <9592452+CFenner@users.noreply.github.com>
2024-03-11 11:47:39 +00:00
}
}