Commit Graph

32 Commits

Author SHA1 Message Date
epenet
e4cc842584 Use async_load_json_(array/object)_fixture in async test functions (#145773) 2025-05-28 12:09:05 +02:00
Joost Lekkerkerker
e2a916ff9d Make sure we can set up OAuth based integrations via discovery (#145144) 2025-05-26 20:48:07 +02: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
Åke Strandberg
42cacd28e7 Add tests to miele fan entity and api push data pathway (#144481)
* Use device class transation

* WIP

* Test api push

* Use constants

* Use callbacks registered with mock

* Add comment

* Adress review comments

* Empty commit

* Fix tests

* Updates after review
2025-05-26 16:38:41 +02:00
Simone Chemelli
484a547758 Fix pylance warning on SnapshotAssertion import (#145206) 2025-05-19 13:55:48 +02:00
generically-named
3ecde49dca Add energy/water forecast for Miele integration (#144822)
* Add energy/water forecast & fix drying_step error

Adding the energy forecast and water forecast entities that are present in the HACS version of this integration but absent in the HA Core implantation. 

Also fixed the state_drying_step sensor which wasn't handling casting of the API value to an int correctly due to the API sometimes giving a None value.

* Fix formatting issues from previous commit

* Fix missing translation_key line 202

* Remove icon entries

* Update icons.json

* Update strings.json

* Update strings.json (correcting mixed up energy/water forecast names)

* Update homeassistant/components/miele/strings.json

Co-authored-by: Åke Strandberg <ake@strandberg.eu>

* Update homeassistant/components/miele/strings.json

Co-authored-by: Åke Strandberg <ake@strandberg.eu>

* Fix tests

---------

Co-authored-by: Åke Strandberg <ake@strandberg.eu>
Co-authored-by: Joostlek <joostlek@outlook.com>
2025-05-18 22:33:27 +02:00
Åke Strandberg
a83eafd949 Fix mapping from program_phase to vacuum_activity for Miele integration (#145115) 2025-05-17 20:17:15 +02:00
Åke Strandberg
48520d90ef Add plate sensors for Miele hobs (#144400)
* Add plate sensors for miele hobs

* Address review comments

* Update snapshot
2025-05-14 13:02:05 +02:00
Åke Strandberg
9aa2664188 Change unknown to unknown_code for missing Miele codes to avoid confusion (#144699)
* Change unknown to unknown_code

* Update snapshot

* Automatically replace missing codes with None

* Update snapshot
2025-05-14 08:07:38 +02:00
Andrea Turri
61f8970aca Fix typos in Miele device names to match enum (#144609) 2025-05-11 17:26:02 +02:00
Åke Strandberg
a93bf3c150 Add vacuum platform to miele (#143757)
* Add vacuum platform

* Add comments

* Update snapshot

* Use class defined in pymiele

* Use device class transation

* Fix typo

* Cleanup consts

* Clean up activity property

* Address review comments

* Address review comments
2025-05-09 13:17:37 +02:00
Åke Strandberg
1342dc142c Update test fixture for Miele dishwasher (#144537) 2025-05-09 09:50:32 +02:00
Åke Strandberg
337c64d69d Add miele devices dynamically (#144216)
* Use device class transation

* WIP Cleanup tests

* First 3

* First 3

* Button

* Climate

* Light

* Switch

* New and cleaner variant

* Update homeassistant/components/miele/entity.py

---------

Co-authored-by: Josef Zweck <josef@zweck.dev>
2025-05-08 21:20:02 +02:00
Åke Strandberg
762d284102 Improve naming of miele freezers and fridges (#144062)
* Use device class transation

* Improve naming of miele freezers and fridges

* Address review

* Address review comment

* Simplify
2025-05-02 19:31:56 +02:00
Åke Strandberg
cbf4676ae4 Improve handling of missing miele program codes (#144093)
* Use device class transation

* Improve handling of unknown program codes

* Address review comment
2025-05-02 17:31:11 +02:00
Andrea Turri
83b9b8b032 Fix state of fan entity for Miele hobs with extractor when turned off (#144025) 2025-05-01 10:42:27 +02:00
Åke Strandberg
5da57271b2 Add 3 duration sensors to miele (#143160)
* Add 3 duration sensors

* Update snapshot

* Address review comments

* Cleanup

* Adjust type hint
2025-04-29 17:53:24 +02:00
Åke Strandberg
87107c5a59 Add log of missing codes to miele diagnostics (#143877)
Add missing code log to diagnostics
2025-04-29 14:56:45 +02:00
Åke Strandberg
da6fb91886 Add some more sensors to miele integration (#142979)
* Add some more sensors

* Add some debug logging and correct spelling

* Address review comments

* Split out duration sensors to separate PR

* Update strings

* Filter program phases by device type

* Update tests

* Fix auto link

* Address som of the comments

* Lint

* Lint

* Remove duplicates from enum sensor options

* Update snapshot

* Sort options in enum sensors
2025-04-29 13:07:55 +02:00
Åke Strandberg
a71edcf1a1 Add fan platform to miele integration (#143772)
* Add fan platform

* Fix after review comment

* Address review comments

* Remove commented code

* Update tests

* Use constant
2025-04-29 10:48:56 +02:00
Åke Strandberg
d9a09a2aea Enable deletion of stale miele devices (#143811)
Enable deletion of stale devices
2025-04-28 08:59:34 +02:00
Åke Strandberg
eec9a28fe8 Add zeroconf discovery to miele (#143259)
* Add zeroconf discovery

* Strip unnecessary code

* Remove one line more

* Remove one more

* Add test for zeroconf flow

* Finish zeroconf flow
2025-04-25 23:18:20 +02:00
Åke Strandberg
a057effad5 Add miele binary_sensor platform (#142903)
* Add binary_sensor platform

* Address review comments

* Adjust icons and names.

* Change Info to Notification active

* Trigger CI

* Trig CI

* Adjust tests

* Update strings.json

* Update strings.json
2025-04-25 19:32:08 +02:00
Åke Strandberg
a783b6a0ab Add climate platform to miele integration (#143333)
* Add climate platform

* Merge

* Address review and improve test

* Address review comments

* Streamline entity naming

* Update tests/components/miele/test_climate.py

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2025-04-25 19:18:39 +02:00
Åke Strandberg
5302964eb6 Add button platform to miele (#143508)
* WIP Button platform

* Add button platform

* Disable by default, Address review , update tests

* Follow review comments
2025-04-25 19:10:32 +02:00
Åke Strandberg
ed0bdf9e5f Add switch platform to miele integration (#142925)
* Add switch platform

* Add a type hint

* Update after review
2025-04-25 18:40:52 +02:00
Åke Strandberg
eb4fa635bf Add miele light platform (#143119)
* WIP

* Add light platform

* Address review comments

* Address review and improve tests

* Address review comments in tests
2025-04-24 15:02:39 +02:00
Åke Strandberg
e4fe7ba985 Fix bug in miele diagnostics (#143569)
Fix bug when redacting identifiers in diagnostics
2025-04-24 14:16:31 +02:00
Åke Strandberg
7d13c2d854 Add miele diagnostics platform (#142900) 2025-04-17 11:42:07 +02:00
Åke Strandberg
cc6e2ef3f7 Spelling corrections in miele integration (#142907)
Spelling corrections
2025-04-14 09:36:02 +02:00
Åke Strandberg
0b02b43b11 Add integration for Miele (#142498) 2025-04-13 21:09:41 +02:00