Commit Graph

18987 Commits (221fa48ea5ac87b831f6f9246b9a92de4b2200bd)

Author SHA1 Message Date
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
J. Nick Koston 962c449009
Add missing coverage for esphome_state_property decorator (#106998) 2024-01-03 19:54:28 -05:00
J. Nick Koston 8d2ddb6a04
Small cleanups to ESPHome light platform (#107003)
- Remove unreachable code
- Cache filtering when possible
- Add missing coverage
2024-01-03 19:53:48 -05:00
J. Nick Koston 01d0031e09
Fix ESPHome service removal when the device name contains a dash (#107015)
* Fix ESPHome service removal when the device name contains a dash

If the device name contains a dash the service name is mutated to
replace the dash with an underscore, but the remove function did
not do the same mutation so it would fail to remove the service

* add more coverage

* more cover
2024-01-03 19:47:49 -05:00
J. Nick Koston 987663e4de
Fix missing backwards compatiblity layer for humidifier supported_features (#107026)
fixes #107018
2024-01-03 19:41:50 -05:00
Michael eb01998395
Add support for placeholders in entity name translations (#104453)
* add placeholder support to entity name translation

* add negativ tests

* make property also available via description

* fix doc string in translation_placeholders()

* fix detection of placeholder

* validate placeholders for localized strings

* add test

* Cache translation_placeholders property

* Make translation_placeholders uncondotionally return dict

* Fall back to unsubstituted name in case of mismatch

* Only replace failing translations with English

* Update snapshots

* Blow up on non stable releases

* Fix test

* Update entity.py

---------

Co-authored-by: Erik <erik@montnemery.com>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-01-03 17:34:47 +01:00
Erwin Douna 59a01fcf9c
Add try-catch for invalid auth to Tado (#106774)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-01-03 09:15:39 +01:00
Michael f66438b0ce
Remove group_members from significant attributes in media player (#106916) 2024-01-02 23:47:32 +01:00
Josef Zweck 87c79ef57f
Add tedee bridge as via_device for tedee integration (#106914)
* add bridge as via_device

* add bridge as via_device

* move getting bridge to update_data

* add bridge property
2024-01-02 23:23:50 +01:00
Michael Hansen 5003993658
Bump intents to 2024.1.2 (#106909) 2024-01-02 15:35:48 -06:00
Allen Porter 943fb2791e
Improve To-do service error handling (#106886) 2024-01-02 19:50:28 +01:00
Allen Porter 2e4c4729c4
Improve fitbit authentication error handling (#106885) 2024-01-02 17:51:15 +01:00
Erik Montnemery a7f4d426ee
Handle time zone change in time_date (#106880) 2024-01-02 16:28:22 +01:00
Erik Montnemery 03cbf8b28d
Fix state update in time_date sensor (#106879) 2024-01-02 16:22:16 +01:00