From ccdc7eb2e5a56f8919a5bec254783d5f71bf4828 Mon Sep 17 00:00:00 2001 From: Marc-Olivier Arsenault Date: Wed, 6 Dec 2023 00:27:16 +0000 Subject: [PATCH] add optional disabled sensors --- custom_components/moonraker/sensor.py | 1 - tests/test_sensor.py | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/custom_components/moonraker/sensor.py b/custom_components/moonraker/sensor.py index 8d4372e..76dac77 100755 --- a/custom_components/moonraker/sensor.py +++ b/custom_components/moonraker/sensor.py @@ -507,7 +507,6 @@ async def async_setup_machine_update_sensors(coordinator, entry, async_add_entit for version_info in machine_status["version_info"]: if version_info == "system": continue - sensors.append( MoonrakerSensorDescription( key=f"machine_update_{version_info}", diff --git a/tests/test_sensor.py b/tests/test_sensor.py index 5ec4af9..bcd752a 100755 --- a/tests/test_sensor.py +++ b/tests/test_sensor.py @@ -127,6 +127,8 @@ async def test_sensors( "sensor, value", [ ("mainsail_machine_update_system", "8 packages can be upgraded"), + ("mainsail_version_crownest", "v4.0.4-6 > v4.1.1-1"), + ("mainsail_version_mainsail", "v2.8.0"), ], ) async def test_disabled_sensors(