Commit Graph

31 Commits (8ebdd46509c8e1465c461ec105cf32a1a83bd96d)

Author SHA1 Message Date
Joost Lekkerkerker 6bb4e7d62c
Bump ruff to 0.3.4 ()
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00
Erik Montnemery 426f73b1f4
Add State.last_reported ()
* Add State.last_reported

* Update tests

* Update test snapshots

* Call state_reported listeners when firing state_changed event

* Add tests
2024-03-20 21:05:07 +01:00
Marc Mueller 32f3f46542
Add empty line after module docstring (2) [tests.components] () 2024-03-08 19:16:21 +01:00
Marc Mueller 1722e23df8
Add empty line after module docstring [tests l-p] () 2024-03-08 14:55:15 +01:00
elmurato 9e428c6c5f
Fix setup failure due to temporary DNS issue in Minecraft Server ()
Change ConfigEntryError to ConfigEntryNotReady on failed init
2024-03-02 17:28:27 -05:00
Joost Lekkerkerker 1f3b0a4371
Add icon translations to Minecraft Server ()
* Add icon translations to Minecraft Server

* Add icon translations to Minecraft Server

* Add icon translations to Minecraft
2024-03-01 07:20:51 -05:00
elmurato 0d44a1eb66
Bump mcstatus to v11.1.1 ()
* Bump mcstatus to 11.1.0

* Bump mcstatus to v11.1.1
2024-01-08 16:32:37 +01:00
elmurato 7b32e4142e
Make API init async in Minecraft Server ()
* Make api init async

* Remove duplicate assignment of address and set server to None in constructor
2023-12-09 21:15:48 -08:00
Jan-Philipp Benecke 9326ea09a5
Update m* tests to use entity & device registry fixtures () 2023-11-15 10:33:11 +01:00
elmurato faa149b71a
Add binary sensor tests to Minecraft Server () 2023-10-21 15:49:38 +02:00
elmurato 9f3a733f73
Add sensor tests to Minecraft Server () 2023-10-21 15:19:32 +02:00
elmurato 7cd376574e
Reach full init test coverage in Minecraft Server ()
* Add full init test coverage

* Fix patch location

* Use contant for test unique ID
2023-10-17 07:49:05 -07:00
elmurato 4130980100
Patch library instead of own code in Minecraft Server config flow tests ()
* Patch library instead of own code in config flow tests

* Fix patch location
2023-10-16 14:06:22 -07:00
elmurato 370e3166ee
Add diagnostics support in Minecraft Server ()
* Add diagnostics support

* Return diagnostics dict directly

* Use syrupy snapshots for assertions in diagnostics test

* Use parametrize for testing diagnostics

* Remove unnecessary side_effect in patch
2023-10-13 15:40:50 +02:00
elmurato c6a3fa30f0
Add support for Minecraft Server Bedrock Edition () 2023-10-10 08:42:35 +02:00
elmurato 84451e858e
Simplify Minecraft Server SRV handling () 2023-09-25 17:56:26 +02:00
elmurato f1a70189ac
Clean-up Minecraft Server tests ()
Remove patching of getmac, fix typo
2023-09-19 22:14:21 +02:00
elmurato d59aa958b6
Add tests for Minecraft Server entry migration from v1 to v2 () 2023-09-08 23:03:27 +02:00
elmurato 7c3605c82e
Use config entry ID as unique ID and remove dependency to getmac in Minecraft Server ()
* Use config entry ID as unique ID

* Add entry migration to v2 and and remove helper module

* Remove unneeded strings

* Add asserts for config, device and entity entries and improve comments

* Add debug log for config entry migration

* Reset config entry unique ID and use config entry ID instead

* Remove unnecessary unique ID debug log

* Revert usage of constants for tranlation keys and use dash as delimiter for entity unique id suffix

* Revert "Revert usage of constants for tranlation keys and use dash as delimiter for entity unique id suffix"

This reverts commit 07de334606054097e914404da04950e952bef6d2.

* Remove unused logger in entity module
2023-09-07 12:22:46 +02:00
Marc Mueller 3ebd7d2fd1
Fix asyncio DeprecationWarning [3.12] ()
* Fix asyncio DeprecationWarning [3.12]

