Commit Graph

68 Commits (b07e9df308a2fec26d76ee0ae046c5699d0546d1)

Author SHA1 Message Date
Marcel van der Veldt e7213a4192
Handle Matter nodes that become available after startup is done (#109956) 2024-02-08 13:14:10 +01:00
Marcel van der Veldt d6e617eff8
Bump Python matter server to 5.5.0 (#109894) 2024-02-08 08:59:57 +01:00
Marcel van der Veldt fd5efd1f79
Add transition support to Matter light platform (#109803)
* Add support for transitions to Matter light platform

* fix the feature check

* add tests
2024-02-06 22:59:55 +01:00
Marcel van der Veldt 68c633c317
Add Matter Websocket commands for node actions and diagnostics (#109127)
* bump python-matter-server to version 5.3.0

* Add all node related websocket services

* remove open_commissioning_window service

as it wasnt working anyways

* use device id instead of node id

* tests

* add decorator to get node

* add some tests for invalid device id

* add test for unknown node

* add explicit exception

* adjust test

* move exceptions

* remove the additional config entry check for now

to be picked up in follow up pR
2024-01-31 14:15:56 +01:00
matt7aylor dec9eb9ae4
Matter sensors for air quality measurements (#108173)
* Matter sensors for air quality measurements
Add sensors for CO2, PM1, PM2.5, PM10 and TVOC

* Add initial tests for matter air quality sensor

* Remove VOC data as requires unit extraction from cluster
2024-01-27 08:46:24 +01:00
Martin Hjelmare fabf8802f5
Fix matter color modes (#108804)
* Fix matter light color modes

* Make onoff light fixture only onoff

* Make dimmable light only a dimmable light

* Make color temp light fixture only a color temp light
2024-01-25 09:15:38 +01:00
Marcel van der Veldt 52acc4bbab
Fix turning on the light with a specific color (#108080) 2024-01-15 11:08:38 +01:00
Marcel van der Veldt 13702d51b1
Add more fine grained control over Matter server commissioning for the Companion apps (#106237) 2023-12-27 16:55:07 +01:00
G Johansson 8cd0644035
Add translation to ServiceValidationError in Lock (#105746) 2023-12-27 12:50:27 +01:00
Robert Resch 494a897568
Deprecate deprecated climate constants (#106096) 2023-12-21 00:00:21 +01:00
Øyvind Matheson Wergeland 9fb9ff4f90
Remove workaround for default lock code in Matter (#105173)
* Matter: Remove workaround for default lock code

* Review

* Review 2
2023-12-08 11:46:27 +01:00
Marcel van der Veldt 516966db33
Add Matter custom cluster sensors (Eve Energy Plug energy measurements) (#104830)
* Support for sensors from custom clusters in Matter

* lint

* no need to write state twice

* Add test for eve energy plug

* Update homeassistant/components/matter/entity.py

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

* adjust comment

* debounce extra poll timer

* use async_call_later helper

* Update homeassistant/components/matter/entity.py

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

* wip extend test

* Update test_sensor.py

* fix state class for sensors

* trigger (fake) event callback on all subscribers

* Update eve-energy-plug.json

* add test for additionally polled value

* adjust delay to 3 seconds

* Adjust subscribe_events to always use kwargs

* Update tests/components/matter/common.py

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

* Update test_sensor.py

* remove redundant code

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-12-04 17:21:41 +01:00
Marcel van der Veldt 4829b21fd0
Update Matter test fixtures to schema version 5 (#104829) 2023-11-30 20:08:58 +01:00
Marcel van der Veldt 52450291cb
Fix device sync to Google Assistant if Matter integration is active (#104796)
* Only get Matter device info if device is an actual Matter device

* Return None if matter device does not exist

* lint

* fix test

* adjust google assistant test
2023-11-30 16:59:26 +01:00
Marcel van der Veldt b604c1c222
Fix discovery schema for Matter switches (#103762)
* Fix discovery schema for matter switches

* fix typo in function that generates device name

* add test for switchunit
2023-11-21 20:25:07 +01:00
J. Nick Koston 4c7da97eca
Bump python-matter-server to 4.0.2 (#103760)
Co-authored-by: Marcel van der Veldt <m.vanderveldt@outlook.com>
2023-11-21 18:36:50 +01:00
Jan-Philipp Benecke 9326ea09a5
Update m* tests to use entity & device registry fixtures (#103980) 2023-11-15 10:33:11 +01:00
Marcel van der Veldt ebdd2daab6
Add helper method to get matter device info (#103765)
* Add helper method to get matter device info

* Cleanup async

* Guard

* get node from device id instead of node id

* Fix test

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-11-10 13:43:54 -05:00
Marcel van der Veldt 680162d494
Fix Matter 1.2 locks with specific unlatch/unbolt support (#103275) 2023-11-03 12:09:31 +01:00
itpeters 582eeea082
Fix long press event for matter generic switch (#99645) 2023-09-05 13:10:14 +02:00
Erik Montnemery e9a0436605
Adjust matter tests which create devices (#98198) 2023-08-10 18:23:41 +02:00
Franck Nijhof 868a5f377f
Ruff: isort don't split imports based on trailing comma (#98162) 2023-08-10 14:27:03 +02:00
Marcel van der Veldt fd44bef39b
Add Event platform to Matter (#97219) 2023-07-26 12:19:23 +02:00
Erik Montnemery 7539cf25be
Don't require passing identifiers to DeviceRegistry.async_get_device (#96479)
* Require keyword arguments to DeviceRegistry.async_get_device

* Update tests

* Update tests

* Don't enforce keyword arguments
2023-07-13 13:39:25 -04:00
Martin Hjelmare 02192ddf82
Set Matter battery sensors as diagnostic (#95794)
* Set matter battery sensor to diagnostic

* Update tests

* Use new eve contact sensor dump across the board

* Assert entity category

* Complete typing
2023-07-04 14:54:37 +02:00
hidaris 3bd8955e0e
Add Matter Climate support (#95434)
* Add Matter Climate support

* update set target temp and update callback

* remove print

* remove optional property

* Adjust the code to improve readability.

* add thermostat test

* Remove irrelevant cases in setting the target temperature.

* add temp range support

* update hvac action

* support adjust low high setpoint..

* support set hvac mode

* address some review feedback

* move some methods around

* dont discover climate in switch platform

* set some default values

* fix some of the tests

* fix some typos

* Update thermostat.json

* Update homeassistant/components/matter/climate.py

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

* Update homeassistant/components/matter/climate.py

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

* support heat_cool in hvac_modes

* address some review feedback

* handle hvac mode param in set temp service

* check hvac modes by featuremap

* add comment to thermostat feature class

* make ruff happy..

* use enum to enhance readability.

* use builtin feature bitmap

* fix target temp range and address some feedback

* use instance attribute instead of class attr

* make ruff happy...

* address feedback about single case

* add init docstring

* more test

* fix typo in tests

* make ruff happy

* fix hvac modes test

* test case for update callback

* remove optional check

* more tests

* more tests

* update all attributes in the update callback

* Update climate.py

* fix missing test

---------

Co-authored-by: Marcel van der Veldt <m.vanderveldt@outlook.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-07-03 12:33:50 +02:00
Marcel van der Veldt e9d8fff0dd
Bump Matter Server to 3.6.3 (#95519) 2023-06-29 15:28:34 +02:00
Evan Jarrett 2205f62cc1
Update matter locks to support pin code validation (#95481)
Update matter locks to support PINCode validation based on device attributes
2023-06-29 11:29:54 +02:00
Marcel van der Veldt 0b81550092
Fix Matter entity names (#95477) 2023-06-28 23:40:12 +02:00
Marcel van der Veldt ed2daf1f65
Change subscription logic for Matter devices (#95387) 2023-06-27 21:12:29 +02:00
Diego Rodríguez Royo 3cf8ae64c8
Matter cover position improvements (#92278) 2023-05-31 16:08:01 +02:00
Diego Rodríguez Royo 1a9da67a28
Add tilt support to Matter cover (#92256) 2023-05-30 13:05:14 +02:00
Marcel van der Veldt 2bb46c8a9e
Fix for missing/corrupt names of Matter devices (#92073)
* Fix missing names on some devices/bridges

* guard for None devicetype (just in case)

* Update homeassistant/components/matter/adapter.py

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>

* Update homeassistant/components/matter/adapter.py

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>

* Update homeassistant/components/matter/adapter.py

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>

* Update homeassistant/components/matter/adapter.py

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>

* black and isort

* Code quality

* Add tests

* Add coverage test, add None for empty string

---------

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
Co-authored-by: jbouwh <jan@jbsoft.nl>
2023-05-25 03:50:13 +02:00
Marcel van der Veldt 56d2048ffa
Bump Matter server library to 3.4.1 and address changes (#93411)
* bump python matter server to 3.4.1

* address renamed attribute names in sdk 1.1

* ignore AllClustersAppServerExample

* clusters.ColorControl.Bitmaps.ColorCapabilities

* address discovery schemas

* fix all fixtures due to attribute rename

* bump python matter server to 3.4.1

* address renamed attribute names in sdk 1.1

* ignore AllClustersAppServerExample

* clusters.ColorControl.Bitmaps.ColorCapabilities

* address discovery schemas

* fix all fixtures due to attribute rename

* lint

* update requirements_all
2023-05-23 20:42:09 +02:00
Marcel van der Veldt 3c44c7416f
Fix Matter cover deviceclass and inverted position (#92063) 2023-04-26 21:21:31 +02:00
Erik Montnemery 63f3767a29
Include UUID in hassio discovery data (#91970) 2023-04-25 09:48:47 +02:00
Erik Montnemery 28d85bc405
Run prettier on matter fixture (#90784) 2023-04-04 16:13:08 +02:00
hidaris a9e14cd8d7
Preliminary support for Matter cover (#90262)
Preliminary support for Matter cover, curtain tilt support has not been added yet.
2023-04-04 14:16:11 +02:00
Arturo 5e5ace9c4e
Add door lock device type to matter integration (#89277)
* Adds base code for matter lock

* Adds basic matter door lock support

* Adds matter lock fixture

* Adds tests for matter lock

* Addresses feedback

* Added logic to handle inter states of matter lock

* Addesses feedback
2023-03-21 01:29:33 +01:00
epenet 71dc98a39c
Improve hass_ws_client type hint in tests (#89703) 2023-03-14 16:31:40 +01:00
epenet c51bde9a26
Fail CI on lingering tasks (#88905) 2023-03-07 11:35:48 +01:00
Arturo 0a3a8c4b3c
Fix matter light color capabilities bit map (#88693)
* Adds matter light color capabilities bit map

* Fixed matter light hue and saturation test
2023-02-25 10:25:04 +01:00
Marcel van der Veldt 301144993c
Fix support for Bridge(d) and composed devices in Matter (#88662)
* Refactor discovery of entities to support composed and bridged devices

* Bump library version to 3.1.0

* move discovery schemas to platforms

* optimize a tiny bit

* simplify even more

* fixed bug in light platform

* fix color control logic

* fix some issues

* Update homeassistant/components/matter/discovery.py

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

* fix some tests

* fix light test

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-02-23 14:58:37 -05:00
Marcel van der Veldt 881e85d74f
Bump python-matter-server to 3.0.0 (#88607)
* Bump python-matter-server to 3.0.0

Include all fixes for the changed api schema of the library

* fix test fixtures

* remove invalid data from fixtures

* fix some of the tests

* fix binary sensor bug

* fix sensor bug

* fix switch test

* fix tests

* adjust bugs and typos
2023-02-22 14:24:30 -05:00
Marcel van der Veldt dfe0ededa0
Bump python-matter-server to 2.1.0 (#88192)
* Bump python-matter-server to 2.1.0

* Fix tests

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-02-15 13:23:03 -05:00
Franck Nijhof ed79265843
Enable Ruff PT006 (#88165)
* Enable Ruff PT006

* Adjust existing cases

* Fix tests

* Remove unneeded parentheses
2023-02-15 14:09:50 +01:00
Arturo 1c02f19d9a
Fix matter color temperature light (#87677)
* Adds tests for each matter light type and fixes small issue with color temperature lights not being detected properly

* Removes commented out code

* Changed matter light tests to pytest.mark.parametrize to reduce duplicate code
2023-02-08 23:41:04 +01:00
Arturo e84a11963e
Add color support to matter lights (#87366)
* Added the correct attributes to ColorTemperatureLight and ExtendedColorLight and added CurrentY to codespell ignore word list

* Added enums for matter color modes

* Added support for reading color and color temperature settings from matter api

* Added away of getting the ColorControl featureMap while the get_cluster(ColorControl) function is fixed

* Initial working implementation of color and color temperature

* Full supports for lights with both hs and xy

* Added checks to make sure color features are supported before making matter call

* Changed how color mode is figured out

* Moved the logic that gets the brightness to its own function

* Adds matter light tests for hass triggered events

* Adds full test coverage for matter all types of matter lights

* Adds full test coverage for matter all types of matter lights

* Moved light convertion logic to util.py

* Reorderd codespell ignore list and removed unused code

* Adds brightness state test
2023-02-07 20:44:02 +01:00
Martin Hjelmare f378dcdc30
Fix matter remove config entry device (#87571) 2023-02-06 22:41:52 +01:00
Martin Hjelmare 24bb3a705c
Adjust matter test exception argument (#87282) 2023-02-06 01:02:06 +01:00