lovelace-valetudo-map-card icon indicating copy to clipboard operation
lovelace-valetudo-map-card copied to clipboard

Scale map relatively to parent card (picture-elements example)

Open earglass opened this issue 2 years ago • 2 comments

When combining with picture elements, map gets weird between devices. I can position it in the center using style top & left of picture-elements card but it scales differently if card changes size. Any ideas on how to achieve relative width & height to scale together with card?

I tried map_scale, min_height with ratio, cropping, nothing seems to show correctly on both web app and mobile - screens below.

  • type: custom:valetudo-map-card entity: camera.map_data show_floor: false background_color: transparent rotate: 90 min_height: 1.4144w map_scale: 2 crop: top: 0 bottom: 0 left: 25 right: -70 segment_opacity: 0 path_color: '#00FF00' path_opacity: 0.4 wall_opacity: 1 show_no_go_areas: false style: top: 50% left: 50%

image image

earglass avatar Sep 04 '21 07:09 earglass

Looking for that too!!

datmospro avatar Jan 04 '22 19:01 datmospro

I'm here for that too.

It looks really weird if you either have to fit it on to your phone screen, but then it looks tiny on your computer screen. Or you fit it on to your computer screen and it will be cropped on the phone screen.

g0r3 avatar Jan 06 '22 18:01 g0r3