Shai Ungar
e0c785b2b4
Add coordinator to 17Track ( #115057 )
...
* Add coordinator to 17Track
* Add coordinator to 17Track
remove SensorEntityDescription (different PR)
* Update homeassistant/components/seventeentrack/coordinator.py
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Update homeassistant/components/seventeentrack/sensor.py
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Add coordinator to 17Track
fix CR
* Add coordinator to 17Track
fix second CR
* Add coordinator to 17Track
remove commented out code + fix display name
* Add coordinator to 17Track
created a set outside _async_create_remove_entities function
* Add coordinator to 17Track
fix CR
* Add coordinator to 17Track
fix CR 2
* Update homeassistant/components/seventeentrack/coordinator.py
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Add coordinator to 17Track
raise UpdateFailed if API throws an exception
* Add coordinator to 17Track
merge calls
---------
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-04-23 09:01:45 +02:00
Sid
0200d1aa66
Unignore Ruff UP006, UP007 ( #115533 )
2024-04-14 00:26:58 -05:00
Shai Ungar
3c06fbbd82
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 12:47:39 +01:00
Shai Ungar
eb81bf1d49
Improve 17track tests ( #112734 )
...
* 17Track tests
* add 17Track sensor to coverage
* extract repeated code
* 1. _goto_future - call tick only once
2. change test name to reflect test
3. remove ifs from test
* remove undersocre from _goto_future
2024-03-10 18:57:28 +01:00