lovelace-xiaomi-vacuum-map-card icon indicating copy to clipboard operation
lovelace-xiaomi-vacuum-map-card copied to clipboard

Feature Request: Card Side by Side

Open mcfly2283 opened this issue 3 years ago • 50 comments

Description

The Card with its Sensor-Tiles are very high at all. It would be great if there is an Option to place the Map and Tiles Side by Side. Especially with a Wallpanel, the palcement could be very Hard.

Solution

Optional Side by Side-View MAP-TILES

Alternatives

No response

Context

No response

mcfly2283 avatar Nov 18 '21 10:11 mcfly2283

Something like this?

image

PiotrMachowski avatar Nov 18 '21 12:11 PiotrMachowski

It's possible to do it using card-mod:

...
style: |
  ha-card {
    display: flex !important;
    align-items: stretch;
    flex-wrap: wrap;
    justify-content: space-evenly;
  }
  .map-wrapper {
    flex-grow: 3;
    width: 600px;
  }
  .controls-wrapper {
    flex-grow: 1;
    width: 300px;
  }

PiotrMachowski avatar Nov 18 '21 12:11 PiotrMachowski

Yeah, thats it! Thank you, I'll give it a try

mcfly2283 avatar Nov 18 '21 13:11 mcfly2283

There is only a slight problem...

image

PiotrMachowski avatar Nov 18 '21 14:11 PiotrMachowski

Very Cool, now it fits the the whole Screen, overlaid with some Quick-Buttons Im only using predefined-zones as preselect, so that "glitch" is not a Problem. image

Thank you for your continuous Work!

mcfly2283 avatar Nov 18 '21 21:11 mcfly2283

That looks great! How are these buttons made?

PiotrMachowski avatar Nov 18 '21 22:11 PiotrMachowski

This is a 1-Panel made with custom:layout-card in Grid-Mode. The Buttons are just simple buttons and thanks to the 1-Panel-Grid you can place it wehre you want inside the (static) grid, even onto other Cards. With that you can do cool Graphic-Overlays when the post man arrives ;) :

image

mcfly2283 avatar Nov 18 '21 22:11 mcfly2283

Neat idea 👍 by the way, you can add additional tiles and icons with your own sensors/service calls ;)

PiotrMachowski avatar Nov 18 '21 22:11 PiotrMachowski

I have installed card_mod and added below to the bottom of the card, but it doesn't split.

card-mod:
  style: |
    ha-card {
      display: flex !important;
      align-items: stretch;
      flex-wrap: wrap;
      justify-content: space-evenly;
    }
    #map-wrapper {
      flex-grow: 3;
      width: 600px;
    }
    .controls-wrapper {
      flex-grow: 1;
      width: 300px;
    }

tempmaseg avatar Nov 19 '21 10:11 tempmaseg

You have to use the right Dashboard-View. Try to use the 1-Panel or the other new "Sidebar", dont know how its realy called in english

mcfly2283 avatar Nov 19 '21 11:11 mcfly2283

Thanks @mcfly2283 !

@PiotrMachowski , if it is not to complicated it would be great to be able do decide if the tiles should be above the map or vice versa.

tempmaseg avatar Nov 19 '21 15:11 tempmaseg

@mcfly2283 The current configuration stretches the card horizontally, is it possible to also stretch vertically so that the card fills the whole page?

Denow avatar Nov 20 '21 13:11 Denow

@Denow height of the card is adjusted to match map proportions. You can change them by adding crop (with big left and right values in your case) to your settings:

...
map_source:
  camera: camera.vacuum
  crop:
    top: 10
    bottom: 10
    left: 100
    right: 110

PiotrMachowski avatar Nov 20 '21 14:11 PiotrMachowski

Unfortunately that was a short Story. Since the last Update of card-mod, the View does not work anymore. Maybe the Syntax has changed or something like that.

