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
2020-02-08 08:28:35 +00:00
{
2020-04-05 15:27:16 +00:00
"config" : {
"step" : {
"user" : {
"title" : "Link your Minecraft Server" ,
"description" : "Set up your Minecraft Server instance to allow monitoring." ,
2020-05-12 17:50:44 +00:00
"data" : {
"name" : "Name" ,
"host" : "[%key:common::config_flow::data::host%]"
}
2020-04-05 15:27:16 +00:00
}
} ,
"error" : {
"invalid_port" : "Port must be in range from 1024 to 65535. Please correct it and try again." ,
"cannot_connect" : "Failed to connect to server. Please check the host and port and try again. Also ensure that you are running at least Minecraft version 1.7 on your server." ,
"invalid_ip" : "IP address is invalid (MAC address could not be determined). Please correct it and try again."
} ,
2020-05-12 17:50:44 +00:00
"abort" : {
"already_configured" : "Host is already configured."
}
2020-04-05 15:27:16 +00:00
}
2020-05-12 17:50:44 +00:00
}