Commit Graph

14912 Commits (9306e0371e6082c84c6d5f502512504c934e6b6d)

Author SHA1 Message Date
mkmer 7368c86ecb
Add Reauth config flow to honeywell (#86170) 2023-01-30 13:57:14 +01:00
epenet 7e7a27f8b9
Add type hints to http client fixtures (#86795) 2023-01-30 13:40:07 +01:00
Nick Touran d2e75e4f7a
Add Autofocus, IR lamp, and Wiper switches in ONVIF (#84317)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-01-30 12:08:07 +01:00
Maciej Bieniek d485630ce9
Use device class ENUM for Accuweather pressure tendency sensor (#86887)
* Use device class ENUM for pressure tendency sensor

* Format
2023-01-30 12:03:23 +01:00
Franck Nijhof a4fa0925b7
Small improvement to Withings tests (#86937) 2023-01-30 11:03:42 +01:00
Franck Nijhof c56832bb2c
Enable Ruff SIM300 (#86793) 2023-01-30 11:03:23 +01:00
Franck Nijhof 9ac8f9aa37
Revert "Adjust D-Link entity naming" (#86936) 2023-01-30 10:56:56 +01:00
Robert Hillis 709d1cb8af
Adjust D-Link entity naming (#86906) 2023-01-30 10:29:12 +01:00
J. Nick Koston 0f4b17755e
Improve logging and handling when websocket gets behind (#86854)
fixes undefined
2023-01-29 10:49:27 -10:00
J. Nick Koston c612a92cfb
Use python defaults for comparing State, LazyState, and Event objects (#86856)
* Speed up comparing State and Event objects

Use default python implementation for State and Event __hash__ and __eq__

The default implementation compared based on the id() of the object
which is effectively what we want here anyways. These overrides are
left over from the days when these used to be attrs objects

By avoiding implementing these ourselves all of the equality checks
can happen in native code

* tweak

* adjust tests

* write out some more

* fix test to not compare objects

* more test fixes

* more test fixes

* correct stats tests

* fix more tests

* fix more tests

* update sensor recorder tests
2023-01-29 13:31:43 -05:00
J. Nick Koston 691a234090
Cache the names and area lists in the default agent (#86874)
* Cache the names and area lists in the default agent

fixes #86803

* add coverage to make sure the entity cache busts

* add areas test

* cover the last line
2023-01-29 07:16:29 -05:00
Martin Hjelmare b1e939d1f1
Fix tradfri air quality device class (#86861) 2023-01-28 22:05:31 -05:00
PeteRager a7ddd592fb
Nest improve error message on climate actions (#86853)
* Nest - Climate - Error Messages

1. Error messages were incorrect for some methods, for example async_set_temperature was reporting failure to set hvac_mode. This is corrected.
2. Error messages were incomplete and were not including the entity_id,and the operation being performed that failed.
3. Add unit tests to test the exception handling

* Move tests into exiisting error test

* Improve readability of error message
2023-01-28 12:58:28 -08:00
J. Nick Koston d0c7f42559
Fix Bluetooth discoveries missing between restarts (#86808)
* Fix Bluetooth discoveries missing between restarts

* do not load other integrations

* coverage
2023-01-27 22:16:16 -05:00
Robert Hillis b69576d6de
Add D-link tests (#86825)
* Fix D-Link config flow auth

* Add tests to D-Link

* pyupgrade
2023-01-27 22:15:27 -05:00
Shay Levy 803cd8d9a3
Handle state unknown if last state is missing in Shelly (#86813)
Shelly - handle state unknown if last state is missing
2023-01-27 23:34:56 +01:00
Franck Nijhof e9543a7254
Enable Ruff PT021 (#86801) 2023-01-27 17:14:04 +01:00
Franck Nijhof 8f74bff354
Enable Ruff PLC0414 (#86799) 2023-01-27 16:32:04 +01:00
Shay Levy f9f9741d2a
Separate Shelly tests parameters in parametrize (#86778)
Shelly tests - separate parameters in parametrize
2023-01-27 14:28:35 +01:00
Franck Nijhof ef800335fb
Enable Ruff PT022 (#86792)
* Enable Ruff PT022

* Adjust found cases
2023-01-27 13:57:06 +01:00
Franck Nijhof bfbf9b9751
Adjusts imports in tests to match our relative import rules (#86788) 2023-01-27 12:51:58 +01:00
Franck Nijhof 89c0b27b42
Migrates tests to use UnitOfPressure enum (#86785) 2023-01-27 12:13:27 +01:00
epenet 561fc2d771
Remove deprecated unit system properties (#86643)
* Remove deprecated unit system properties

* Fix tests
2023-01-27 12:09:26 +01:00
Franck Nijhof 3ff3834cae
Re-enable Ruff UP024 (#86784) 2023-01-27 12:03:27 +01:00
Franck Nijhof a79885ceaf
Enable Ruff SIM117 (#86783) 2023-01-27 11:52:49 +01:00
Franck Nijhof 57cf11f067
Enable Ruff PT015 (#86775) 2023-01-27 11:10:29 +01:00
Franck Nijhof 49148421cb
Migrates tests to use UnitOfSpeed enum (#86777) 2023-01-27 10:58:55 +01:00
Franck Nijhof fca3382d37
Migrates tests to use MediaPlayerEntityFeature enum (#86779) 2023-01-27 10:56:40 +01:00
Shay Levy ae6bc96002
Shelly code quality (#86733) 2023-01-27 10:47:05 +02:00
Franck Nijhof e4a78420b8
Enable Ruff PT013 (#86757)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-01-27 09:09:46 +01:00
Jesse Hills 78207121c0
Remove esphome password from config flow data if not needed (#86763)
* Remove esphome password if not needed

* Add test

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-01-26 21:45:51 -05:00
Paulus Schoutsen 9cd48b4999
OpenAI: Fix device without model (#86754) 2023-01-26 23:25:02 +01:00
tronikos 04bc522fa5
Google Assistant SDK: Test unload when enable_conversation_agent (#86707)
Test unload when enable_conversation_agent
2023-01-26 16:17:23 -05:00
Franck Nijhof 62dcbe5258
Enable Ruff PT001 (#86730) 2023-01-26 18:05:05 +01:00
Michael Hansen adeaf746ec
Use device area id in intent matching (#86678)
* Use device area id when matching

* Normalize whitespace in response

* Add extra test entity
2023-01-26 09:48:49 -06:00
Robert Svensson 4181a9baf0
Improve Axis config flow tests (#86644)
* Improve Axis config flow tests

* Don't use prepare_config_entry
2023-01-26 14:29:06 +01:00
Erik Montnemery fea30c1ce9
Terminate strings at NUL when recording states and events (#86687) 2023-01-26 11:11:03 +01:00
Paulus Schoutsen ff91fb7d74
Make openai conversation prompt template more readable + test case (#86676) 2023-01-26 11:04:15 +01:00
Paulus Schoutsen 28a3b4a32c
Add error handling for OpenAI (#86671)
* Add error handling for OpenAI

* Simplify area filtering

* better prompt
2023-01-25 22:17:19 -05:00
Franck Nijhof e50a531cd9
Code styling tweaks to the tests - Part 2 (#86662)
Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>
2023-01-26 01:23:53 +01:00
Franck Nijhof 4955dd3e1b
Code styling tweaks to Nexia tests (#86660) 2023-01-25 23:36:17 +01:00
Robert Svensson a56f6cb863
Assert Axis config entry state not hass.data (#86648) 2023-01-25 21:15:03 +01:00
Paulus Schoutsen df0fc30695
Fix oauth2 error (#86634) 2023-01-25 20:50:16 +01:00
Joakim Plate 1b97a51b5e
Print expected device class units in error log (#86125) 2023-01-25 20:45:50 +01:00
J. Nick Koston 03a8dcfdc1
Add Mopeka integration (#86500)
* Add Mopeka integration

Mopeka makes BLE propane tank monitors

* cover

* wip

* wip

* bump lib

* strip binary sensor

* all sensors

* all sensors

* update tests

* change quality

* change quality

* adjust

* integration_type, strict-typing
2023-01-25 12:28:13 -05:00
Paulus Schoutsen 7d641e4d3e
Add OpenAI integration (#86621)
* Add OpenAI integration

* Remove empty manifest fields

* More prompt tweaks

* Update manifest

* Update homeassistant/components/openai_conversation/config_flow.py

Co-authored-by: Franck Nijhof <git@frenck.dev>

* Address comments

* Add full integration tests

* Cripple the integration

* Test single instance

Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-01-25 11:30:13 -05:00
Jon Caruana bbed1099d5
Add diagnostics to LiteJet (#86600) 2023-01-25 16:41:59 +01:00
SgtBatten 0ccab19d2c
Add Mega Joule as valid unit of energy (#86055)
* Add Mega joule

* Reorder valid energy types

Alphabetical

* Add Mega Joule

* Add Mega Joule as valid energy unit

* Add Mega Joule

* Add Mega Joule as a Unit of Measurement to Energy

* Update tests

* Update tests

* Update number docstring

Co-authored-by: Roving Ronin <108674933+Roving-Ronin@users.noreply.github.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-01-25 14:13:42 +01:00
Jan Bouwhuis f182e314e5
Add number platform support to Alexa (#86553)
Co-authored-by: Mike Degatano <michael.degatano@gmail.com>
2023-01-25 13:34:53 +01:00
Allen Porter 7ff1265b10
Add service to create calendar events (#85805) 2023-01-25 12:43:50 +01:00
Franck Nijhof 5f1edbccd1
Remove Almond integration (#86616) 2023-01-25 12:21:26 +01:00
TheJulianJES 0cf676d501
Remove unnecessary ZHA AnalogInput sensors for Xiaomi plugs (#86261)
* Remove unnecessary ZHA AnalogInput sensors for Xiaomi plugs

* Remove AnalogInput entities from test
2023-01-25 06:17:33 -05:00
Vaarlion 3007e0259d
Add a `contains` jinja filter and test (#86390) 2023-01-25 11:51:47 +01:00
Erik Montnemery f327a247a0
Allow a temperature sensor to be in K (#86073) 2023-01-25 11:47:52 +01:00
Stefan Agner f3cf760772
Drop IoTaWatt Accumulated sensors (#86611) 2023-01-25 11:08:43 +01:00
epenet a8c952f82f
Mock async_setup_entry in SamsungTV tests (#86601)
* Mock async_setup_entry in samsungtv tests

* Adjust test_import_legacy_without_name

* Adjust test_form_reauth_encrypted

* Add specific test

* 100% coverage
2023-01-25 10:48:15 +01:00
Kevin Stillhammer 781a4267cf
Calculate data using all sections for here_travel_time (#86576)
Calculate data using all sections
2023-01-25 10:33:43 +01:00
J. Nick Koston 7bd56ad7d6
Migrate totalconnect to use async_forward_entry_setups (#86580)
* Migrate totalconnect to use async_forward_entry_setups

Replaces deprecated async_setup_platforms with async_forward_entry_setups

* fix double update and tests
2023-01-25 10:26:49 +01:00
J. Nick Koston 1a2652e1bb
Migrate konnected to use async_forward_entry_setups (#86565)
* Migrate konnected to use async_forward_entry_setups

Replaces deprecated async_setup_platforms with async_forward_entry_setups

* update tests
2023-01-25 10:19:23 +01:00
J. Nick Koston 5285d057d2
Migrate cast to use async_forward_entry_setups (#86558)
Replaces deprecated async_setup_platforms with async_forward_entry_setups
2023-01-25 10:12:58 +01:00
J. Nick Koston 3bfdba50d9
Migrate homematicip_cloud to use async_forward_entry_setups (#86563)
* Migrate homematicip_cloud to use async_forward_entry_setups

Replaces deprecated async_setup_platforms with async_forward_entry_setups

* adapt test, this test should be rewritten
2023-01-25 10:01:51 +01:00
Erik Montnemery 086a6460ef
Allow customizing sensor state precision (#86074)
* Allow customizing sensor precision

* Don't convert integer strings to floats

* Tweak converting sensor state to number

* Drop default rounding to 2 decimals

* Adjust test

* Tweak rounding, improve test coverage

* Don't convert to a number if not necessary

* Raise if native_precision is set and state is not numeric

* Address review comments

* Address comments, simplify

* Don't call  property twice

* Make exception more helpful
2023-01-25 08:55:46 +01:00
Paulus Schoutsen 6c8efe3a3b
Conversation cleanup (#86592)
* Require config entry when setting Conversation agent, add new unset agent method

* Remove onboarding from conversation agent

* Type attribution

* Wrap async_process params in ConversationInput object
2023-01-24 21:47:49 -06:00
J. Nick Koston b507fb1e06
Migrate steam_online to use async_forward_entry_setups (#86578)
* Migrate steam_online to use async_forward_entry_setups

Replaces deprecated async_setup_platforms with async_forward_entry_setups

* fix steam_online tests
2023-01-24 23:30:28 +02:00
On Freund 2c9e8ad475
ReadYourMeter Pro integration (#85986)
* ReadYourMeter Pro integration

* Add __init__.py to .coveragerc

* Address code review comments

* More code review comments
2023-01-24 22:41:33 +02:00
Allen Porter 09891ead8d
Add rainbird rain delay number entity, deprecating the sensor and service (#86208)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-01-24 21:16:52 +01:00
G Johansson b3c5c6ae9c
Add sensor to group (#83186) 2023-01-24 20:12:27 +01:00
Ernst Klamer 886d2fc3a1
Add events for xiaomi-ble (#85139)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-01-24 08:48:30 -10:00
puddly 4b88a71d60
Re-enable multi-PAN (#86533)
Revert "Disable multi-pan (#83603)"

This reverts commit 9c7b80090a.
2023-01-24 19:05:17 +01:00
Martin Hjelmare ff5c1ce2d3
Bump python-matter-server to 2.0.0 (#86470) 2023-01-24 19:00:04 +01:00
Maciej Bieniek 9a68f0abe8
Store Shelly climate `last_target_temp` value in restore extra data (#86482)
fixes undefined
2023-01-24 07:28:34 -10:00
tronikos 949c88930f
Google Assistant SDK: Allow multiple commands in the same conversation context (#85423)
* Allow multiple commands in the same conversation

* fix test

* Apply suggestions from code review

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* Add missing cv import

* Update service description

* Fix test after merging dev

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2023-01-24 11:54:23 -05:00
tronikos 0daaa37e09
Google Assistant SDK: support audio response playback (#85989)
* Google Assistant SDK: support response playback

* Update PATHS_WITHOUT_AUTH

* gassist-text==0.0.8

* address review comments
2023-01-24 08:19:23 -08:00
Artem Draft 02e973026d
Add browse media and play media support in Bravia TV (#85288)
* Add media browsing and play media support in Bravia TV

* Add fix invalid Bravia Content-Type header for icons

* Avoid duplicates in source_list

* Small cleanup

* Edit comment

* Revert en.json
2023-01-24 14:31:09 +01:00
Franck Nijhof 73c4ac53d2
Enable T20 (flake8-print) to ban use of print statements (#86525)
* Enable T20 (flake8-print) to ban use of print statements

* Make compatible with flake8 config
2023-01-24 14:24:21 +01:00
epenet e96cea997e
Add reboot button to SFRBox (#86514) 2023-01-24 14:13:49 +01:00
Todd Radel 63bddae01d
Replace abodepy library with jaraco.abode to enable new Abode devices (#85474)
* replaced abodepy library with jaraco.abode

* updated jaraco.abode to version 3.2.1

* send capture event as dict
2023-01-24 12:44:38 +01:00
epenet 22dee1f92b
Add reauth to SFR Box (#86511) 2023-01-24 11:00:22 +01:00
epenet 3ec7f0280e
Add authentication to SFR Box (#85757)
* Add credentials to SFR Box

* Make username/password inclusive

* Add handler for ConnectTimeout

* Use menu

* Drop get
2023-01-24 07:22:14 +01:00
Michael Hansen ea95abcb30
Use intent responses from home-assistant-intents (#86484)
* Use intent responses from home_assistant_intents

* Use error responses from home_assistant_intents

* Remove speech checks for intent tests (set by conversation now)

* Bump hassil and home-assistant-intents versions

* Use Home Assistant JSON reader when loading intents

* Remove speech checks for light tests (done in agent)

* Add more tests for code coverage

* Add test for reloading on new component

* Add test for non-default response
2023-01-23 22:38:41 -05:00
Dan Simpson 66e21d7701
Add Powerwall off grid switch (#86357)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-01-23 15:03:15 -10:00
IceBotYT 94c7f7bbb7
Add 3 new fields to LaCrosse View (#86356)
* Add BarometricPressure, FeelsLike, and WindChill

* Improve test coverage
2023-01-24 01:11:07 +01:00
Martin Hjelmare 51001ad1e1
Add matter diagnostics (#86091)
* Add matter diagnostics

* Complete test typing

* Rename redact attributes helper

* Adjust device lookup after identifier addition
2023-01-23 11:05:09 -05:00
epenet b4dd1b8cb2
Rename logbook constant (#86464) 2023-01-23 18:00:25 +02:00
Jan Bouwhuis 33fb27eb1a
Rename fake kitchen_sink demo locks to more common name (#86452) 2023-01-23 16:31:02 +01:00
Erik Montnemery 9ef86b7b66
Add Thread integration (#86283)
* Add Thread integration

* Address review comments

* Address review comments
2023-01-23 10:27:24 -05:00
G Johansson 68dd2802a1
Add remove entity in group.set service (#79401)
* Group set remove entities

* simplify

* Add test

* Fix test
2023-01-23 15:00:40 +01:00
Jan Bouwhuis f719ecf086
Add command template and code_format support for MQTT lock (#85830)
* Add command template for MQTT lock

* Fix tests
2023-01-23 14:48:07 +01:00
Marc Mueller 00e5f23249
Update Union typing (zha) [Py310] (#86453) 2023-01-23 14:46:40 +01:00
TheJulianJES 6582ee3591
Use ExecuteIfOff on color cluster for supported bulbs with ZHA (#84874)
* Add options and execute_if_off_supported properties to Color channel

* Initialize "options" attribute on Color channel (allowing cache)

* Implement execute_if_off_supported for ZHA lights

* Make sure that color_channel exists, before checking execute_if_off_supported

* Replace "color_channel is not None" check with simplified "if color_channel"

* Make "test_number" test expect "options" for init attribute

* Add test_on_with_off_color test to test old and new behavior

* Experimental code to also support "execute_if_off" for groups if all members support it

* Remove support for groups for now

Group support will likely be added in a separate PR. For now, the old/standard behavior is used for groups.
2023-01-23 07:58:18 -05:00
Jan Bouwhuis b03677db1c
Add validation for lock component (#85842)
* Add validation for lock integration

* Add LockEntityFeature.OPEN for lock group

* Correct tests google_assistant for extra entity

* Validate feature when registering service

* Update tests

* Add LockFeature.OPEN with group
2023-01-23 13:08:00 +01:00
epenet 64535175b1
Add missing conversion tests in unit conversion (#86434) 2023-01-23 10:11:11 +01:00
uvjustin d0153f5031
Detect timestamp discontinuity in stream (#86430)
fixes undefined
2023-01-23 10:09:46 +01:00
Marc Mueller 4f87c1f30f
Update pre-commit-config [Py310] (#86415) 2023-01-23 09:59:44 +01:00
Marc Mueller d7dda6bee5
Update python version used for pylint [Py310] (#86414)
* Update python version used for pylint linting [Py310]

* Import Callable from collections.abc [Py310]

* Use builtin anext [Py310]
2023-01-23 07:56:15 +01:00
zebardy af107d7853
Add support for additional fields to nut (#83265)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-01-22 19:24:30 -10:00
Daniele Ricci 70a9c8f8aa
Upgrade caldav to 1.0.1 (#85536)
Upgrade caldav (fix #40127)

date_search was deprecated in favour of search which also implements client-side recurring events expansion
2023-01-22 16:00:19 -08:00
Shay Levy 9e4be56939
Shelly - handle None in RPC power sensors (#86399)
Handle None in RPC power sensors
2023-01-22 22:18:47 +02:00
starkillerOG 32c1a01159
Add Reolink dhcp discovery (#85880)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-01-22 21:09:18 +01:00
Martin Hjelmare 9c76cd1b6a
Add mysensors remote platform (#86376) 2023-01-22 21:04:42 +01:00