WIP using new PositionWatcher

This commit is contained in:
2025-01-20 22:46:01 +11:00
parent 049037a0a1
commit 94f00c0cef
10 changed files with 446 additions and 115 deletions

View File

@@ -23,7 +23,7 @@ void test_publish_message_count()
HADiscovery haDiscovery = HADiscovery("my_prefix/", callback);
haDiscovery.publish(Shade{0xABCD, "test_shade", "Test Shade", -1, -1, 0, 0, nullptr});
haDiscovery.publish(Shade{0xABCD, "test_shade", "Test Shade", "stopped", -1, -1});
TEST_ASSERT_EQUAL_INT(3, callbackInvokedCount);
}
@@ -47,7 +47,7 @@ void test_publish_cover_message()
HADiscovery haDiscovery = HADiscovery("my_prefix/", callback);
haDiscovery.publish(Shade{0xABCD, "test_shade", "Test Shade", -1, -1, 0, 0, nullptr});
haDiscovery.publish(Shade{0xABCD, "test_shade", "Test Shade", "stopped", -1, -1});
TEST_ASSERT_EQUAL_INT(1, messageAssertedCount);
}
@@ -71,7 +71,7 @@ void test_publish_battery_message()
HADiscovery haDiscovery = HADiscovery("my_prefix/", callback);
haDiscovery.publish(Shade{0xABCD, "test_shade", "Test Shade", -1, -1, 0, 0, nullptr});
haDiscovery.publish(Shade{0xABCD, "test_shade", "Test Shade", "stopped", -1, -1});
TEST_ASSERT_EQUAL_INT(1, messageAssertedCount);
}
@@ -95,7 +95,7 @@ void test_publish_button_message()
HADiscovery haDiscovery = HADiscovery("my_prefix/", callback);
haDiscovery.publish(Shade{0xABCD, "test_shade", "Test Shade", -1, -1, 0, 0, nullptr});
haDiscovery.publish(Shade{0xABCD, "test_shade", "Test Shade", "stopped", -1, -1});
TEST_ASSERT_EQUAL_INT(1, messageAssertedCount);
}