thomasloven / lovelace-layout-card

🔹 Get more control over the placement of lovelace cards.
MIT License
1.05k stars 125 forks source link

Fix layout-break card with HA 2024.6 #293

Open piitaya opened 3 months ago

piitaya commented 3 months ago

Fixes https://github.com/thomasloven/lovelace-layout-card/issues/291 Fixes https://github.com/thomasloven/lovelace-layout-card/issues/290

I also improve the typings to support HA 2024.6.

sdrapha commented 3 months ago

Thanks so much for the fix piitaya. If anyone else, like me, are desperate to see this merged so we can fix our dashboards and recover some of the "wife-approval-rate" back, I spent 3 hours of my sleep time learning how to do it and then transpiled piitaya fix typescript into the final layout-card.js , so it can be manually swapped on the config/www folder, a band-aid until it gets merged. Here is the link of the final file https://github.com/sdrapha/lovelace-layout-card/blob/fix_break_card_ha_2024.6/layout-card.js

KentuckyMC commented 3 months ago

Thanks so much for the fix piitaya. If anyone else, like me, are desperate to see this merged so we can fix our dashboards and recover some of the "wife-approval-rate" back, I spent 3 hours of my sleep time learning how to do it and then transpiled piitaya fix typescript into the final layout-card.js , so it can be manually swapped on the config/www folder, a band-aid until it gets merged. Here is the link of the final file https://github.com/sdrapha/lovelace-layout-card/blob/fix_break_card_ha_2024.6/layout-card.js

Thanks, gonna try this tonight as well. Hopefully the experimental sections from Home Assistant are soon out of the experimental phase. Then this layout-card can go out of the window ;)

pcb1962 commented 3 months ago

Thanks so much for the fix piitaya. If anyone else, like me, are desperate to see this merged so we can fix our dashboards and recover some of the "wife-approval-rate" back, I spent 3 hours of my sleep time learning how to do it and then transpiled piitaya fix typescript into the final layout-card.js , so it can be manually swapped on the config/www folder, a band-aid until it gets merged. Here is the link of the final file https://github.com/sdrapha/lovelace-layout-card/blob/fix_break_card_ha_2024.6/layout-card.js

Is this version different to the one that @hellomarb posted here: (https://github.com/thomasloven/lovelace-layout-card/issues/291#issuecomment-2157855768?

sdrapha commented 3 months ago

Thanks so much for the fix piitaya. If anyone else, like me, are desperate to see this merged so we can fix our dashboards and recover some of the "wife-approval-rate" back, I spent 3 hours of my sleep time learning how to do it and then transpiled piitaya fix typescript into the final layout-card.js , so it can be manually swapped on the config/www folder, a band-aid until it gets merged. Here is the link of the final file https://github.com/sdrapha/lovelace-layout-card/blob/fix_break_card_ha_2024.6/layout-card.js

Is this version different to the one that @hellomarb posted here: (#291 (comment)?

All I did was fork Piitaya's repo, and git clone it, and transpile the typescrypts to javascript using the dev container. then commit to github.

The other file you mentioned is a user's single file upload, that I was not aware of at the time. That other file doesn't provide where it come from other than comments on the discussion. I figure that, one could text compare both files, IF the steps were the same, it should have the same content.

hellomarb commented 3 months ago

I used the pr of piitaya and created a normal export (like you did), only without a full dev container, only in a folder. They should be the same, with some differences in the automatic created vars. In the end: use which version you like, they all fixed the core issue we all tried to solve.

wheindl commented 2 months ago

Thanks so much for the fix piitaya. If anyone else, like me, are desperate to see this merged so we can fix our dashboards and recover some of the "wife-approval-rate" back, I spent 3 hours of my sleep time learning how to do it and then transpiled piitaya fix typescript into the final layout-card.js , so it can be manually swapped on the config/www folder, a band-aid until it gets merged. Here is the link of the final file https://github.com/sdrapha/lovelace-layout-card/blob/fix_break_card_ha_2024.6/layout-card.js

I tried this file.... upgraded to HA 2024.7, then copied this file over the file in the config/www file, and reloaded the cache. I am still getting all cards in a single column.

flightforum commented 2 months ago

Thanks so much for the fix piitaya. If anyone else, like me, are desperate to see this merged so we can fix our dashboards and recover some of the "wife-approval-rate" back, I spent 3 hours of my sleep time learning how to do it and then transpiled piitaya fix typescript into the final layout-card.js , so it can be manually swapped on the config/www folder, a band-aid until it gets merged. Here is the link of the final file https://github.com/sdrapha/lovelace-layout-card/blob/fix_break_card_ha_2024.6/layout-card.js

I tried this file.... upgraded to HA 2024.7, then copied this file over the file in the config/www file, and reloaded the cache. I am still getting all cards in a single column.

Mee, too!

sdrapha commented 2 months ago

@wheindl @flightforum , if you manually swap the .js file. you need to delete the .gz that is there. otherwise HA will fetch from the .gz instead.

flightforum commented 2 months ago

@wheindl @flightforum , if you manually swap the .js file. you need to delete the .gz that is there. otherwise HA will fetch from the .gz instead.

That worked out, thank you!

wheindl commented 2 months ago

@wheindl @flightforum , if you manually swap the .js file. you need to delete the .gz that is there. otherwise HA will fetch from the .gz instead.

That worked out, thank you!

Thanks for the tip! That worked.