Skip to content
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

DEV 4.4.0.11 - Update NSPanel.ts #1283

Merged
merged 3 commits into from
Nov 23, 2024
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
20 changes: 18 additions & 2 deletions ioBroker/DEV/NSPanelTs.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*-----------------------------------------------------------------------
TypeScript v4.4.0.9 zur Steuerung des SONOFF NSPanel mit dem ioBroker by @Armilar / @TT-Tom / @ticaki / @Britzelpuf / @Sternmiere / @ravenS0ne
TypeScript v4.4.0.11 zur Steuerung des SONOFF NSPanel mit dem ioBroker by @Armilar / @TT-Tom / @ticaki / @Britzelpuf / @Sternmiere / @ravenS0ne
- abgestimmt auf TFT 53 / v4.4.0 / BerryDriver 9 / Tasmota 14.3.0
@joBr99 Projekt: https://github.com/joBr99/nspanel-lovelace-ui/tree/main/ioBroker
NsPanelTs.ts (dieses TypeScript in ioBroker) Stable: https://github.com/joBr99/nspanel-lovelace-ui/blob/main/ioBroker/NsPanelTs.ts
Expand Down Expand Up @@ -132,6 +132,8 @@ ReleaseNotes:
- 25.10.2024 - v4.4.0.8 Add Hide Buttons at Power Off to cardThermo (Climate Alias Channel)
- 26.10.2024 - v4.4.0.8 Add Custom Icon Object to cartdThermo (Climate Alias Channel
- 31.10.2024 - v4.4.0.9 Fix: del 'HandleMessage()' in Trigger 'activeDimmodeBrightness'
- 22.11.2024 - v4.4.0.10 Fix: Bug #1266 trigger timeoutScreensaver
- 22.11.2024 - v4.4.0.11 Add new value 'PopupNotify' to ActivePage

Todo:
- XX.12.2024 - v5.0.0 ioBroker Adapter
Expand Down Expand Up @@ -1001,7 +1003,7 @@ export const config: Config = {
// _________________________________ DE: Ab hier keine Konfiguration mehr _____________________________________
// _________________________________ EN: No more configuration from here _____________________________________

const scriptVersion: string = 'v4.4.0.9';
const scriptVersion: string = 'v4.4.0.11';
const tft_version: string = 'v4.4.0';
const desired_display_firmware_version = 53;
const berry_driver_version = 9;
Expand Down Expand Up @@ -2619,6 +2621,10 @@ async function InitPopupNotify() {
if (heading != '' && text != '') {
setIfExists(config.panelSendTopic, 'pageType~popupNotify');
setIfExists(config.panelSendTopic, notification);
// Set ActivePage
setIfExists(NSPanel_Path + 'ActivePage.type', 'popupNotify', null, true);
setIfExists(NSPanel_Path + 'ActivePage.heading', heading, null, true);
setIfExists(NSPanel_Path + 'ActivePage.id0', '', null, true);
}

//------ Tasmota Buzzer ------
Expand Down Expand Up @@ -2767,6 +2773,16 @@ on({ id: [config.weatherEntity + '.TEMP', config.weatherEntity + '.ICON'], chang
}
});

//send new Screensavertimeout if Changing of 'timeoutScreensaver'
on({ id: [NSPanel_Path + 'Config.Screensaver.timeoutScreensaver'], change: 'ne' }, async function (obj) {
try {
let timeout = obj.state.val;
SendToPanel({ payload: 'timeout~' + timeout });
} catch (err: any) {
log('error at trigger timeoutScreensaver: ' + err.message, 'warn');
}
});

let scheduleSendDate = adapterSchedule(new Date().setMinutes(0, 0), 60 * 60, () => {
SendDate();
});
Expand Down
Loading