Commit Graph

19000 Commits (e4ff51fa9a961d43851ca853cbabccb62a926b5d)

Author SHA1 Message Date
Brandon Rothweiler 3f2170bd06
Bump py-aosmith to 1.0.6 (#107409) 2024-01-06 12:01:11 -10:00
Brandon Rothweiler 4af47a4815
Add diagnostics to A. O. Smith integration (#106343)
* Add diagnostics to A. O. Smith integration

* Bump py-aosmith to 1.0.4

* remove redactions from test fixture
2024-01-06 17:16:24 +01:00
Josef Zweck 7385da626e
Add new locks automatically to tedee integration (#107372)
* remove removed locks

* move duplicated code to function

* remove entities by removing device

* add new locks automatically

* add locks from coordinator

* remove other PR stuff

* add pullspring lock to test for coverage

* requested changes
2024-01-06 16:02:07 +01:00
Jan Bouwhuis d6aaaf1f1a
Only mock config_entries.HANDLERS for the current test in mock_config_flow (#107357) 2024-01-06 11:46:12 +01:00
Paulus Schoutsen f1d2868fd0
Add API to fetch Assist devices (#107333)
* Add API to fetch Assist devices

* Revert some changes to fixture, make a single fixture for an Assist device
2024-01-05 23:30:18 -05:00
J. Nick Koston c86d1b03fc
Disable thermobeacon voltage sensors by default (#107326) 2024-01-05 16:06:31 -10:00
Marc Mueller 4e62dacc00
Fix lutron test AttributeError (2) (#107324) 2024-01-06 01:15:50 +01:00
Marc Mueller 133fd6ea5d
Fix lutron test AttributeError (#107323) 2024-01-06 00:51:17 +01:00
Shay Levy ad3c78f848
Fix Shelly missing Gen value for older devices (#107294) 2024-01-05 13:32:04 -10:00
J. Nick Koston 81458dbf6f
Add test coverage for ESPHome state subscription (#107045) 2024-01-05 19:51:49 +01:00
Michael Hansen a600a0e023
Expose all areas to Assist and ignore empty aliases (#107267)
* Expose all areas to Assist

* Skip empty entity/area aliases
2024-01-05 13:45:41 -05:00
J. Nick Koston 24ee64e20c
Convert cert_expiry to use asyncio (#106919) 2024-01-05 08:03:53 -10:00
Jan-Philipp Benecke 9a15a5b6c2
Cleanup and migrate rest_command tests to be async (#107264)
Migrate rest_command tests to be async
2024-01-05 18:53:25 +01:00
wilburCforce be6cf7d3ae
Add Lutron config flow (#98489)
* rough in structure for config_flow

* updated json files

* initial conversion to config_flow

* minor updates

* Update binary_sensor.py

* Update config_flow.py

* Update __init__.py

* updates beased on requested changes

* Update const.py

added doc note for ruff

* updated based on suggestions

* updated load xmldb for efficiency

* updated references

* removed unneeded file

* updated config flow to use GUID from XML DB

* minor update to change logging

* updated based on PR feedback

* reverted change for line 30 based on testing

* corrected user_input

* updated based on latest comments

* exception handling

* added raising of issues for config flow

* updated issues strings

* config flow test shell - needs work

* minor changes

* Update strings.json

* Update config_flow.py

* Update __init__.py

* Create conftest.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update config_flow.py

* Update strings.json

* Update requirements_test_all.txt

* Update strings.json

* Update strings.json

* Update config_flow.py

* Update test_config_flow.py

* Update config_flow.py

* Create test_init.py

* Update __init__.py

* Delete tests/components/lutron/test_init.py

* Update strings.json

* updated import parts and tested

* updated strings to improve user feedback

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-01-05 16:39:14 +01:00
Alexander Somov d754ea7e22
Add new Rabbit Air integration (#66130)
* Add new Rabbit Air integration

* Remove py.typed file

It is not needed and was just accidentally added to the commit.

* Enable strict type checking for rabbitair component

Keeping the code fully type hinted is a good idea.

* Add missing type annotations

* Remove translation file

* Prevent data to be added to hass.data if refresh fails

* Reload the config entry when the options change

* Add missing type parameters for generics

* Avoid using assert in production code

* Move zeroconf to optional dependencies

* Remove unnecessary logging

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

* Remove unused keys from the manifest

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

* Replace property with attr

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

* Allow to return None for power

The type of the is_on property now allows this.

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

* Remove unnecessary method call

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

* Update the python library

The new version properly re-exports names from the package root.

* Remove options flow

Scan interval should not be part of integration configuration. This was
the only option, so the options flow can be fully removed.

* Replace properties with attrs

* Remove multiline ternary operator

* Use NamedTuple for hass.data

* Remove unused logger variable

* Move async_setup_entry up in the file

* Adjust debouncer settings to use request_refresh

* Prevent status updates during the cooldown period

* Move device polling code to the update coordinator

* Fix the problem with the switch jumping back and forth

The UI seems to have a timeout of 2 seconds somewhere, which is just a
little bit less than what we normally need to get an updated state. So
the power switch would jump to its previous state and then immediately
return to the new state.

* Update the python library

The new version fixes errors when multiple requests are executed
simultaneously.

* Fix incorrect check for pending call in debouncer

This caused the polling to stop.

* Fix tests

* Update .coveragerc to exclude new file.
* Remove test for Options Flow.

* Update the existing entry when device access details change

* Add Zeroconf discovery step

* Fix tests

The ZeroconfServiceInfo constructor now requires one more argument.

* Fix typing for CoordinatorEntity

* Fix signature of async_turn_on

* Fix depreciation warnings

* Fix manifest formatting

* Fix warning about debouncer typing

relates to 5ae5ae5392

* Wait for config entry platform forwards

* Apply some of the suggested changes

* Do not put the MAC address in the title. Use a fixed title instead.
* Do not format the MAC to use as a unique ID.
* Do not catch exceptions in _async_update_data().
* Remove unused _entry field in the base entity class.
* Use the standard attribute self._attr_is_on to keep the power state.

* Store the MAC in the config entry data

* Change the order of except clauses

OSError is an ancestor class of TimeoutError, so TimeoutError should be
handled first

* Fix depreciation warnings

* Fix tests

The ZeroconfServiceInfo constructor arguments have changed.

* Fix DeviceInfo import

* Rename the method to make it clearer what it does

* Apply suggestions from code review

* Fix tests

* Change speed/mode logic to use is_on from the base class

* A zero value is more appropriate than None

since None means "unknown", but we actually know that the speed is zero
when the power is off.

---------

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-01-05 16:34:28 +01:00
Jan-Philipp Benecke 8bbfee7801
Make exceptions in rest_command services translatable (#107252) 2024-01-05 15:44:31 +01:00
MisterCommand 0d7627da22
Add Hong Kong Observatory integration (#98703)
* Add Hong Kong Observatory integration

* Move coordinator to a separate file

* Map icons to conditions

* Fix code for review

* Skip name

* Add typings to data_coordinator

* Some small fixes

* Rename coordinator.py
2024-01-05 14:52:46 +01:00
Richard Kroegel e7573c3ed4
Add python_script response (#97937)
* Add response to python_script

* Reset output to empty dict if not valid dict

* Add tests for python_script response

* Raise Exceptions on service execution

* Add info on exception type

* Raise ServiceValidationError instead of ValueError

* Raise only on return_response=True

* Fix exception logger if no service response

* Create issue if exception is not raised

* Revert "Create issue if exception is not raised"

This reverts commit a61dd8619f.

---------

Co-authored-by: rikroe <rikroe@users.noreply.github.com>
2024-01-05 14:30:15 +01:00
RoboMagus 4485ece719
Add support for service response to RESTful command (#97208)
* Add ServiceResponse to rest_command

* Handle json and text responses.
Add Unit tests

* Rest command text output handling.
Prevent issue solved by PR#97777

* Re-raise exceptions as HomeAssistantError to enable 'continue_on_error' in scripts / automations.

* Improve test coverage

* Restructure to improve McCabe Complexity

* Remove LookupError

* Revert exception catching location

* Remove LookupError from exception handling
2024-01-05 14:27:42 +01:00
Scott K Logan f249563608
Add Rainforest RAVEn integration (#80061)
* Add Rainforest RAVEn integration

* Add Rainforest Automation brand

* Add diagnostics to Rainforest RAVEn integration

* Drop a test assertion for an undefined behavior

* Add DEVICE_NAME test constant

* Catch up with reality

* Use Platform.SENSOR

Co-authored-by: Robert Resch <robert@resch.dev>

* Make rainforest_raven translatable

* Stop setting device_class on unsupported scenarios

* Rename rainforest_raven.data -> rainforest_raven.coordinator

* Make _generate_unique_id more reusable

* Move device synchronization into third party library

* Switch from asyncio_timeout to asyncio.timeout

* Ignore non-electric meters

Co-authored-by: Robert Resch <robert@resch.dev>

* Drop direct dependency on iso4217, bump aioraven

* Use RAVEn-specific exceptions

* Add timeouts to data updates

* Move DeviceInfo generation from Sensor to Coordinator

* Store meter macs as strings

* Convert to using SelectSelector

* Drop test_flow_user_invalid_mac

This test isn't necessary now that SelectSelector is used.

* Implement PR feedback

- Split some long format lines
- Simplify meter mac_id extraction in diagnostics
- Expose unique_id using an attribute instead of a property
- Add a comment about the meters dictionary shallow copy

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Simplify mac address redaction

Co-authored-by: Joakim Sørensen <ludeeus@ludeeus.dev>

* Freeze RAVEnSensorEntityDescription dataclass

Co-authored-by: Erik Montnemery <erik@montnemery.com>

---------

Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Joakim Sørensen <ludeeus@ludeeus.dev>
2024-01-05 14:00:54 +01:00
J. Nick Koston 824bb94d1d
Add test coverage for ESPHome device info (#107034) 2024-01-05 14:00:38 +01:00
Raman Gupta 85cdbb5ade
Bump zwave-js-server-python to 0.55.3 (#107225)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-01-05 12:38:00 +01:00
Erik Montnemery c805ea7b4f
Include deprecated constants in wildcard imports (#107114) 2024-01-05 11:46:45 +01:00
Robert Resch c063bf403a
Fix mobile_app cloudhook creation (#107068) 2024-01-05 10:53:59 +01:00
Joakim Sørensen 6da82cf07e
Use supported_features_compat in update.install service (#107224) 2024-01-05 10:38:54 +01:00
J. Nick Koston 2641e4014a
Add color temp support for older HomeKit devices (#107206) 2024-01-04 22:50:26 -10:00
Jan Bouwhuis f0ec1235b1
Remove naming warnings and work-a-rounds for incorrectly configured MQTT entities (#107188)
* Remove naming warnings for MQTT entities

* Remove unused const
2024-01-05 09:32:22 +01:00
Jan Bouwhuis c7b6c9da31
Remove work-a-round for mqtt sensors with an entity_category set to `config` (#107199)
* Remove work-a-round for mqtt sensors with an entity_category set to `config`

* Cleanup strings
2024-01-05 09:24:52 +01:00
Martin Hjelmare 00ff93a69e
Set zwave_js voltage sensor suggested precision (#107116) 2024-01-05 01:03:28 -05:00
Michael Hansen 269500cb29
Report missing entities/areas instead of failing to match in Assist (#107151)
* Report missing entities/areas instead of failing

* Fix test

* Update assist pipeline test snapshots

* Test complete match failure

* Fix conflict
2024-01-04 17:09:20 -06:00
Joost Lekkerkerker 34a8812fc3
Introduce base entity in streamlabs water (#107095) 2024-01-04 21:52:38 +01:00
Denis Shulyaka 99bcc38284
Add conversation_id parameter to conversation.process service (#106078)
* Add conversation_id parameter to conversation.process service

* fix test

* fix tests
2024-01-04 14:46:06 -06:00
Joost Lekkerkerker eee6693855
Remove precision in streamlabs water (#107096) 2024-01-04 21:41:45 +01:00
Joost Lekkerkerker 8b1db37a85
Use snapshots in Glances sensor tests (#107159)
* Use snapshots in Glances sensor tests

* yes
2024-01-04 21:32:31 +01:00
J. Nick Koston bc26377c16
Cache homekit_controller supported features (#106702) 2024-01-04 10:31:09 -10:00
Jan Bouwhuis 5c82c39936
Reorganize drop_connect tests (#107148) 2024-01-04 17:48:31 +01:00
J. Nick Koston 0695bf8988
Move group helpers into their own module (#106924)
This gets rid of the legacy need to use bind_hass, and
the expand function no longer looses typing.
2024-01-04 17:34:56 +01:00
Jan Bouwhuis 6a02cadc13
Rework drop_connect switch, select and coordinator tests and cleanup fixtures (#107119)
* Refactor drop_connect switch and select tests

* Update coordinator tests, cleanup fixtures
2024-01-04 16:17:48 +01:00
Martin Hjelmare 80a616d237
Remove zwave_js numeric sensor rounding (#107100) 2024-01-04 13:49:15 +01:00
J. Nick Koston 0ccf8ffbc6
Bump habluetooth to 2.0.2 (#107097) 2024-01-04 02:45:47 -10:00
Erik Montnemery 9eefd95e91
Deduplicate handling of duplicated constants (#107074)
* Deduplicate handling of duplicated constants

* Use DeprecatedConstant + DeprecatedConstantEnum

* Fixup

* Remove test cases with unnamed tuples
2024-01-04 13:25:09 +01:00
J. Nick Koston 1a08bcce77
Fix missing backwards compatibility layer for water_heater supported_features (#107091) 2024-01-04 02:21:52 -10:00
Jan Bouwhuis 10f5ce2dc0
Refactor drop tests for binary_sensor (#107090) 2024-01-04 13:12:11 +01:00
Joost Lekkerkerker 5ae8b6bc02
Add entity descriptions to Streamlabs water (#107071)
* Add sensor tests to Streamlabs water

* Add sensor tests to Streamlabs water

* Use entity descriptions in streamlabs water

* Use entity descriptions in streamlabs water

* Use entity descriptions in streamlabs water

* Add translations
2024-01-04 11:53:04 +01:00
Jan Bouwhuis 5508bb3ef9
Refactor drop sensor tests (#106965)
* Refactor drop sensor tests

* Setup the config entry instead of the component
2024-01-04 10:43:04 +01:00
Joost Lekkerkerker 333711d951
Add sensor tests to Streamlabs water (#107065) 2024-01-04 09:57:00 +01:00
J. Nick Koston 9c69212ad5
Add test coverage for ESPHome service calls (#107042) 2024-01-04 09:37:56 +01:00
Joshua Krall 53717523e5
Add button platform to Opengarage (#103569)
* Add button entity to reboot OpenGarage device

* Addressing code review comments

* Another code-review fix

* Update homeassistant/components/opengarage/button.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-01-04 07:37:24 +01:00
Rami Mosleh 2331f89936
Issue warning if glances server version is 2 (#105887)
* Issue warning if glances server version is 2

* Auto detect api version

* Apply suggestions

* Add HA version deprecation

* Apply suggestions from code review

* update config flow tests

* Fix breaks in ha version

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-01-04 05:17:43 +01:00
J. Nick Koston 4f213f6df3
Fix first ESPHome device update entity not offering install feature (#106993)
In the case where the user gets their first ESPHome device such as a RATGDO,
they will usually add the device first in HA, and than find the dashboard.

The install function will be missing because we do not know if the dashboard
supports updating devices until the first device is added. We now set the
supported features when we learn the version when the first device is added
2024-01-03 19:58:04 -05:00