Commit graph

13728 commits

Author SHA1 Message Date
Martin Hjelmare
b1e939d1f1
Fix tradfri air quality device class () 2023-01-28 22:05:31 -05:00
PeteRager
a7ddd592fb
Nest improve error message on climate actions ()
* 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 ()
* 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 ()
* 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 ()
Shelly - handle state unknown if last state is missing
2023-01-27 23:34:56 +01:00
Franck Nijhof
e9543a7254
Enable Ruff PT021 () 2023-01-27 17:14:04 +01:00
Franck Nijhof
8f74bff354
Enable Ruff PLC0414 () 2023-01-27 16:32:04 +01:00
Shay Levy
f9f9741d2a
Separate Shelly tests parameters in parametrize ()
Shelly tests - separate parameters in parametrize
2023-01-27 14:28:35 +01:00
Franck Nijhof
ef800335fb
Enable Ruff PT022 ()
* 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 () 2023-01-27 12:51:58 +01:00
Franck Nijhof
89c0b27b42
Migrates tests to use UnitOfPressure enum () 2023-01-27 12:13:27 +01:00
epenet
561fc2d771
Remove deprecated unit system properties ()
* Remove deprecated unit system properties

* Fix tests
2023-01-27 12:09:26 +01:00
Franck Nijhof
3ff3834cae
Re-enable Ruff UP024 () 2023-01-27 12:03:27 +01:00
Franck Nijhof
a79885ceaf
Enable Ruff SIM117 () 2023-01-27 11:52:49 +01:00
Franck Nijhof
57cf11f067
Enable Ruff PT015 () 2023-01-27 11:10:29 +01:00
Franck Nijhof
fca3382d37
Migrates tests to use MediaPlayerEntityFeature enum () 2023-01-27 10:56:40 +01:00
Shay Levy
ae6bc96002
Shelly code quality () 2023-01-27 10:47:05 +02:00
Franck Nijhof
e4a78420b8
Enable Ruff PT013 ()
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 ()
* 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 () 2023-01-26 23:25:02 +01:00
tronikos
04bc522fa5
Google Assistant SDK: Test unload when enable_conversation_agent ()
Test unload when enable_conversation_agent
2023-01-26 16:17:23 -05:00
Franck Nijhof
62dcbe5258
Enable Ruff PT001 () 2023-01-26 18:05:05 +01:00
Robert Svensson
4181a9baf0
Improve Axis config flow tests ()
* 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 () 2023-01-26 11:11:03 +01:00
Paulus Schoutsen
ff91fb7d74
Make openai conversation prompt template more readable + test case () 2023-01-26 11:04:15 +01:00
Paulus Schoutsen
28a3b4a32c
Add error handling for OpenAI ()
* 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 ()
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 () 2023-01-25 23:36:17 +01:00
Robert Svensson
a56f6cb863
Assert Axis config entry state not hass.data () 2023-01-25 21:15:03 +01:00
Joakim Plate
1b97a51b5e
Print expected device class units in error log () 2023-01-25 20:45:50 +01:00
J. Nick Koston
03a8dcfdc1
Add Mopeka integration ()
* 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 ()
* 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 () 2023-01-25 16:41:59 +01:00
SgtBatten
0ccab19d2c
Add Mega Joule as valid unit of energy ()
* 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 ()
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 () 2023-01-25 12:43:50 +01:00
Franck Nijhof
5f1edbccd1
Remove Almond integration () 2023-01-25 12:21:26 +01:00
TheJulianJES
0cf676d501
Remove unnecessary ZHA AnalogInput sensors for Xiaomi plugs ()
* Remove unnecessary ZHA AnalogInput sensors for Xiaomi plugs

* Remove AnalogInput entities from test
2023-01-25 06:17:33 -05:00
Erik Montnemery
f327a247a0
Allow a temperature sensor to be in K () 2023-01-25 11:47:52 +01:00
Stefan Agner
f3cf760772
Drop IoTaWatt Accumulated sensors () 2023-01-25 11:08:43 +01:00
epenet
a8c952f82f
Mock async_setup_entry in SamsungTV tests ()
* 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 ()
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 ()
* 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 ()
* 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 ()
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 ()
* 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 ()
* 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 ()
* 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 ()
* 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 ()
* ReadYourMeter Pro integration

* Add __init__.py to .coveragerc

* Address code review comments

* More code review comments
2023-01-24 22:41:33 +02:00