* Use AsyncMock

* Rewrite ffmpeg tests

* Remove test classes

* Rename test file
2023-08-25 12:27:23 +02:00
elmurato 557b6d511b
Improve reading of MOTD and bump mcstatus to 11.0.0 ()
* Improve reading of MOTD, bump mcstatus to 10.0.3 and getmac to 0.9.4

* Revert bump of getmac

* Bump mcstatus to 11.0.0-rc3. Use new MOTD parser.

* Bump mcstatus to 11.0.0
2023-07-24 20:23:11 +02:00
Franck Nijhof 5e81d28116
Update black to 23.1.0 () 2023-02-02 18:35:24 +01:00
Franck Nijhof a6244eea28
Search/replace RESULT_TYPE_* by FlowResultType enum () 2022-07-07 21:28:18 +02:00
jan iversen d76993034e
Replace HomeAssistantType with HomeAssistant for integrations m* - n* ()
* Integration neato: rename HomeAssistantType to HomeAssistant.

* Integration mysensors: rename HomeAssistantType to HomeAssistant.

* Integration mobile_app: rename HomeAssistantType to HomeAssistant.

* Integration minecraft_server: rename HomeAssistantType to HomeAssistant.

* Clean up

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-04-22 22:23:36 +02:00
Franck Nijhof ad13a9295e
Merge multiple context managers in tests () 2021-03-27 09:17:15 +01:00
Franck Nijhof 65cf2fcb6f
Drop asynctest () 2021-01-01 22:31:56 +01:00
Franck Nijhof 1c2ebdf307
Upgrade black to 20.8b1 () 2020-08-27 13:56:20 +02:00
Paulus Schoutsen ec47216388
Use built-in test helpers on 3.8 () 2020-04-30 13:29:50 -07:00
Ville Skyttä 435a88636a
Address new issues flagged by flake8 3.8.0a2 () 2020-04-30 21:37:58 +02:00
elmurato 45241e57ca
Add support for Minecraft SRV records ()
* Added support for Minecraft SRV records

* Switched from dnspython to aiodns, improved server ping and log messages, use address instead of host and port in config flow

* Updated component requirements
2020-03-23 16:51:13 -07:00
elmurato 699d6ad658
Add Minecraft Server Integration ()
* Add Minecraft Server integration

* Add unit test for config flow

* Fixed some review findings and increased unit test coverage

* Fixed docstrings of new test cases

* Removed unnecessary debug log messages

* Added unique IDs and device infos and removed duplicate name validation

* Attempt to fix unit test on CI

* Return state OFF instead of UNAVAILABLE in case connection to server drops

* Added property decorator to server properties, even less debug messages, improved sensor dispatcher connection and other review findings fixed

* Moved special property handling to sensors, fixed name confusion in sensor entity, switch to HA const for scan_interval, simplified building players list string

* Improved periodic update, speeded up unit tests

* Added type hints, added callback decorator to entity update callback, added const.py to unit test exclusions

* Changed state sensor to binary sensor, removed empty unit test file, added constants for icons and units

* Let HA handle unknown state, check for None in description and players list sensor

* Removed periods at end of log messages, removed constant for default host

* Updated requirements_test_pre_commit.txt, fixed codespell findings

* Use localhost as default host

* Removed passing hass to entities, moved log message from init, moved host lower to vol, use proper patch library, patch library instead of own code

* Replaced server properties with global instance attributes, removed config option scan_interval, switch back to async_track_time_interval

* Removed description and players list sensors, added players list as state attributes to online players sensor, raise OSError instead of deprecated IOError, other minor review findings fixed

* Use MAC address for unique_id in case of an IP address as host, added getmac to manifest.json, added invalid_ip to strings.json, added new test cases for changes in config_flow, replace all IOError's with OSError, other review findings fixed

* Removed double assignment

* Call get_mac_address async safe

* Handle unavailable and unknown states to reach silver quality scale, added quality scale to manifest.json
2020-02-08 09:28:35 +01:00