Closed FHeilmann closed 10 months ago
@FHeilmann it is indeed an interesting the idea.. but please let's make a point here too.
As soon I can study an how to.. but please understand right now I do have to address other basic function first, I would come back on it.. anyhow if you are willing to contribute.. you can always fork the project and of course you will found my full cooperation if you would start or have in mind how to design such function... for the time be I would propose we keep this as an open discussion if you agree ;) when you agree I will move it to the discussions.
Thank you for your timely and thorough response.
I'm fine with however way you want to approach the issue. Given that I "solved the issue" by modifying piotr's card it might make sense to make this change in the card instead. I might reach out to him about that.
I'm fine with moving this to discussions. Also please don't feel rushed in any way.
Bests,
Florian
Thank you for your timely and thorough response.
I'm fine with however way you want to approach the issue. Given that I "solved the issue" by modifying piotr's card it might make sense to make this change in the card instead. I might reach out to him about that.
I'm fine with moving this to discussions. Also please don't feel rushed in any way.
Bests,
Florian
Florian, I will work on the card too, and discuss about it with Piotr (that is at the moment quite busy). Anyhow I will keep this open as per the idea you had is quite interesting to me, this would solve an issue that other users have using the VM's instead of real hardware... mmmmm we will see, but please I will need a little time as above explained for it ;)
@FHeilmann Dear Florian, Wishing you all the best and a serine xMas time, I just had an idea that I would like to share with you. At current the camera is detecting the edges of the image as explained above. I'm thinking to make so that as soon the rooms are detected the image trimming will be update with the rooms layout data. This should remove the lidar imperfections and reduce already the images sizes a lot. We do use to draw the map also pixel_size that could be used to "re-scale" the image, actually changing the pixel size of the rendered image result in a smaller image too (from some test I did). The standard pixel_sizes are 5 or 7 according to the default values Valetudo that I've collected but of course this do not matter, I mean we receive it with the image data from the Vacuum, and we can use a scale variable that default would be the standard pixel_value to scale factor. This should allow to implement the function you request on the camera without to compromise the calibration_points, I mean I think make possible to change the image ratio and implement it by the images option. I will start to work on this direction for the required modifications.. and open a PR for this as per once I make stable the 1.5.x this can be implemented as a major change (if it will work). Once Again thanks a lot for the Valuable advise here, all the best, Sandro
Dear @sca075, thank you and all the best to you and yours as well. I just realized we had a bit of a misunderstanding.
I'm not talking about scaling the image, im talking about changing the aspect ratio, padding one dimension so that the image becomes wider or taller as a result. Let me show you what I mean with a screenshot from my current setup (modded with card mod)
As you can see the camera image does not occupy the entire width of the card (and therefore the image is less tall and fits on the screen without scrolling. This would've been easier if I could change the aspect ratio of the image (from the rectangular 1:1 to, e.g. 2:1 in my case)
Hope this clarifies my issue.
All the best. Florian
got it but let me clarify the pixel_size is actually the image aspect ratio.. it means the image will reduce in size too.. anyhow the card is going to make it full size, therefore zooming out two times and locking the aspect ratio will result on the same as per your example, I will work on it the next year ;)
Description
Hi, first of all, thanks for the absolutely amazing addon that you provided here. It replaced a bunchof manual work I needed to do to enable using my Valetudo Vacuum with the
lovelace-xiaomi-vacuum-map-card
!I have the card set up on my dashboard together with a few buttons and stats cards to display things like RSSI, consumables, etc. Unfortunately, on one of my wallmounted tablets, this causes the resulting card to exceed the available vertical screen space. I have since used
card-mod
to tweak the aspect ratio of the map image, but I'd prefer to be able to use the configuration of this integration to set an aspect ratio for the camera image (e.g. 2:1) or explicit width and height (e.g. 400x200).Thank you for considering this feature request.
Florian
Solution
Integration allows to set aspect ratio of the camera image, resulting image provided to home assistant is padded to achieve desired aspect ratio
Alternatives
Integration allows to set explicit width and height of the camera image
Context
No response