mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2026-02-17 18:36:59 +01:00
Compare commits
4 Commits
c26b277c56
...
44640f33d2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
44640f33d2 | ||
|
|
2ae3b9bd8e | ||
|
|
2db991a371 | ||
|
|
2e52abd76c |
@@ -1,5 +1,5 @@
|
||||
/*-----------------------------------------------------------------------
|
||||
TypeScript v4.3.3.42 zur Steuerung des SONOFF NSPanel mit dem ioBroker by @Armilar / @TT-Tom / @ticaki / @Britzelpuf / @Sternmiere / @ravenS0ne
|
||||
TypeScript v4.3.3.43 zur Steuerung des SONOFF NSPanel mit dem ioBroker by @Armilar / @TT-Tom / @ticaki / @Britzelpuf / @Sternmiere / @ravenS0ne
|
||||
- abgestimmt auf TFT 53 / v4.3.3 / BerryDriver 9 / Tasmota 13.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
|
||||
@@ -114,7 +114,8 @@ ReleaseNotes:
|
||||
- 07.02.2024 - v4.3.3.42 Minor Fixes
|
||||
- 09.02.2024 - v4.3.3.42 Change pageId with Alias in Communication with HMI
|
||||
- 09.02.2024 - v4.3.3.42 Spotify Media-Player: Dynamic loading of the speaker list, playlist, tracklist, fix repeat, add seek, add elapsed/duration
|
||||
- 10.02.2024 - v4.3.3.42 Spotify Minor Fixes
|
||||
- 10.02.2024 - v4.3.3.42 Spotify Minor Fixes; Add miValue / maxValue to Volume-Slider
|
||||
- 10.02.2024 - v4.3.3.43 Fix: cardGrid2 => 9 Entities for Layout 'us-p' issue #1167
|
||||
|
||||
Todo:
|
||||
- XX.XX.XXXX - v5.0.0 Change the bottomScreensaverEntity (rolling) if more than 6 entries are defined
|
||||
@@ -982,7 +983,7 @@ export const config: Config = {
|
||||
// _________________________________ DE: Ab hier keine Konfiguration mehr _____________________________________
|
||||
// _________________________________ EN: No more configuration from here _____________________________________
|
||||
|
||||
const scriptVersion: string = 'v4.3.3.42';
|
||||
const scriptVersion: string = 'v4.3.3.43';
|
||||
const tft_version: string = 'v4.3.3';
|
||||
const desired_display_firmware_version = 53;
|
||||
const berry_driver_version = 9;
|
||||
@@ -3383,7 +3384,11 @@ function GeneratePageElements(page: PageType): string {
|
||||
maxItems = 6;
|
||||
break;
|
||||
case 'cardGrid2':
|
||||
maxItems = 8;
|
||||
if (getState(NSPanel_Path + 'NSPanel_Version').val == 'us-p') {
|
||||
maxItems = 9;
|
||||
} else {
|
||||
maxItems = 8;
|
||||
};
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -4774,7 +4779,7 @@ function subscribeMediaSubscriptions(id: string): void {
|
||||
GeneratePage(activePage!);
|
||||
setTimeout(async function () {
|
||||
GeneratePage(activePage!);
|
||||
}, 3000);
|
||||
}, 1500);
|
||||
}
|
||||
},50)
|
||||
});
|
||||
@@ -5412,7 +5417,7 @@ function GenerateMediaPage(page: NSPanel.PageMedia): NSPanel.Payload[] {
|
||||
name = page.heading;
|
||||
}
|
||||
|
||||
let volume = getState(id + '.VOLUME').val;
|
||||
let volume = scale(getState(id + '.VOLUME').val, activePage.items[0].minValue ?? 0, activePage.items[0].maxValue ?? 100, 100, 0);
|
||||
let iconplaypause = Icons.GetIcon('pause'); //pause
|
||||
let shuffle_icon = Icons.GetIcon('shuffle-variant'); //shuffle
|
||||
let onoffbutton = 1374;
|
||||
@@ -5697,11 +5702,6 @@ function GenerateMediaPage(page: NSPanel.PageMedia): NSPanel.Payload[] {
|
||||
repeatIcon = Icons.GetIcon('repeat');
|
||||
repeatIconCol = rgb_dec565(HMIOn);
|
||||
}
|
||||
/*
|
||||
else {
|
||||
repeatIcon = Icons.GetIcon('repeat-off');
|
||||
}
|
||||
*/
|
||||
} else if (v2Adapter == 'volumio') { /* Volumio: only Repeat true/false with API */
|
||||
if (getState(id + '.REPEAT').val == true) {
|
||||
repeatIcon = Icons.GetIcon('repeat-variant');
|
||||
@@ -7048,12 +7048,13 @@ function HandleButtonEvent(words: any): void {
|
||||
pageCounter = -1;
|
||||
(function () { if (timeoutSlider) { clearTimeout(timeoutSlider); timeoutSlider = null; } })();
|
||||
timeoutSlider = setTimeout(async function () {
|
||||
setIfExists(id + '.VOLUME', parseInt(words[4]));
|
||||
setTimeout(async function () {
|
||||
let vVolume = scale(parseInt(words[4]), 100, 0, activePage.items[0].minValue ?? 0, activePage.items[0].maxValue ?? 100);
|
||||
setIfExists(id + '.VOLUME', Math.floor(vVolume));
|
||||
pageCounter = 1;
|
||||
GeneratePage(activePage!);
|
||||
}, 3000);
|
||||
}, 20);
|
||||
}, 10);
|
||||
}, 50);
|
||||
break;
|
||||
case 'mode-speakerlist':
|
||||
let pageItem = findPageItem(id);
|
||||
@@ -8965,7 +8966,7 @@ function HandleScreensaverUpdate(): void {
|
||||
val = parseFloat(val);
|
||||
}
|
||||
let iconColor = rgb_dec565(White);
|
||||
let icon;
|
||||
let icon;
|
||||
if (config.bottomScreensaverEntity[i].ScreensaverEntityIconOn && existsObject(config.bottomScreensaverEntity[i].ScreensaverEntityIconOn!)) {
|
||||
let iconName = getState(config.bottomScreensaverEntity[i].ScreensaverEntityIconOn!).val;
|
||||
icon = Icons.GetIcon(iconName);
|
||||
@@ -10129,7 +10130,7 @@ namespace NSPanel {
|
||||
|
||||
export type PageGrid2 = {
|
||||
type: 'cardGrid2',
|
||||
items: [PageItem?, PageItem?, PageItem?, PageItem?, PageItem?, PageItem?, PageItem?, PageItem?],
|
||||
items: [PageItem?, PageItem?, PageItem?, PageItem?, PageItem?, PageItem?, PageItem?, PageItem?, PageItem?],
|
||||
} & PageBaseType
|
||||
|
||||
export type PageThermo = {
|
||||
|
||||
Reference in New Issue
Block a user