First you would need another input_select for your rooms in your configuration.yaml:
configuration.yaml
input_select:
floorplan_room:
name: The room to show when viewing the floorplan.
options:
- "Kitchen"
- "Bedroom"
initial: "Kitchen"
icon: mdi:floor-plan
Could you elaborate a bit more on what issue you are seeing? Are those 2 elements not displaying at all? Are they displaying but don’t resize on a smaller screen? Is it safe to assume the picture-elements card is the root card of your view?
You don’t need to post the entire contents of your yaml file, but maybe enough to give context on the hierarchy of this layout.
I think you need to add that card at the end of your elements and you will need to use a more specific placement using top and left. The width also needs to be much less otherwise it will cover your entire floorplan at 100%.
For example I just plopped this card into my floorplan to test it out. And it renders as expected with the graph card shrinking or expanding based on the width of my browser (or orientation of my phone).
type: picture-elements
image: /local/floorplan/first_floor_lights_on.png
elements:
# Lots of image elements...
# At the end of the list...
- type: "custom:mini-graph-card"
entities:
- "sensor.dyson_calc_aqi"
style:
top: 10%
left: 20%
width: 15%
Yeah, I’m not sure there’s a good way to do that, to be honest even the floorplan itself (in my case) is too small to be usable on a phone. I only access it via a web browser.
I’d imagine you would just specify a height or width in percentage on the custom card so that they resize properly. For a transparent background you would likely have to use card mod like you are already doing above for your sensor.gas_sensor. That being said I didn’t have much luck with that. I could make the background transparent but then I lost the ability to position or resize the custom card. So I’m not 100% sure the card mod plays well with picture-elements.
Hi guys, please tell me. I have formed a project. I want to make my house map my main map.
I am missing a weather map on this panel.
How can I combine type: picture-elements and, for example, the standard Weather Panel?
I managed to shape the weather using state-label. But it looks … not very pretty.
And if I add a Card at the bottom, then the card is not displayed.
Sorry for my English. I use google translate.
I don’t know of a way to do this with a builtin card like the weather-forecast card. You can do it with a custom card though by specifiying the custom type. If for example I wanted to add a big number card to my floorplan I would do this:
type: picture-elements
image: /local/floorplan.png
elements
# ... all the other elements
- type: "custom:bignumber-card"
entity: sensor.dark_sky_precip_probability_0d
title: Chance of Rain Today
scale: 30px
style:
top: 10%
left: 10%
Hi.
I’m here trying to adjust the icon but I’m not getting it. the icon does not come out of the bottom left corner. what’s wrong? can you help me?
thanks