r/homeassistant Jan 02 '25

Pokemon Style Floor-Plan

I saw u/mythriz Zelda style floor-plan and that finally gave me the perfect Idea for my own home! I tried MyHome3D and just basic 2D SVG variants but I was never quite satisfied. Mimicking a game however was exactly my taste. I'm more a Pokémon kinda guy so I got going with the tilesets you can find on archive.org. Of course Pokémon doesn't have everything you need in a modern home, like flat-screen TVs or L-shaped sofas, even stuff like a sideways bed was missing since the game really isn't layed out to work like that. So I had to create some assets myself or modified existing ones.

The Daylight version is on the second slide. Everything has been put together with picture-elements card. Covers and appliances are still wip. (And yes the disappearing table has been noticed already...)

I'll gladly answer your questions.

4.5k Upvotes

136 comments sorted by

View all comments

2

u/Akashic101 Jan 07 '25

I am trying the same and so far it works great, however I struggle with getting the light-image to overlap on the correct spot on all devices. On PC it looks like this while on mobile it overlaps perfectly. The conditional image does have the

transform: none
left: 0%
top: 0%

so it should fit but alas....

The yaml looks like this, maybe you see anything that throws things off:

square: true
type: grid
cards:
  - type: picture-elements
    elements:
      - type: conditional
        conditions:
          - condition: state
            entity: light.living_room_ikea_bulb_leuchte
            state: "on"
        elements:
          - type: image
            style:
              transform: none
              left: 0%
              top: 0%
            image: /local/living-room.png
      - type: action-button
        action: light.toggle
        title: ""
        data: {}
        target:
          device_id: e0f0c743614b010a18f785344fd1b48c
        style:
          transform: none
          left: 45%
          top: 40%
    image: /local/out.png
columns: 1

1

u/katschung Jan 07 '25

I have my lights on a transparent canvas with the same dimensions as my background. If you want to use smaller single light files you could try absolute positioning with 'px' instead '%'

1

u/Akashic101 Jan 07 '25

That's the weird part, both of my images have the same dimensions. Here is the layout and here the lights. If its not too much to ask could you maybe take a look and see if you can reproduce my situation? I am still pretty new to HA and maybe I took a wrong step somewhere before

1

u/katschung Jan 12 '25

I tried to replicate ot but thats a bigger rabbithole than i thought. Can't help you it seems. I'm sorry.