Do not auto-select preset if the lamp is off

This commit is contained in:
Will Tatam
2024-03-12 20:27:40 +00:00
parent 95e94a99b9
commit 5c4c72d068

View File

@@ -138,7 +138,7 @@ class AutoPlaylistUsermod : public Usermod {
String name = ""; String name = "";
getPresetName(ambientPlaylist, name); getPresetName(ambientPlaylist, name);
USER_PRINTF("AutoPlaylist: Silence - apply %s\n", name.c_str()); USER_PRINTF("AutoPlaylist: Silence - apply %s\n", name.c_str());
applyPreset(ambientPlaylist, CALL_MODE_NOTIFICATION); if(bri > 0) applyPreset(ambientPlaylist, CALL_MODE_NOTIFICATION);
} }
} }
else { else {
@@ -147,7 +147,7 @@ class AutoPlaylistUsermod : public Usermod {
String name = ""; String name = "";
getPresetName(musicPlaylist, name); getPresetName(musicPlaylist, name);
USER_PRINTF("AutoPlaylist: End of silence - apply %s\n", name.c_str()); USER_PRINTF("AutoPlaylist: End of silence - apply %s\n", name.c_str());
applyPreset(musicPlaylist, CALL_MODE_NOTIFICATION); if(bri > 0) applyPreset(musicPlaylist, CALL_MODE_NOTIFICATION);
} }
if(autoChange) change(um_data); if(autoChange) change(um_data);
} }