Commit Graph

358 Commits

Author SHA1 Message Date
J. Nick Koston
ede948c277 Fix HomeKit Controller entity state restore issues for IP/COAP devices (#151087) 2025-08-25 19:50:13 +02:00
Jan Bouwhuis
48300f4563 Use greek small letter mu "\u03bc" instead of micro sign "\u00B5" for micro unit prefix (alt 1) (#144853)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2025-08-19 18:48:50 +02:00
Erik Montnemery
d77a3fca83 Exclude is_new from DeviceEntry snapshots (#149801) 2025-08-01 11:01:26 +02:00
Erik Montnemery
0d7608f7c5 Deprecate DeviceEntry.suggested_area (#149730) 2025-08-01 10:34:34 +02:00
Marc Mueller
d33f73fce2 Cleanup bleak warnings (#148665) 2025-07-12 16:26:31 -10:00
Abílio Costa
b626204f63 Add default device class display precision for Sensor (#145013)
* Add default device class display precision for Sensor

* Renaming, docstrings, cleanup

* Simplify units list

* Fix tests

* Fix missing precision when suggested is specified

* Update snapshots

* Fix when unit of measurement is not valid

* Fix tests

* Fix deprecated unit usage

* Fix goalzero tests

The sensor native_value method was accessing the data dict and trowing,
since the mock did not have any data for the sensors.

Since now the precision is always specified (it was missing for those
sensors), the throw was hitting async_update_entity_options in _update_suggested_precision.
Previously, async_update_entity_options was not called since it had no
precision.

* Fix metoffice

* Fix smartthings

* Add default sensor data for Tesla Wall Connector tests

* Update snapshots

* Revert spaces

* Update smartthings snapshots

* Add missing sensor mock for tesla wall connector

* Address review comments

* Add doc comment

* Add cap to doc comment

* Update comment

* Update snapshots

* Update comment
2025-05-26 19:40:29 +02:00
Erik Montnemery
4e1d5fbeb0 Add WS command to help reset custom entity_id (#145504)
* Add WS command to help reset custom entity_id

* Calculate suggested object id from entity properties

* Fix logic and add additional tests

* Adjust test

* Update folder_watcher test

* Handle current entity id matches the automatic entity id

* Don't store calculated_object_id

* Update snapshots

* Update snapshots

* Update test

* Tweak logic for reusing current entity_id

* Improve test

* Don't assign same entity_id to several entities

* Prioritize custom entity name

* Update snapshots

* Update snapshots
2025-05-26 19:28:27 +02:00
Simone Chemelli
484a547758 Fix pylance warning on SnapshotAssertion import (#145206) 2025-05-19 13:55:48 +02:00
J. Nick Koston
53b991fb54 Add preset modes to HKC fans (#142528) 2025-04-14 11:40:54 +02:00
J. Nick Koston
6f02550ac3 Include HKC BLE MAC in device info when available (#141900)
* Include HKC BLE MAC in device info when available

* update tests

* cover

* dry

* dry

* dry
2025-04-14 10:14:48 +02:00
J. Nick Koston
8d82ef8e36 Fix HKC showing hvac_action as idle when fan is active and heat cool target is off (#142443)
* Fix HKC showing hvac_action as idle when fan is active and heat cool target is off

fixes #142442

* comment relocation
2025-04-07 10:11:15 +02:00
J. Nick Koston
a600bc5e57 Add turn on/off support to HomeKit TVs (#140957)
* Add turn on/off support to HomeKit TVs

* 0 = off, 1 = on, not a bool

* add coverage

* update snapshot
2025-03-19 11:19:04 -10:00
J. Nick Koston
577b22374a Revert polling changes to HomeKit Controller (#139550)
This reverts #116200

We changed the polling logic to avoid polling if all chars are marked as watchable
to avoid crashing the firmware on a very limited set of devices as it was
more in line with what iOS does. In the end, the user ended up replacing
the device in #116143 because it turned out to be unreliable in other
ways. The vendor has since issued a firmware update that may resolve
the problem with all of these devices.

In practice it turns out many more devices
report that chars are evented and never send events. After a few months
of data and reports the trade-off does not seem worth it since
users are having to set up manual polling on a wide range of
devices. The amount of devices with evented chars that do not
actually send state vastly exceeds the number of devices that
might crash if they are polled too often so restore the previous
behavior

fixes #138561
fixes #100331
fixes #124529
fixes #123456
fixes #130763
fixes #124099
fixes #124916
fixes #135434
fixes #125273
fixes #124099
fixes #119617
2025-02-28 23:25:50 +01:00
Erik Montnemery
4b34d1bbb5 Merge config subentry feature branch to dev (#136121)
* Reapply "Add support for subentries to config entries" (#133470) (#136061)

* Reapply "Add support for subentries to config entries" (#133470)

This reverts commit ecb3bf79f3.

* Update test snapshot

* Add config subentry support to device registry (#128157)

* Add config subentry support to device registry

* Apply suggestions from code review

* Update syrupy serializer

* Update snapshots

* Address review comments

* Allow a device to be connected to no or a single subentry of a config entry

* Update snapshots

* Revert "Allow a device to be connected to no or a single subentry of a config entry"

This reverts commit ec6f613151cb4a806b7961033c004b71b76510c2.

* Update test snapshots

* Bump release version in comments

* Rename config_subentries to config_entries_subentries

* Add config subentry support to entity registry (#128155)

* Add config subentry support to entity registry

* Update syrupy serializer

* Update snapshots

* Update snapshots

* Accept suggested changes

* Clean registries when removing subentry (#136671)

* Clean up registries when removing subentry

* Update tests

* Clean up subentries from deleted devices when removing config entry (#136669)

* Clean up subentries from deleted devices when removing config entry

* Move

* Add config subentry support to entity platform (#128161)

* Add config subentry support to entity platform

* Rename subentry_id to config_subentry_id

* Store subentry type in subentry (#136687)

* Add reconfigure support to config subentries (#133353)

* Add reconfigure support to config subentries

* Update test

* Minor adjustment

* Rename supported_subentry_flows to supported_subentry_types

* Address review comments

* Add subentry support to kitchen sink (#136755)

* Add subentry support to kitchen sink

* Add subentry reconfigure support to kitchen_sink

* Update kitchen_sink tests with subentry type stored in config entry

* Update kitchen_sink

* Update kitchen_sink

* Adjust kitchen sink tests

* Fix hassfest

* Apply suggestions from code review

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

* Improve docstrings and strings.json

---------

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

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2025-02-10 16:40:07 +01:00
epenet
7b1b229718 Standardize homeassistant imports in component tests (a-l) (#136806) 2025-01-29 10:00:45 +01:00
epenet
af40b6524e Use new ServiceInfo location in component tests (part 3) (#136064) 2025-01-20 13:16:59 +01:00
J. Nick Koston
e81add5a06 Set code_arm_required to False for homekit_controller (#133284) 2024-12-15 19:28:29 +01:00
Petar Petrov
c68cadad7a Improve precision of HSV color conversion (#130880) 2024-11-19 22:06:57 +01:00
Jacob Feisley
7f9e5e29a8 Add support for Faucet services in HomeKit Controller (#129094) 2024-10-25 11:15:13 +02:00
Joshua Shaffer
b8f6fdeb2b Use fan mode when heat/cool is idle in homekit_controller (#128618) 2024-10-24 09:25:40 +01:00
epenet
906cecf087 Cleanup unused snapshots (#128549)
* Cleanup unused snapshots

* Cleanup a few more

* Cleanup systemmonitor

* Cleanup voip
2024-10-17 10:41:57 +02:00
J. Nick Koston
24fbc366a6 Restore __slots__ to registry entries (#127481) 2024-10-05 12:16:52 +02:00
Erik Montnemery
59a690f214 Use ConfigFlow.has_matching_flow to deduplicate homekit_controller flows (#126894) 2024-09-27 13:41:55 +02:00
Erik Montnemery
264927926e Remove unignore flow from homekit controller (#126637) 2024-09-24 16:43:12 +02:00
epenet
6ea59ffa94 Add alias to DOMAIN import in tests [h-m] (#125577)
* Add alias to DOMAIN import in tests [h-m]

* Revert changes to mqtt
2024-09-09 15:21:01 +02:00
J. Nick Koston
0628f96713 Ensure all chars are polling when requesting manual update in homekit_controller (#124582)
related issue #123963
2024-08-25 21:21:15 +02:00
red-island
32f75597a9 Fix tilt calculation for HomeKit cover devices (#123532) 2024-08-24 16:12:32 +01:00
epenet
db92f29c00 Improve type hints in homekit and homekit_controller tests (#124213)
Add missing hass type hint in homekit and homekit_controller tests
2024-08-20 12:47:41 +02:00
J. Nick Koston
b20623447e Ensure HomeKit connection is kept alive for devices that timeout too quickly (#123601) 2024-08-12 14:54:57 +02:00
Joost Lekkerkerker
e8d7eb05ae Delete unused snapshots (#123656)
* Delete unused snapshots

* Delete unused snapshots
2024-08-12 13:28:09 +02:00
Robert Resch
0d765a27c9 Add created_at/modified_at to entity registry (#122444) 2024-07-23 13:12:29 +02:00
Robert Resch
4c853803f1 Add created_at/modified_at to device registry (#122369) 2024-07-22 19:15:23 +02:00
G Johansson
ca4c617d4b Add TURN_OFF/TURN_ON feature flags for fan (#121447) 2024-07-19 11:35:24 +02:00
J. Nick Koston
e4ef4b81ba Skip poll of HKC accessory if reachable and chars are watchable (#116200) 2024-07-18 08:36:45 +02:00
J. Nick Koston
e2276458ed Fix homekit_controller tests to avoid global aid generation (#119852) 2024-07-17 19:10:02 -05:00
Joost Lekkerkerker
f8ba4d41ba Add support for adding model_id in device info (#121989) 2024-07-16 15:12:25 +02:00
epenet
afb0a6e0ab Use service_calls fixture in homekit_controller tests (#120927) 2024-07-01 17:55:39 +02:00
Marc Mueller
921430d497 Import Generator from collections.abc (3) (#120916) 2024-07-01 12:09:11 +02:00
Erik Montnemery
9bbeb5d608 Add primary_config_entry attribute to device registry entries (#119959)
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Robert Resch <robert@resch.dev>
2024-06-26 12:26:24 +02:00
Paulus Schoutsen
eb89ce47ea Inline primary integration (#119860) 2024-06-18 08:08:08 +02:00
J. Nick Koston
75e8fc0f9c Fix homekit_controller haa fixture (#119855) 2024-06-17 13:34:05 -05:00
Paulus Schoutsen
836abe68c7 Track primary integration (#119741)
* Track primary integration

* Update snapshots

* More snapshots updated

* Uno mas

* Update snapshot
2024-06-16 13:26:06 -04:00
epenet
b3a71dcea3 Improve type hints in homekit_controller tests (#119053) 2024-06-07 11:31:45 +02:00
Marc Mueller
33ed4fd862 Import Generator from typing_extensions (3) (#118990) 2024-06-06 17:28:59 +02:00
epenet
492b158818 Add return type hints in tests (a-i) (#118939) 2024-06-06 12:17:08 +02:00
epenet
3d31af3eb4 Move entity_registry_enabled_by_default to decorator [a-p] (#118794) 2024-06-04 16:18:42 +02:00
epenet
3ac0fa53c8 Cleanup unused FixtureRequest in tests (#118780) 2024-06-04 11:49:21 +02:00
G Johansson
6b7ff2bf44 Add default code to alarm_control_panel (#112540) 2024-05-29 10:46:53 +02:00
epenet
7e62061b9a Improve typing for calls fixture in tests (a-l) (#118349)
* Improve typing for `calls` fixture in tests (a-l)

* More

* More
2024-05-29 09:06:48 +02:00
Marc Mueller
905adb2431 Update codespell ignore list (#118018) 2024-05-24 10:24:34 +02:00