joBr99 / nspanel-lovelace-ui

Custom Firmware for NsPanel with the design of HomeAssistant's lovelace UI in mind, works with Tasmota.
GNU General Public License v3.0
856 stars 187 forks source link

[Feature Request] cardGrid with 9 elements for US version #1167

Closed starwarsfan closed 4 months ago

starwarsfan commented 4 months ago

FEATURE DESCRIPTION

The current cardGrid2 can hold 8 entries, which is fine so far. But on the NsPanel US version that leads to 2 rows with 3 entries and a 3rd row with only 2 entries. I'd like to use all available space, so it would be very nice if there could be 9 entries at all.

ADDITIONAL CONTEXT

I already implemented cardGrid3 on my NsPanelTs.ts file but as soon as I activate that layout, the entries are displayed as a list like with the cardEntities layout, so I assume that there are changes on the firmware required too!?

PANEL / FIRMWARE VERION

Armilar commented 4 months ago

I set additional labels for HMI and HA. I think this is initially a topic for an additional cardGrid3. Can you provide your cardGrid3?

joBr99 commented 4 months ago

There are already 9 Buttons on cardGrid2 on US-P, maybe this is a bug.

image

Armilar commented 4 months ago

Then it is correct. @tt-tom17 has already implemented it for the ioBroker.

@ joBr99 - there is another bug in the screensaver in the DEV TFT... If you are on a carLChart and the screensaver is activated, you cannot return to the cardLChart... Just in case you make changes in the HMI...

starwarsfan commented 4 months ago

Hey guys,

thx for the reply but:

Then it is correct. @tt-tom17 has already implemented it for the ioBroker.

Now I'm confused. Is it correct or is it wrong? What exactly is correct a/o what is wrong?

If I put 8 entries into cardGrid2, everything is fine. If I put 9 entries into cardGrid2, I got this error message:

Source has 9 element(s) but target allows only 8.

How should I go ahead now? Do you need more details from my side? Do you still need my version with the experiment on implementing cardGrid3?

joBr99 commented 4 months ago

Can you please try to patch this limitation in the script to 9 elements? This way we can figure out if it's an issue in the HMI or the ioBroker script.

starwarsfan commented 4 months ago

Already tried this but the error stays the same.

joBr99 commented 4 months ago

What's the tft you've installed? Can you try to flash the dev version of the tft?

FlashNextion http://nspanel.pky.eu/lui-us-p.tft

I can see that there's code for the 9th entity, need to check if it's actually working or not.

starwarsfan commented 4 months ago

What's the tft you've installed? Can you try to flash the dev version of the tft?

See my initial posting, all versions written there.

FlashNextion http://nspanel.pky.eu/lui-us-p.tft

After doing so, the version seems to be the same. Still 53/v4.3.3.

starwarsfan commented 4 months ago

To clarify:

Can you please try to patch this limitation in the script to 9 elements?

I changed

            case 'cardGrid2':
                maxItems = 8;
                break;

to

            case 'cardGrid2':
                maxItems = 9;
                break;

Is that what you meant to patch?

tt-tom17 commented 4 months ago

Wenn das Script für iobroker genutzt wird muss auch der Typ angepasst werden. Patch kommt heute Nacht.

starwarsfan commented 4 months ago

Hi

Ich bin noch nicht so tief drin, wie die einzelnen Komponenten miteinander spielen.

Wenn das Script für iobroker genutzt wird muss auch der Typ angepasst werden.

Von welchem "Typ" sprichst Du hier konkret?

Patch kommt heute Nacht.

Sehr cool, thx a lot!

PS: Hab' da gleich noch zwei PRs für Kleinigkeiten gemacht, die mir so ins Auge gesprungen sind...

tt-tom17 commented 4 months ago

bitte die DEV Version testen.

starwarsfan commented 4 months ago

Hi

Super, damit funktioniert es nun mit neun Einträgen im cardGrid2.

Ich musste jedoch https://github.com/joBr99/nspanel-lovelace-ui/blob/main/ioBroker/DEV/NSPanelTs.ts#L5796 zu

if (Debug) log("Length: " + JSON.stringify(out_msgs).length);

ändern, da es den Fehler

ERROR: Argument of type 'number' is not assignable to parameter of type 'string'

gab. Danach liess sich diese Version deployen.

tt-tom17 commented 4 months ago

Ich werde das nochmal checken, da bei mir alles durchlief. Im Anschluss geht die Änderung in die Release.