-
- Downloads
Add Minecraft Server Integration (#30992)
* 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
Showing
- .coveragerc 4 additions, 0 deletions.coveragerc
- CODEOWNERS 1 addition, 0 deletionsCODEOWNERS
- homeassistant/components/minecraft_server/__init__.py 273 additions, 0 deletionshomeassistant/components/minecraft_server/__init__.py
- homeassistant/components/minecraft_server/binary_sensor.py 47 additions, 0 deletionshomeassistant/components/minecraft_server/binary_sensor.py
- homeassistant/components/minecraft_server/config_flow.py 116 additions, 0 deletionshomeassistant/components/minecraft_server/config_flow.py
- homeassistant/components/minecraft_server/const.py 37 additions, 0 deletionshomeassistant/components/minecraft_server/const.py
- homeassistant/components/minecraft_server/manifest.json 10 additions, 0 deletionshomeassistant/components/minecraft_server/manifest.json
- homeassistant/components/minecraft_server/sensor.py 177 additions, 0 deletionshomeassistant/components/minecraft_server/sensor.py
- homeassistant/components/minecraft_server/strings.json 24 additions, 0 deletionshomeassistant/components/minecraft_server/strings.json
- homeassistant/generated/config_flows.py 1 addition, 0 deletionshomeassistant/generated/config_flows.py
- requirements_all.txt 4 additions, 0 deletionsrequirements_all.txt
- requirements_test_all.txt 4 additions, 0 deletionsrequirements_test_all.txt
- tests/components/minecraft_server/__init__.py 1 addition, 0 deletionstests/components/minecraft_server/__init__.py
- tests/components/minecraft_server/test_config_flow.py 194 additions, 0 deletionstests/components/minecraft_server/test_config_flow.py
Loading
Please register or sign in to comment