Commit graph

25 commits

Author SHA1 Message Date
Erik Montnemery
0c2485bc03
Freeze integration entity descriptions (#105984)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-18 16:28:13 -10:00
elmurato
a302f1a616
Set category and enabled by default of Minecraft Server sensors (#101943)
* Use set instead of list for supported server types in sensor platform

* Set sensor categories and enabled by default

* Set edition and version as diagnostic sensors
2023-10-13 22:09:13 +02:00
elmurato
c6a3fa30f0
Add support for Minecraft Server Bedrock Edition (#100925) 2023-10-10 08:42:35 +02:00
elmurato
f2fc62138a
Clean-up Minecraft Server constants (#100666) 2023-09-21 08:40:07 +02:00
elmurato
a2a62839bc
Add DataUpdateCoordinator to Minecraft Server (#100075) 2023-09-19 15:59:58 +02:00
elmurato
1f3b3b1be3
Add sensor entity descriptions in Minecraft Server (#99971)
* Add sensor entity descriptions

* Fix review findings

* Fix type of value function to avoid inline lambda if conditions and add attribute function to avoid extra sensor entity class

* Correct name of binary sensor base entity

* Simplify adding of entities in platforms

* Do not use keyword arguments while adding entities
2023-09-10 10:20:26 +02:00
elmurato
7c3605c82e
Use config entry ID as unique ID and remove dependency to getmac in Minecraft Server (#97837)
* 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
elmurato
836b2de86f
Add dataclass for Minecraft Server data (#98297)
* Add dataclass for Minecraft server data

* Sort dataclass variables
2023-08-12 09:36:03 -07:00
elmurato
8195c9d1a7
Use constants for translation keys and rename latency time to latency (#97866)
Use constants for translation keys, rename latency time to latency and some small cleanups
2023-08-05 23:35:54 +02:00
elmurato
90bf2d3076
Move Minecraft Server base entity to its own file (#97187) 2023-07-25 10:14:01 +02:00
Joost Lekkerkerker
4a5a8cdc29
Add entity translations to minecraft server (#95737) 2023-07-02 21:34:58 -04:00
Marc Mueller
d36d98937d
Replace None constants [minecraft_server] (#86540) 2023-01-24 16:34:04 +01:00
epenet
55a5e17cf2
Use UnitOfTime in integrations (h-s) (#84289) 2022-12-20 13:21:14 +01:00
epenet
1725948d4a
Use instance attributes in minecraft_server (#75157)
* Remove minecraft_server from mypy ignore list

* Use new entity naming style
2022-07-14 18:06:33 +02:00
Ben Felton
43772b3fa9
Add World Message/MOTD support for MinecraftServer Integration (#66297) 2022-03-22 18:26:23 +01:00
epenet
d504a4dbda
Add setup type hints [k-m] (#63605)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-07 16:27:49 +01:00
Erik Montnemery
2720ba2753
Move temperature conversions to sensor base class (4/8) (#54472)
* Move temperature conversions to entity base class (4/8)

* Fix litterrobot sensor

* Fix tests
2021-08-11 21:17:47 +02:00
jan iversen
d76993034e
Replace HomeAssistantType with HomeAssistant for integrations m* - n* (#49566)
* 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
86212db71d
Merge of nested IF-IF cases - K-N (#48370) 2021-03-27 10:03:15 +01:00
Erik Montnemery
fdf97eaca3
Migrate integrations i-m to extend SensorEntity (#48213) 2021-03-22 19:59:03 +01:00
Marc Mueller
25a13d1554
Update typing 10 (#48071) 2021-03-18 13:07:04 +01:00
Erik Montnemery
14a59d290a
Update integrations j-o to override extra_state_attributes() (#47758) 2021-03-11 20:11:25 +01:00
Philip Allgaier
625bbe6238
Cleanup unused loggers (components A-M) (#41600) 2020-10-12 16:59:05 +02:00
springstan
a85808e325
Add and use time related constants (#32065)
* Add and use time related constants

* Sort time constants and reuse them in data rate constants

* Fix greeneyemonitor import

* Fix greeneyemonitor import V2

* Fix failing here_travel_time test

* Add TIME_MONTHS and TIME_YEARS

* Use TIME_MINUTES in opentherm_gw and isy994

* Add and use TIME_MILLISECONDS

* Change inconsistent ones

* Add TIME_MICROSECONDS and TIME_WEEKS

* Use constants in apcupsd and travisci

* Fix import error in upnp sensor.py

* Fix isy994 sensor.py using TIME_YEARS

* Fix dyson tests

* Use TIME_SECONDS in more places

* Use TIME_DAYS in google wifi
2020-02-23 22:09:24 +02:00
elmurato
699d6ad658
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 09:28:35 +01:00