Commit Graph

70776 Commits (9b1a8a1129daabe3c96b1437af1c5dc194ab208e)

Author SHA1 Message Date
Sid 9b1a8a1129
enigma2: fix exception when device in deep sleep, fix previous track (#107296)
enigma2: fix exception when device in deep sleep; previous track
2024-01-06 11:18:32 +01:00
Joost Lekkerkerker a03ac3ddcd
Fix passing correct location id to streamlabs water (#107291) 2024-01-06 10:50:06 +01:00
Marc Mueller 3086d33261
Fix rainforest_raven typing (#107309) 2024-01-06 10:41:25 +01:00
Marc Mueller 902d5a79ca
Enable strict typing for p1_monitor (#107301) 2024-01-06 10:38:50 +01:00
Marc Mueller 135a718a0e
Enable strict typing for energyzero (#107300) 2024-01-06 10:33:22 +01:00
Marc Mueller 28c0c2d2ad
Enable strict typing for easyenergy (#107299) 2024-01-06 10:31:55 +01:00
J. Nick Koston 6ff990e2c2
Avoid fetching logger in check_if_deprecated_constant if there is nothing to log (#107341)
getLogger needs a threading lock so its nice to avoid
calling it if we are not going to log anything
2024-01-06 10:20:30 +01:00
J. Nick Koston 851ad21d11
Small cleanup to zeroconf properties matcher (#107342)
* Small cleanup to zeroconf properties matcher

- Switch to dict.items() to avoid dict key lookup
- return early when a match is rejected

* tweak
2024-01-06 10:16:57 +01:00
J. Nick Koston 44018a4183
Use faster identity checks for SupportsResponse Enum (#107351) 2024-01-06 10:12:31 +01:00
Aidan Timson ba60290431
Fix support for play/pause functionality in System Bridge (#103423)
Fix support for play/pause functionality
2024-01-06 10:06:23 +01:00
jimmyd-be ee67c97274
Add time entity to Renson (#105031)
* Add time entity to Renson

* Update homeassistant/components/renson/time.py

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

* remove deleted sensors from strings.json

* Fix Ruff issue

* Fixed loading issue

* Try to fix frozen error

* Revert "Try to fix frozen error"

This reverts commit 803104c2925e6d5acecc0a9d45170a0c85ee7f0e.

* Try to fix frozen error

* Revert "Try to fix frozen error"

This reverts commit 8ba2dcce9444fadcf6bf79e86295f93359b6d7b8.

* Update homeassistant/components/renson/time.py

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

* Change import + api argument

* use _attr_has_entity_name

* Update homeassistant/components/renson/time.py

Co-authored-by: Jan-Philipp Benecke <github@bnck.me>

---------

Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Jan-Philipp Benecke <github@bnck.me>
2024-01-06 09:27:34 +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
nic 6201e81eca
Bump zm-py version to v0.5.3 for zoneminder (#107331)
zm-py version bump for zoneminder

Signed-off-by: Nic Boet <nic@boet.cc>
2024-01-05 19:19:35 -08: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
Joost Lekkerkerker 49284fb469
Fix duplicate unique_ids in emonitor (#107320) 2024-01-05 13:33:04 -10:00
Shay Levy ad3c78f848
Fix Shelly missing Gen value for older devices (#107294) 2024-01-05 13:32:04 -10:00
David F. Mulcahey 2ed9397611
Fix assertion error when unloading ZHA with pollable entities (#107311) 2024-01-05 16:53:43 -05:00
Joost Lekkerkerker 2b43271c3b
Move Lutron entry data to typed class (#107256)
* Move Lutron entry data to typed class

* Move Lutron entry data to typed class

* Exclude file

* Update homeassistant/components/lutron/__init__.py

Co-authored-by: Jan-Philipp Benecke <github@bnck.me>

---------

Co-authored-by: Jan-Philipp Benecke <github@bnck.me>
2024-01-05 22:04:10 +01:00
Roman Sivriver bb03579bd9
Fix typo in recorder strings.json (#107278) 2024-01-05 20:39:04 +01:00
Joost Lekkerkerker 9672ca5719
Extract LutronDevice into separate file (#107285) 2024-01-05 20:38:02 +01:00
wilburCforce 52653220e3
Add code owner for Lutron (#107280)
* hassfest enable

* update code owner

* fix code owner typo

* removed garbage
2024-01-05 20:07:08 +01:00
J. Nick Koston 81458dbf6f
Add test coverage for ESPHome state subscription (#107045) 2024-01-05 19:51:49 +01:00
Jan-Philipp Benecke c81f909ee3
Use call_soon_threadsafe in mqtt client unsubscribe callback (#107266) 2024-01-05 19:45:56 +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
Marc Mueller 833cddc8f5
Improve conversation typing (#106905) 2024-01-05 18:40:34 +01:00
Marc Mueller b2a4de6eed
Enable strict typing for duotecno (#107261) 2024-01-05 18:39:18 +01:00
Marc Mueller de72bbfaad
Enable strict typing for minecraft_server (#107262) 2024-01-05 18:38:31 +01:00
Joost Lekkerkerker 3a94dd6578
Migrate Suez Water to has entity name (#107251) 2024-01-05 18:36:21 +01:00
Marc Mueller f0b47bf00c
Enable strict typing for downloader (#107263) 2024-01-05 18:35:05 +01:00
Marc Mueller 221fa48ea5
Improve denonavr typing (#106907) 2024-01-05 18:34:32 +01:00
Jan-Philipp Benecke e80138dfdf
Remove duplicate assignment of `median` and `statistical_mode` jinja2 filter (#106953) 2024-01-05 17:36:55 +01:00
Joost Lekkerkerker 3d338b5719
Sort Lutron platforms (#107257) 2024-01-05 17:31:50 +01:00
SLaks 9be9bbad61
Allow selecting of counter entities in derivative/integration config flow (#105321) 2024-01-05 16:46:12 +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
Franck Nijhof 80a08199f8
Update Home Assistant Wheels action to 2024.01.0 (#107240) 2024-01-05 16:35:20 +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
J. Nick Koston 8645d9c717
Bump aiohttp-zlib-ng to 0.3.0 (#107184) 2024-01-05 14:28:29 +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
Maikel Punie 84d7be71e0
Bump velbus-aio to 2023.12.0 (#107066) 2024-01-05 13:40:00 +01:00
Grant 371ee1aa8e
Add Tyua Product Category "dsd" for Filament Light (#106709)
* Add Product Category "dsd" support to tuya integration for Filament Lights

* remove unnecessary color_temp and color_data arguments

---------

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>
2024-01-05 13:36:57 +01:00
J. Nick Koston bc539a946f
Use identity checks for unifiprotect enums (#106795)
enums are singletons in this case and there is no need to use
the slower equality checks here
2024-01-05 13:27:10 +01:00