* Add time to charge and type checking
* Revert drive_state_shift_state change
* Use original name
* Use function instead of lambda
* Update homeassistant/components/tessie/sensor.py
Co-authored-by: Jan-Philipp Benecke <github@bnck.me>
* Fix callback
* Avoid having to test None
* Go back to if
* Use minutes instead of hours
---------
Co-authored-by: Jan-Philipp Benecke <github@bnck.me>
* Use snapshot testing in Airly sensor
* Apply suggestions from code review
Co-authored-by: Robert Resch <robert@resch.dev>
* Fix tests
---------
Co-authored-by: Robert Resch <robert@resch.dev>
* Add helper function to update and reload config entry to config flow
* Use async_create_task
* Remove await
* Reload only when update & add task name
* Rename function
Fix unifi test_tracked_clients client
This test relied on the sensor platform getting set up and creating
the device before the device_tracker platform was setup since the
device_tracker platform will disable the entity because there is
not matching device entry for it via
4ee6735cbb/homeassistant/components/device_tracker/config_entry.py (L336)
There is no guarantee the sensor platform will get set up before
the device tracker platform so the test was subject to a race
where it would fail if the device tracker platform was setup first
* Send recurrence data when updating a task in todoist
* Update tests/components/todoist/test_todo.py
Co-authored-by: Allen Porter <allen.porter@gmail.com>
* Move logic into _task_api_data.
* Add comment about sending potentinally stale data.
---------
Co-authored-by: Allen Porter <allen.porter@gmail.com>
* Add authentication flows to tplink integration to enable newer device protocol support
* Add websession passing to tplink integration discover methods
* Use SmartDevice.connect()
* Update to use DeviceConfig
* Use credential hashes
* Bump python-kasa to 0.6.0.dev0
* Fix tests and address review comments
* Add autodetection for L530, P110, and L900
This adds mac address prefixes for the devices I have.
The wildcards are left quite lax assuming different series may share the same prefix.
* Bump tplink to 0.6.0.dev1
* Add config flow tests
* Use short_mac if alias is None and try legacy connect on discovery timeout
* Add config_flow tests
* Add init tests
* Migrate to aiohttp
* add some more ouis
* final
* ip change fix
* add fixmes
* fix O(n) searching
* fix O(n) searching
* move code that cannot fail outside of try block
* fix missing reauth_successful string
* add doc strings, cleanups
* error message by password
* dry
* adjust discovery timeout
* integration discovery already formats mac
* tweaks
* cleanups
* cleanups
* Update post review and fix broken tests
* Fix TODOs and FIXMEs in test_config_flow
* Add pragma no cover
* bump, apply suggestions
* remove no cover
* use iden check
* Apply suggestions from code review
* Fix branched test and update integration title
* legacy typing
* Update homeassistant/components/tplink/__init__.py
* lint
* Remove more unused consts
* Update test docstrings
* Add sdb9696 to tplink codeowners
* Update docstring on test for invalid DeviceConfig
* Update test stored credentials test
---------
Co-authored-by: Teemu Rytilahti <tpr@iki.fi>
Co-authored-by: J. Nick Koston <nick@koston.org>
* Adds sensors to the flexit_bacnet integration
* Add one platform at a time
* Removes commented out code
And restores attributes that are needed
* Review changes
* More review fixes
* Adds translations for the flexit_bacnet sensors
* Review comments
* Adds test for flexit_bacnet sensor
* Refactors the sensor test
* Review comment
* Review comment
* Review comments
* Adds coordinator and base entity class
* Patch the coordinator
* Adds device property to base class
And refactors accordingly
* Use const instead of string
* Moves _attr_has_entity_name to base entity
* Argument as positional
* Use device_id from init
* Add fixture for update method
* Mock flexit_bacnet
* Adds test for climate
* Adds snapshot testing
* Adds test for init, refactor test for config flow
* Limit concurrency of startup traffic to allow for interactive usage
* Drop `retryable_req`, we already have request retrying
* Oops, `min` -> `max`
* Add a comment describing why `async_initialize` is not concurrent
* Fix existing unit tests
* Break out fetching mains state into its own function to unit test
* Dynamically map state class, device class and UoM in ZHA smart energy metering sensor
* Fix some state & device classes and add scaling
* Fix added imperial gallons tests
* Use entity description instead of custom class & add one entity to tests
* Apply code review suggestion
* Scale only when needed
* Revert "Scale only when needed"
This reverts commit a9e0403402.
* Avoid second lookup of entity description
* Change test to not mix sensor types
* add Martin's suggestions
* use password description
* fix for reauth + test
* fix invalid_auth test
* Update homeassistant/components/lamarzocco/config_flow.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Avoid duplicate timestamp conversions for websocket api and recorder
We convert the time from datetime to timestamps one per
open websocket connection and the recorder for every
state update. Only do the conversion once since its
~30% of the cost of building the state diff
* more
* two more
* two more in live history
* Adding initial Epion Air integration logic
* Skipping sensors with missing data
* Patching Epion integration
* Adding additional Epion measurement types
* Cleaning up logging
* Cleaning up code
* Fixing error handling for invalid Epion keys
* Adding tests and improving error handling
* Patching Epion tests
* Cleaning up Epion integration code
* Bumping Epion package and including missing files
* Moving data updates to coordinator and addressing feedback
* Improve exception handling
* Exposing model name and firmware version
* Cleaning up code according to review
* Cleaning up code according to review
* Adding check to prevent duplicate account setup
* Refactoring tests and checking for duplicates
* Cleaning up test code according to review
* Cleaning up test code
* Removing entity name overrides
* Fix code format for tests
* Adding missing newlines in JSON files
* Fixing formatting
* Updating device method to always return a device
* Updating coordinator
* keys may be missing at startup
* Add route sensors and tracker location
* Fix keys and add translation
* Allow a sensor to have no value
* Move attribute to sensor
* Remove state attribute string
* Cache construction of is_admin
This has to be checked for a lot of api calls and the websocket
every time the call is made
* Cache construction of is_admin
This has to be checked for a lot of api calls and the websocket
every time the call is made
* Cache construction of is_admin
This has to be checked for a lot of api calls and the websocket
every time the call is made
* modernize
* coverage
* coverage
* verify caching
* verify caching
* fix type
* fix mocking
* add account sensors
* tidy up same issues as other sensors
* add unit tests for sensors
edit and remove comments
assert state and remove HOP sensor types since they aren't being used
* try and fix tests
* add frozen true
* Update tests/components/electric_kiwi/test_sensor.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* return proper native types
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* tidy up attr unique id
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* add entities once and use native values properly
* Improve conftest
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* tidy tests/components/electric_kiwi/test_sensor.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* add assert to component_setup
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* add extra parameters to test
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Update tests/components/electric_kiwi/test_sensor.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Update tests/components/electric_kiwi/test_sensor.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* change coordinator name
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* tidy up sensor translation names
* Apply suggestions from code review
---------
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Fix the fan to support preset modes
* Add more tests and fix some comments
* Don't override inherited member
* Don't check for supported feature as the check is already performed before here
* Do not check for feature on properties
* Update homeassistant/components/smartthings/fan.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Fix tests
---------
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Fix missing timeout exception check in powerwall config flow
powerwall recently switched to asyncio, and every place we
check for unreachable we need to check for timeout error.
There was one missed
```
09:08 homeassistant homeassistant[546]: 2024-01-12 10:09:08.899 ERROR (MainThread) [homeassistant.components.powerwall.config_flow] Unexpected exception
Jan 12 20:09:08 homeassistant homeassistant[546]: Traceback (most recent call last):
Jan 12 20:09:08 homeassistant homeassistant[546]: File "/usr/src/homeassistant/homeassistant/components/powerwall/config_flow.py", line 168, in _async_try_connect
Jan 12 20:09:08 homeassistant homeassistant[546]: info = await validate_input(self.hass, user_input)
Jan 12 20:09:08 homeassistant homeassistant[546]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 12 20:09:08 homeassistant homeassistant[546]: File "/usr/src/homeassistant/homeassistant/components/powerwall/config_flow.py", line 76, in validate_input
Jan 12 20:09:08 homeassistant homeassistant[546]: site_info, gateway_din = await _login_and_fetch_site_info(
Jan 12 20:09:08 homeassistant homeassistant[546]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 12 20:09:08 homeassistant homeassistant[546]: File "/usr/src/homeassistant/homeassistant/components/powerwall/config_flow.py", line 43, in _login_and_fetch_site_info
Jan 12 20:09:08 homeassistant homeassistant[546]: await power_wall.login(password)
Jan 12 20:09:08 homeassistant homeassistant[546]: File "/usr/local/lib/python3.12/site-packages/tesla_powerwall/powerwall.py", line 58, in login
Jan 12 20:09:08 homeassistant homeassistant[546]: return await self.login_as(User.CUSTOMER, password, email, force_sm_off)
Jan 12 20:09:08 homeassistant homeassistant[546]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 12 20:09:08 homeassistant homeassistant[546]: File "/usr/local/lib/python3.12/site-packages/tesla_powerwall/powerwall.py", line 49, in login_as
Jan 12 20:09:08 homeassistant homeassistant[546]: response = await self._api.login(user, email, password, force_sm_off)
Jan 12 20:09:08 homeassistant homeassistant[546]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 12 20:09:08 homeassistant homeassistant[546]: File "/usr/local/lib/python3.12/site-packages/tesla_powerwall/api.py", line 172, in login
Jan 12 20:09:08 homeassistant homeassistant[546]: return await self.post(
Jan 12 20:09:08 homeassistant homeassistant[546]: ^^^^^^^^^^^^^^^^
Jan 12 20:09:08 homeassistant homeassistant[546]: File "/usr/local/lib/python3.12/site-packages/tesla_powerwall/api.py", line 146, in post
Jan 12 20:09:08 homeassistant homeassistant[546]: response = await self._http_session.post(
Jan 12 20:09:08 homeassistant homeassistant[546]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 12 20:09:08 homeassistant homeassistant[546]: File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 601, in _request
Jan 12 20:09:08 homeassistant homeassistant[546]: await resp.start(conn)
Jan 12 20:09:08 homeassistant homeassistant[546]: File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 960, in start
Jan 12 20:09:08 homeassistant homeassistant[546]: with self._timer:
Jan 12 20:09:08 homeassistant homeassistant[546]: File "/usr/local/lib/python3.12/site-packages/aiohttp/helpers.py", line 735, in __exit__
Jan 12 20:09:08 homeassistant homeassistant[546]: raise asyncio.TimeoutError from None
Jan 12 20:09:08 homeassistant homeassistant[546]: TimeoutError
```
* cov
* First checkin for myUplink
* Refactored coordinator and sensor state classe
* Updated .coveragerc
* Update test_config_flow
* Fix test_config_flow for myuplink
* Only set state class for temperature sensor
* PR comment updates
* Type strong dict
* use asyncio.timeouts
* PR updates (part 1)
* Updated to myuplink 0.0.9
* Add strict typing
* Fix typing
* Inherit CoordinatorEntity
* Clean up coordinator and sensors
* Use common base entity
* Improve device point sensor
* Exclude entity from coverage
* Set device point entity name if there's no entity description
* Update homeassistant/components/myuplink/sensor.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/myuplink/entity.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/myuplink/entity.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Remvoed firmware + connstate sensors
* Always add device point parameter name
* Removed MyUplinkDeviceSensor
* Removed unused class
* key="celsius",
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Startup mechanic
* Workable service (again)
* Optimized version, for now
* Minor refactoring
* Test cases
* Fixing test case
* Adding startup comment
* State_unknown added
* Update homeassistant/components/fastdotcom/services.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Check if config entries are not found
* Update tests/components/fastdotcom/test_service.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/fastdotcom/services.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/fastdotcom/services.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* switcher: added support for device_key logic included in aioswitcher==3.4.1
* switcher: small fix
* switcher: after lint
* switcher: fix missing device_key in tests
* remove device_key function
* fix missing device_key in tests
* improvements
* wait another second before creating the entry
* move delay to lib
* move library bump to separate PR
* move available back to lock from entity
* Add unique home ID device dispatch
* Adding fixture for new setup
* Minor refactor work
* Add check for unlinked to different homes
* If the interface returns an error
* Proper error handling
* Feedback fixes
* Comments for error in client
* Typo
* Update homeassistant/components/tado/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/tado/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update devices fix standard
* Dispatch out of loop
* Update dispatcher
* Clean up
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Prevent toggle from calling stop on covers which do not support it
* Update homeassistant/components/cover/__init__.py
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>