* Add last_reset to trigger based template sensors
* Add last_reset to state based template sensors
* CI check fixes
* Add pytests
* Add test cases for last_reset datetime parsing
* Add test for static last_reset value
* Fix ruff-format
* Fix matter light color modes
* Make onoff light fixture only onoff
* Make dimmable light only a dimmable light
* Make color temp light fixture only a color temp light
* Add invert option to switch_as_x
* Store invert flag in entity options
* Add options flow
* Update strings
* Add tests
* Address review comment
* Update homeassistant/components/switch_as_x/strings.json
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Address review comments
* Inline get_suggested which was only used once in tests
* Address review comments
---------
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Add sensor for exposing Summation Received from Metering cluster
* Ruff format
* Test updates for new sensor
* Update test_sensor.py to support summation_received
* Correct report_count for smart meterning and some pylint warning fixes
* Add bangolufsen integration
* add untested files to .coveragerc
* Simplify integration to media_player platform
* Remove missing files from .coveragerc
* Add beolink_set_relative_volume custom service
Tweaks
* Remove custom services
Remove grouping as it was dependent on custom services
* Update API to 3.2.1.150.0
Reduce and optimize code with feedback from joostlek
Tweaks
* Updated testing
* Remove unused options schema
* Fix bugfix setting wrong state
* Fix wrong initial state
* Bump API
* Fix Beosound Level not reconnecting properly
* Remove unused constant
* Fix wrong variable checked to determine source
* Update integration with feedback from emontnemery
* Update integration with feedback from emontnemery
* Remove unused code
* Move API client into dataclass
Fix not all config_flow exceptions caught
Tweaks
* Add Bang & Olufsen brand
* Revert "Add Bang & Olufsen brand"
This reverts commit 57b2722078.
* Remove volume options from setup
Simplify device checks
rename integration to bang_olufsen
update tests to pass
Update API
* Remove _device from base
Add _device to websocket
* Move SW version device update to websocket
Sort websocket variables
* Add WebSocket connection test
* Remove unused constants
* Remove confirmation form
Make discovered devices get added to Home Assistant immediately
Fix device not being available on mdns discovery
Change config flow aborts to forms with error
* Update tests for new config_flow
Add missing api_exception test
* Restrict manual and discovered IP addresses to IPv4
* Re-add confirmation step for zeroconf discovery
Improve error messages
Move exception mapping dict to module level
* Enable remote control WebSocket listener
* Update tests
* Update device config for SETUP_RETRY and use CONF_HOST on startup
* Make entry state checks use a constant
Co-authored-by: J. Nick Koston <nick@koston.org>
* Update tests
---------
Co-authored-by: J. Nick Koston <nick@koston.org>
* Randomize thread network names
* Use PAN ID as network name suffix
* Apply suggestions from code review
Co-authored-by: Stefan Agner <stefan@agner.ch>
* Update tests
* Format code
* Change format of network name again
---------
Co-authored-by: Stefan Agner <stefan@agner.ch>
* Mark home_plus_control a virtual integration using Netatmo
* Apply code review suggestion
Co-authored-by: Robert Resch <robert@resch.dev>
---------
Co-authored-by: Robert Resch <robert@resch.dev>
* add sensor platform
* transl. of distance already covered by dev.class
* add untested files to .coveragerc
* add missing state translations
* remove translation key for distance sensor
* proximity entity do not use HA number system
* fix
* extend tests
* make const final to be usable as key for TypedDict
* remove proximity from .coveragerc
* replace typeddict by simple dict definition
* make black happy
* rework to create proximity sensor for each tracked entity and always recalculate all entites
* apply review comments
* move direction of travel calc out of the loop
* make direction of travel an enum sensor
* remove unique_id from sensors
* don't set distance=0 when in monitored zone
* set None when direction is unknown
* keep distance 0 in case arrived for legacy entity
* exclude from nearest when in ignored zone
* keep distance=0 when arrived
* use description name for entity name
* remove uneeded typing
* uses consistent variable name
* fix debug messages
* use entity_id as loop var
* rename device_state to tracked_entity_state
* correct MRO for sensor entity classes
* Group sensor calculate attributes
* Use entity helpers
* Fix sensor tests
* Test change of uom
* Add tests and fix UoM issue
* Fix test
* Fix state class
* repair and logs
* delete issues
* pass through hass
* Update descriotion text to be more descriptive
* Comments
* Add pr to comment
* fix if in updating
* Fix test valid units
* Fix strings
* Fix issues
* Add zeroconf to TechnoVE integration
* Update homeassistant/components/technove/config_flow.py
Co-authored-by: Teemu R. <tpr@iki.fi>
* Update zeroconf test to test if update is called.
When a station is already configured and it is re-discovered through zeroconf, make sure we don't call its API for nothing.
* 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>
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>
* 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>