Skip to content

Commit

Permalink
Updated test case for new hardware, fixed copypaste error (#245)
Browse files Browse the repository at this point in the history
  • Loading branch information
climategadgets committed Sep 1, 2023
1 parent dc476c0 commit 9d44f42
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class ESPHomeSwitchTest {

private final String MQTT_BROKER = "mqtt-esphome";

private final String ZWAVE_SWITCH_TOPIC = "/esphome/7B13B1/switch/fan_panel_1";
private final String ESPHOME_SWITCH_TOPIC = "/esphome/0156AC/switch/t-relay-2-r3";

@BeforeAll
static void init() {
Expand All @@ -37,7 +37,7 @@ void setStateSync1010() {

assertThatCode(() -> {

var esphomeSwitch = new ESPHomeSwitchTest.SwitchWrapper(MQTT_BROKER, ZWAVE_SWITCH_TOPIC);
var esphomeSwitch = new ESPHomeSwitchTest.SwitchWrapper(MQTT_BROKER, ESPHOME_SWITCH_TOPIC);

// VT: NOTE: This switch doesn't control anything critical now, does it?

Expand Down Expand Up @@ -66,11 +66,12 @@ void setStateSync1010() {
@Test
void testFlux1010() {

var esphomeSwitch = new ESPHomeSwitch(MQTT_BROKER, ZWAVE_SWITCH_TOPIC);
var esphomeSwitch = new ESPHomeSwitch(MQTT_BROKER, ESPHOME_SWITCH_TOPIC);

assertThatCode(() -> {
Flux
.just(true, false, true, false)
.delayElements(Duration.ofSeconds(1))
.flatMap(esphomeSwitch::setState)
.doOnNext(state -> logger.info("state: {}", state))
.blockLast();
Expand Down

0 comments on commit 9d44f42

Please sign in to comment.