I can`t fix it for myself.

mcfly2283 avatar Nov 22 '21 10:11 mcfly2283

Definitely would love to see this feature as I'm also trying to use this card on a wall mounted tablet.

shred86 avatar Dec 05 '21 01:12 shred86

This would be a great feature for an already great card :)

idogrf avatar Dec 05 '21 06:12 idogrf

@mcfly2283 have you managed to figure it out using card mod?

PiotrMachowski avatar Dec 05 '21 13:12 PiotrMachowski

No, after the last update of card-mod the syntax above won‘t work for me and i don’t have the knowledge to get this working again.

mcfly2283 avatar Dec 05 '21 15:12 mcfly2283

Thanks @mcfly2283 !

@PiotrMachowski , if it is not to complicated it would be great to be able do decide if the tiles should be above the map or vice versa.

That would indeed be a good option to have! Really waiting for that as well! Also, as I mentioned in #247, when using panel mode, the crop function doesn't work.

kimme1024 avatar Dec 09 '21 14:12 kimme1024

@kimme1024 I'm pretty sure that it works. Are you sure you have provided big enough values to notice change?

PiotrMachowski avatar Dec 09 '21 15:12 PiotrMachowski

@kimme1024 I'm pretty sure that it works. Are you sure you have provided big enough values to notice change?

Aha! I was assuming that the cropping was relative to the picture itself but it's relative to the dashboard it's displayed on... I increased the crop values and now it works!

Thanks!

kimme1024 avatar Dec 09 '21 15:12 kimme1024

@kimme1024 hmmmm, that seems to be a little bug 😉

PiotrMachowski avatar Dec 09 '21 15:12 PiotrMachowski

@kimme1024 hmmmm, that seems to be a little bug 😉

It would indeed make more sense if your crop was correct for any way of displaying it.

When using tile top and bottom are 100 When using panel top and bottom are 320 and 310 to be displayed correctly on my wall tablet, however then it doesn't display correctly on any other screen than the tablet...

kimme1024 avatar Dec 09 '21 15:12 kimme1024

Very Cool, now it fits the the whole Screen, overlaid with some Quick-Buttons Im only using predefined-zones as preselect, so that "glitch" is not a Problem. image

Thank you for your continuous Work!

Hi @mcfly2283 , please would you show the custom button position configuration. I don't understand how you got them over you. Thank you.

ddmmcz avatar Jan 03 '22 20:01 ddmmcz

Very Cool, now it fits the the whole Screen, overlaid with some Quick-Buttons Im only using predefined-zones as preselect, so that "glitch" is not a Problem. image Thank you for your continuous Work!

Hi @mcfly2283 , please would you show the custom button position configuration. I don't understand how you got them over you. Thank you.

Hi, sure, here is my Dashboard-Config. The Config for the newer Version of custom:layout-card is mostly different due to some major changes in the recent past. Im using an old Version, no. "16" and don`t have time to migrate this...

https://pastebin.com/GyvbPYx5

mcfly2283 avatar Jan 04 '22 13:01 mcfly2283

Hi, sure, here is my Dashboard-Config. The Config for the newer Version of custom:layout-card is mostly different due to some major changes in the recent past. Im using an old Version, no. "16" and don`t have time to migrate this...

https://pastebin.com/GyvbPYx5

Thank you very much!

ddmmcz avatar Jan 04 '22 13:01 ddmmcz

Very Cool, now it fits the the whole Screen, overlaid with some Quick-Buttons Im only using predefined-zones as preselect, so that "glitch" is not a Problem. image Thank you for your continuous Work!

Hi @mcfly2283 , please would you show the custom button position configuration. I don't understand how you got them over you. Thank you.

Hi, sure, here is my Dashboard-Config. The Config for the newer Version of custom:layout-card is mostly different due to some major changes in the recent past. Im using an old Version, no. "16" and don`t have time to migrate this...

https://pastebin.com/GyvbPYx5

Hi @mcfly2283 is possible to show one of the "script.cleanup"?

Thanks a lot

Ender3Pro avatar Jan 17 '22 20:01 Ender3Pro

Hi @mcfly2283 is possible to show one of the "script.cleanup"?

Thanks a lot

Hi, my control scripts:

empty_dust_bin:
 alias: Vycisteni zasovniku vysavace
 sequence:
 - data:
     command: app_goto_target
     params: [28471,30389]
   service: vacuum.send_command
   entity_id: vacuum.roborock_vacuum_a10

obyvak_stul:
 alias: Vysavac ke stolku
 sequence:
 - data:
     command: app_goto_target
     params: [23198,26294]
   service: vacuum.send_command
   entity_id: vacuum.roborock_vacuum_a10

ddmmcz avatar Jan 21 '22 18:01 ddmmcz

(Thanks ddmmcz)

Has anybody fixed the card-mod Side-by-Side View?. I've tried many things, but it still won't work.

card-mod:
  style: |
    ha-card {
      display: flex !important;
      align-items: stretch;
      flex-wrap: wrap;
      justify-content: space-evenly;
    }
    #map-wrapper {
      flex-grow: 3;
      width: 600px;
    }
    .controls-wrapper {
      flex-grow: 1;
      width: 300px;
    }

mcfly2283 avatar Jan 22 '22 10:01 mcfly2283

Has anybody fixed the card-mod Side-by-Side View?. I've tried many things, but it still won't work.

I have it like this -> https://pastebin.com/CYpaE3f3

image

ddmmcz avatar Jan 22 '22 15:01 ddmmcz