Commit Graph

21458 Commits (219417cfb549dc748c95454f6d8b3e24528d7b27)

Author SHA1 Message Date
Thomas55555 ca59805907
Add sync clock button for Husqvarna Automower (#125689)
* Sync Clock

* optimize add entitites

* fix?

* test

* simplify command

* 1 generic entity

* docstrings

* tweaks

* tests

* Apply suggestions from code review

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

* suggestions from review

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-09-17 16:12:09 +02:00
Erik Montnemery 2190054abf
Improve negative TTS test (#126126) 2024-09-17 16:11:03 +02:00
Robert Contreras 4d04402ad4
Add Home Connect light entity for cooling appliances (#126090)
* Add Home Connect light entities for fridge

* Update homeassistant/components/home_connect/light.py

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-09-17 15:56:20 +02:00
cnico 2ae4989031
Addition of Flipr hub with switch platform (#125866)
* Addition of Flipr hub with switch platform

* Remove of loggers in tests

* Review corrections

* Review corrections

* Apply suggestions from code review

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-09-17 15:56:07 +02:00
epenet f3facac016
Move homematicip_cloud base entity to separate module (#126094)
* Move homematicip_cloud base entity to separate module

* One more
2024-09-17 15:46:04 +02:00
Daniel Krebs c8e2408f82
Allow setting volume on Ring devices (#125773)
* Turn Ring Doorbell and Chime volumes into number entities.

* turn RingOther volumes into numbers as well

* fix linter issues

* move other volume strings into `number` section

* add back old volume sensors but deprecate them

* add tests for `ring.number`

* add back strings for sensors that have just become deprecated

* remove deprecated volume sensors from test

* Revert "remove deprecated volume sensors from test"

This reverts commit fc95af66e7.

* create entities for deprecated sensors so that tests still run

* remove print

* add entities immediately

* move `RingNumberEntityDescription` above `RingNumber` and remove unused import

* remove irrelevant comment about history

* fix not using `setter_fn`

* add missing icons for other volume entities

* rename `entity` -> `entity_id` in number tests

* fix typing in number test

* use constants for `hass.services.async_call()`

* use `@refresh_after` decorator instead of delaying updates manually

* move descriptors above entity class

* Use snapshot to test states.

* add missing snapshot file for number platform

* Update homeassistant/components/ring/number.py

Co-authored-by: Steven B. <51370195+sdb9696@users.noreply.github.com>

---------

Co-authored-by: Steven B. <51370195+sdb9696@users.noreply.github.com>
2024-09-17 15:41:51 +02:00
epenet 1afcbd02a9
Move insteon base entity to separate module (#126099) 2024-09-17 15:40:33 +02:00
epenet 4d140d81f9
Move mysensors base entity to separate module (#126105) 2024-09-17 15:37:56 +02:00
Lektri.co 84c20745a8
Add number platform to the Lektrico integration (#126119)
* Add platform number.

* Remove number user_limit.

* Change LED to led in number snapshot.

* Update homeassistant/components/lektrico/number.py

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-09-17 15:30:24 +02:00
jesperraemaekers 3601c531f4
Adding reauth support to Weheat (#126108)
* Added reauth in config flow and raise approriate errors

* Added reauth tests

* Some cleanup after looking at other PRs
2024-09-17 10:23:27 +02:00
Michael Hansen 6eab5e3e14
Add ESPHome Assist satellite configuration (#126085)
* Basic implementation

* Add websocket commands

* Clean up

* Add callback to other signatures

* Remove unused constant

* Re-add callback

* Add callback to test

* Implement get/set configuration

* Add tests

* Re-add constant

* Bump aioesphomeapi

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-09-16 22:08:39 -05:00
Michael Hansen dde989685c
Add Assist satellite configuration (#126063)
* Basic implementation

* Add websocket commands

* Clean up

* Add callback to other signatures

* Remove unused constant

* Re-add callback

* Add callback to test
2024-09-16 22:34:07 -04:00
Noah Husby 738818aa7a
Add media player stop support to Cambridge Audio (#126066) 2024-09-16 22:42:27 +02:00
epenet 351de1ca72
Move and rename alert base entity to separate module (#126030)
Move alert base entity to separate module
2024-09-16 20:21:04 +02:00
Bouwe Westerdijk b73be2df6e
Implement model_id's in Plugwise (#126069) 2024-09-16 20:01:12 +02:00
xLarry 7ada2f864c
Add sensor platform to laundrify integration (#121378)
* feat: initial implementation of sensor platform

* refactor(tests): await setup of config_entry in parent function

* feat(tests): add tests for laundrify sensor platform

* refactor: set name property for laundrify binary_sensor

* refactor(tests): add missing type hints

* refactor(tests): remove global change of the logging level

* refactor: address minor changes from code review

* refactor(tests): transform setup_config_entry into fixture

* refactor: leverage entity descriptions to define common entity properties

* refactor: change native unit to Wh

* fix(tests): use fixture to create the config entry

* fix: remove redundant raise of LaundrifyDeviceException

* fix(tests): raise a LaundrifyDeviceException to test the update failure behavior

* refactor(tests): merge several library fixtures into a single one

* refactor(tests): create a separate UpdateCoordinator instead of using the internal

* refactor(tests): avoid using LaundrifyPowerSensor

* refactor: simplify value retrieval by directly accessing the coordinator

* refactor: remove non-raising code from try-block

* refactor(sensor): revert usage of entity descriptions

* refactor(sensor): consolidate common attributes and init func to LaundrifyBaseSensor

* refactor(sensor): instantiate DeviceInfo obj instead of using dict

* refactor(tests): use freezer to trigger coordinator update

* refactor(tests): assert on entity state instead of coordinator

* refactor(tests): make use of freezer

* chore(tests): typo in comment
2024-09-16 16:21:16 +02:00
Marc Hörsken 587ebd5d47
Add new integration for WMS WebControl pro using local API (#124176)
* Add new integration for WMS WebControl pro using local API

Warema recently released a new local API for their WMS hub
called "WebControl pro". This integration makes use of the
new local API via a new dedicated Python library pywmspro.

For now this integration only supports awnings as covers.
But pywmspro is device-agnostic to ease future extensions.

* Incorporated review feedback from joostlek

Thanks a lot!

* Incorporated more review feedback from joostlek

Thanks a lot!

* Incorporated more review feedback from joostlek

Thanks a lot!

* Fix

* Follow-up fix

* Improve handling of DHCP discovery

* Further test improvements suggested by joostlek, thanks!

---------

Co-authored-by: Joostlek <joostlek@outlook.com>
2024-09-16 16:07:43 +02:00
epenet 9dd16d3df5
Move efergy base entity to separate module (#126051) 2024-09-16 15:21:30 +02:00
Michael Hansen c63cab336c
Change wake word interception to a subscription (#125629)
* Allow stopping intercepting wake words

* Make wake word interception a subscription

* Keep future

* Add test for unsub
2024-09-16 14:50:43 +02:00
Ludovic BOUÉ e08a94fe1c
Add Matter tests for BatVoltage attribute from PowerSource cluster (#125645)
* Add BatVoltage Attribute from PowerSource Cluster

* Update sensor.py

Remove comment

* Update homeassistant/components/matter/sensor.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Fixture for a Eve Door & Window node

Fixture for a Eve Door & Window node to check BatVoltage attribute from PowerSource cluster

* Test battery voltage sensor

* Update test_sensor.py

* ruff-format

* Update test_sensor.py

* Update test_sensor.py

battery_voltage attribute test

* Update test_sensor.py

* Update test_sensor.py

* Update tests/components/matter/test_sensor.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update test_sensor.py

* Adjust values

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-09-16 14:16:03 +02:00
TimL e9364f4c3a
Add update platform for Smlight integration (#125943)
* Create update coordinator for update entities

* fix type errors

* update info fixture with zigbee version

* Add fixtures for Firmware objects

* mock get_firmware_version function

* Add update platform for Smlight integration

* Add strings for update platform

* Add tests for update platform

* add snapshot for update tests

* Split out base coordinator

* Update homeassistant/components/smlight/strings.json

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

* overwrite coordinator types

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-09-16 14:14:15 +02:00
TimL 5660d1e48e
Add internet binary sensor to Smlight integration (#125982)
* Add internet sensor updated by events

* Strings for internet sensor

* Update binary_sensor snapshot with internet sensor

* Add test for internet sensor

* Address review comments

---------

Co-authored-by: Tim Lunn <tim@feathertop.org>
2024-09-16 13:56:44 +02:00
TimL ac17020cd0
Abort zeroconf flow on connect error during discovery (#125980)
Abort zereconf flow on connect error during discovery
2024-09-16 13:45:39 +02:00
Brett Adams fdc58f952e
Add number platform to Tesla Fleet (#125985)
* Add number platform

* Actually add the umber platform files
2024-09-16 13:38:45 +02:00
Brett Adams e3c2f81506
Add select platform to Tesla Fleet (#125931)
* Add Select Platform

* Add Select strings and icons

* Add tests

* Clean up fixture
2024-09-16 12:26:11 +02:00
Austin Mroczek af03003305
Improve TotalConnect translations (#125978)
* improve translations

* remove periods from tests

* simplify message strings

* use a comma
2024-09-16 12:17:17 +02:00
Markus Jacobsen a8648b7cdc
Add Bang & Olufsen media_player grouping (#123020)
* Add Beolink custom services
Add support for media player grouping via beolink
Give media player entity name

* Fix progress not being set to None as Beolink listener
Revert naming changes

* Update API
simplify Beolink attributes

* Improve beolink custom services

* Fix Beolink expandable source check
Add unexpand return value
Set entity name on initialization

* Handle entity naming as intended

* Fix "null" Beolink self friendly name

* Add regex service input validation
Add all_discovered to beolink_expand service
Improve beolink_expand response

* Add service icons

* Fix merge
Remove unnecessary assignment

* Remove invalid typing
Update response typing for updated API

* Revert to old typed response dict method
Remove mypy ignore line
Fix jid possibly used before assignment

* Re add debugging logging

* Fix coroutine
Fix formatting

* Remove unnecessary update control

* Make tests pass
Fix remote leader media position bug
Improve remote leader BangOlufsenSource comparison

* Fix naming and add callback decorators

* Move regex service check to variable
Suppress KeyError
Update tests

* Re-add hass running check

* Improve comments, naming and type hinting

* Remove old temporary fix

* Convert logged warning to raised exception for invalid media_player
Simplify code using walrus operator

* Fix test for invalid media_player grouping

* Improve method naming

* Improve _beolink_sources explanation

* Improve _beolink_sources explanation

* Add initial media_player grouping

* Convert custom service methods to media_player methods
Fix testing

* Remove beolink JID extra state attribute

* Modify custom services to only work as expected for media_player grouping
Fix tests

* Remove unused dispatch

* Remove wrong comment

* Remove commented out code

* Add config entry mock typing

* Fix beolink listener playback progress
Fix formatting
Add and use get_serial_number_from_jid function

* Fix testing

* Clarify beolink WebSocket notifications

* Further clarify beolink WebSocket notifications

* Convert notification value to enum value

* Improve comments for touch to join

* Fix None being cast to str if leader is not in HA

* Add error messages to devices in Beolink session and not Home Assistant
Rework _get_beolink_jid

* Replace redundant function call

* Show friendly name for unavailable remote leader instead of JID

* Update homeassistant/components/bang_olufsen/media_player.py

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

* Remove unneeded typing

* Rework _get_beolink_jid entity check
Clarify invalid entity error message

* Remove redundant "entity" from string

* Fix invalid typing
fix state assertions

* Fix raised error type

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-09-16 12:16:15 +02:00
starkillerOG 15bf6222f5
Use Home Assistant aiohttp session for Reolink (#125948) 2024-09-16 11:53:13 +02:00
epenet 02cb6a6af7
Force root import of references from other components (#125816)
* Force root import of references from other components

* Improve

* Adjust

* Tweak exceptions

* Another

* Another

* Another

* Another

* Another

* Another

* Another

* Another

* Another

* Another

* Another

* Another

* Adjust

* More

* Ignore violations in test

* Improve
2024-09-16 11:28:42 +02:00
Bouwe Westerdijk 29fb83e98b
Implement battery state binary sensor in Plugwise (#126020) 2024-09-16 11:06:25 +02:00
Antony Kurniawan 156a88a3a3
Ignore negative derivative when the input is total_increasing (#119141)
* if the derivative is negative, ignore it

* add option to ignore the negatives or not

* add tests for a new ignore negative derivative

* add missing description when editing

* rename to ignore_negative_derivative
to increase clarity of which negative I mean
in case in the future we want a ignore_negative_value...

* use state_class=total_increasing to ignore the negative derivative

* remove ignore negative from the config

* add test for total_increasing_reset case

* add comments

* update test_total_increasing_reset with history tests
Also remove the last comment because the test is already clear
My existing comment there isn't unique to this unit test but applies to the entire component. The existing web documentation pointing to Wikipedia should suffice.

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-09-16 10:49:15 +02:00
AlCalzone c77a3674b0
Cleanup zwave_js fixture definitions (#125896)
* refactor: cleanup zwave_js fixture definitions

* fix: that one fixture that's not an object

* fix: some more forgotten ones
2024-09-16 10:22:04 +02:00
G Johansson db1349b95c
Remove yaml import from downloader (#125921) 2024-09-16 10:20:32 +02:00
Michael Hansen 3dd6418160
Use sample bytes in ESPHome media format (#126016) 2024-09-16 10:10:07 +02:00
G Johansson 1caed79895
Validate set_humidity in ClimateEntity (#125242)
* Implementation validation for set_humidity in ClimateEntity

* Fixes
2024-09-16 10:09:44 +02:00
epenet 7df224f382
Use root import in assist_satellite imports (#126025) 2024-09-16 10:05:34 +02:00
starkillerOG 2174ee18dc
Implement Reolink reconfiguration flow (#126004)
Co-authored-by: Robert Resch <robert@resch.dev>
2024-09-16 09:21:23 +02:00
Thomas55555 fccbaa0fbc
Add calendar to Husqvarna Automower (#120775)
* Add Calendar

* update

* change timezone for tests

* fix requirements

* bump aioautomower to 2024.6.3b0

* bump aioautomower to 2024.6.4b0

* fix req

* align dates

* adjust

* nnbw

* better

* improvements

* req

* update requirements

* tests

* tweaks

* shift functions to library

* tests

* bump to aioautomower==2024.9.0b1

* tests

* remove ZoneInfo wrapper

* use timetzone from start_date object

* Update requirements_all.txt

* Fix names in ProgramEvent
2024-09-15 22:07:40 -07:00
Bouwe Westerdijk 089c942233
Bump plugwise to v1.4.0 (#125998)
* Refresh plugwise test-fixtures

* Update test-diagnostics file

* Bump plugwise to v1.4.0
2024-09-15 21:26:33 +02:00
starkillerOG e768bea298
Switch Reolink from hass.data to runtime_data (#126002)
Switch from hass.data to runtime_data
2024-09-15 21:05:59 +02:00
Maciej Bieniek 6906ee0e48
Improve Shelly RPC entity naming (#125415)
* Fix default names for cover entities

* Drop component index if only one component exists

* Improve doc strings

* Use more consistent naming

* Typo

* Revert removing index 0 from entity names

* Improve names for RGB(W) lights
2024-09-15 11:29:26 +02:00
Austin Mroczek ad467029c7
Use Freezer for tests in TotalConnect (#125960)
use Freezer for tests in TotalConnect
2024-09-14 23:46:21 +02:00
jesperraemaekers e92d9317aa
Additional sensor for Weheat integration (#125524)
* Added additional sensor to Weheat

* Added tests for old and new sensors

* Added energy sensor

* Changed tests to use snapshot

* Removed unused value and regenerated the ambr

* Apply suggestions from code review

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

* changed DHW sensor creation

* Wrapped lambda function

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-09-14 12:01:04 +02:00
Andre Lengwenus 5685ba7f55
Make acknowledge requests from LCN modules optional (#125765)
* Add acknowledge flag to config_entry

* Add acknowledge option to lcn configuration

* Fix tests

* Bump pypck to 0.7.23

* Add entry fixture for config_entry version 1.1 to test migration

* Add data_description to strings.json

* Create versioned config_entry in tests
2024-09-14 09:21:15 +02:00
Paulus Schoutsen 1b913b8088
Fix Assist Satellite making up conversation IDs (#125933) 2024-09-13 23:21:31 -04:00
epenet 6d212ea24e
Add helper functions for repair tests (#125886)
* Expose repairs constants and function for other components

* Reorder

* Use helper methods

* Adjust core_files

* Improve

* Update test_migrate.py
2024-09-14 03:31:44 +02:00
Michael Hansen 3eed5de367
Handle announcement finished for ESPHome TTS response (#125625)
* Handle announcement finished for TTS response

* Adjust test
2024-09-13 16:31:38 -04:00
G Johansson 970d28bce9
Remove own defined SOURCE_USER from sensoterra tests (#125919) 2024-09-13 22:19:45 +02:00
G Johansson 2080b9a87c
Add config flow to template alarm_control_panel (#125861)
* Add config flow to template alarm_control_panel

* Remove commented code

* Test import
2024-09-13 22:12:16 +02:00
Michael Hansen cabaf37437
Bump aioesphomeapi and adjust handle_stop (#125907)
* Bump aioesphomeapi and adjust handle_stop

* Stop audio stream too

* Update homeassistant/components/esphome/assist_satellite.py

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-09-13 16:05:11 -04:00