Skip to content

Hide Home Assistant notifications from web UI #974

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions esp3d/src/modules/notifications/notifications_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,16 +191,17 @@ bool NotificationsService::sendMSG(const char* title, const char* message) {
return false;
}
if (!((strlen(title) == 0) && (strlen(message) == 0))) {
// push to webui by default
#if defined(HTTP_FEATURE) || defined(WS_DATA_FEATURE)
String msg = "NOTIFICATION:";

msg += message;
websocket_terminal_server.pushMSG(msg.c_str());
#endif // HTTP_FEATURE || WS_DATA_FEATURE
#ifdef DISPLAY_DEVICE
esp3d_display.setStatus(message);
#endif // DISPLAY_DEVICE
if (_notificationType != ESP_HOMEASSISTANT_NOTIFICATION) {
// push to webui by default
#if defined(HTTP_FEATURE) || defined(WS_DATA_FEATURE)
String msg = "NOTIFICATION:";
msg += message;
websocket_terminal_server.pushMSG(msg.c_str());
#endif // HTTP_FEATURE || WS_DATA_FEATURE
#ifdef DISPLAY_DEVICE
esp3d_display.setStatus(message);
#endif // DISPLAY_DEVICE
}
switch (_notificationType) {
case ESP_PUSHOVER_NOTIFICATION:
return sendPushoverMSG(title, message);
Expand Down