mirror of
https://github.com/alexhopeoconnor/arduino-home-assistant.git
synced 2026-10-22 10:42:10 +10:00
Add support for extended unique IDs (#217)
* implement unique ID serialization as flag * finished extended unique IDs feature * add tests * update docs * add funding.yml
This commit is contained in:
@@ -65,6 +65,24 @@ AHA_TEST(ButtonTest, default_params) {
|
||||
)
|
||||
}
|
||||
|
||||
AHA_TEST(ButtonTest, extended_unique_id) {
|
||||
prepareTest
|
||||
|
||||
device.enableExtendedUniqueIds();
|
||||
HAButton button(testUniqueId);
|
||||
assertEntityConfig(
|
||||
mock,
|
||||
button,
|
||||
(
|
||||
"{"
|
||||
"\"uniq_id\":\"testDevice_uniqueButton\","
|
||||
"\"dev\":{\"ids\":\"testDevice\"},"
|
||||
"\"cmd_t\":\"testData/testDevice/uniqueButton/cmd_t\""
|
||||
"}"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
AHA_TEST(ButtonTest, command_subscription) {
|
||||
prepareTest
|
||||
|
||||
|
||||
Reference in New Issue
Block a user