Skip to content

Commit

Permalink
change mqtt self tests to reflect latest mqtt name change
Browse files Browse the repository at this point in the history
  • Loading branch information
openshwprojects committed Sep 9, 2023
1 parent de75814 commit d866983
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/selftest/selftest_hass_discovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ void Test_HassDiscovery_digitalInput() {
// we have used channel index 1
SELFTEST_ASSERT_HAS_MQTT_JSON_SENT_ANY("homeassistant", true, 0, 0, "stat_t", "~/5/get");
// this label will be sent via HASS Discovery to Home Assistant
SELFTEST_ASSERT_HAS_MQTT_JSON_SENT_ANY("homeassistant", true, 0, 0, "name", "DigitalInputTest myDigitalValue");
SELFTEST_ASSERT_HAS_MQTT_JSON_SENT_ANY("homeassistant", true, 0, 0, "name", "myDigitalValue");

}
void Test_HassDiscovery() {
Expand Down
8 changes: 4 additions & 4 deletions src/selftest/selftest_hass_discovery_ext.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void Test_HassDiscovery_Channel_Humidity() {
SELFTEST_ASSERT_JSON_VALUE_STRING("dev", "sw", USER_SW_VER);
SELFTEST_ASSERT_JSON_VALUE_STRING("dev", "mf", MANUFACTURER);
SELFTEST_ASSERT_JSON_VALUE_STRING("dev", "mdl", PLATFORM_MCU_NAME);
SELFTEST_ASSERT_JSON_VALUE_STRING(0, "name", "WinHumTest Humidity");
SELFTEST_ASSERT_JSON_VALUE_STRING(0, "name", "Humidity");
SELFTEST_ASSERT_JSON_VALUE_STRING(0, "~", mqttName);
SELFTEST_ASSERT_JSON_VALUE_STRING(0, "dev_cla", "humidity");
SELFTEST_ASSERT_JSON_VALUE_STRING(0, "unit_of_meas", "%");
Expand Down Expand Up @@ -148,7 +148,7 @@ void Test_HassDiscovery_Channel_Voltage_div10() {
SELFTEST_ASSERT_JSON_VALUE_STRING("dev", "sw", USER_SW_VER);
SELFTEST_ASSERT_JSON_VALUE_STRING("dev", "mf", MANUFACTURER);
SELFTEST_ASSERT_JSON_VALUE_STRING("dev", "mdl", PLATFORM_MCU_NAME);
SELFTEST_ASSERT_JSON_VALUE_STRING(0, "name", "WinVolTest Voltage");
SELFTEST_ASSERT_JSON_VALUE_STRING(0, "name", "Voltage");
SELFTEST_ASSERT_JSON_VALUE_STRING(0, "~", mqttName);
SELFTEST_ASSERT_JSON_VALUE_STRING(0, "dev_cla", "voltage");
SELFTEST_ASSERT_JSON_VALUE_STRING(0, "unit_of_meas", "V");
Expand Down Expand Up @@ -179,7 +179,7 @@ void Test_HassDiscovery_Channel_Temperature() {
SELFTEST_ASSERT_JSON_VALUE_STRING("dev", "sw", USER_SW_VER);
SELFTEST_ASSERT_JSON_VALUE_STRING("dev", "mf", MANUFACTURER);
SELFTEST_ASSERT_JSON_VALUE_STRING("dev", "mdl", PLATFORM_MCU_NAME);
SELFTEST_ASSERT_JSON_VALUE_STRING(0, "name", "WinTempTest Temperature");
SELFTEST_ASSERT_JSON_VALUE_STRING(0, "name", "Temperature");
SELFTEST_ASSERT_JSON_VALUE_STRING(0, "~", mqttName);
SELFTEST_ASSERT_JSON_VALUE_STRING(0, "dev_cla", "temperature");
//SELFTEST_ASSERT_JSON_VALUE_STRING(0, "unit_of_meas", "C");
Expand Down Expand Up @@ -208,7 +208,7 @@ void Test_HassDiscovery_Channel_Temperature_div10() {
SELFTEST_ASSERT_JSON_VALUE_STRING("dev", "sw", USER_SW_VER);
SELFTEST_ASSERT_JSON_VALUE_STRING("dev", "mf", MANUFACTURER);
SELFTEST_ASSERT_JSON_VALUE_STRING("dev", "mdl", PLATFORM_MCU_NAME);
SELFTEST_ASSERT_JSON_VALUE_STRING(0, "name", "WinTempTest Temperature");
SELFTEST_ASSERT_JSON_VALUE_STRING(0, "name", "Temperature");
SELFTEST_ASSERT_JSON_VALUE_STRING(0, "~", mqttName);
SELFTEST_ASSERT_JSON_VALUE_STRING(0, "dev_cla", "temperature");
//SELFTEST_ASSERT_JSON_VALUE_STRING(0, "unit_of_meas", "C");
Expand Down

0 comments on commit d866983

Please sign in to comment.