fix roken refactor
parent
5284f5a948
commit
fed0c7124a
4
run.php
4
run.php
|
@ -42,10 +42,10 @@ $c->subscribe(DOOR_TOPIC, 2);
|
||||||
|
|
||||||
$c->onMessage(function (Message $message) {
|
$c->onMessage(function (Message $message) {
|
||||||
switch ($message->topic) {
|
switch ($message->topic) {
|
||||||
case getenv("ENERGY_COUNTER_TOPIC"):
|
case ENERGY_METER_TOPIC:
|
||||||
energy($message->payload);
|
energy($message->payload);
|
||||||
break;
|
break;
|
||||||
case getenv("DOOR_TOPIC"):
|
case DOOR_TOPIC:
|
||||||
door($message->payload);
|
door($message->payload);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue