lukevink / hass-config-lajv

Home Assistant Configuration

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

left, top and width

olegosipenko87 opened this issue · comments

Tell me please
how did you calculate these values ​​so accurately?

left, top and width

        - action: none
          entity: binary_sensor.bathroom
          image: /local/ui/floorplan/lights/bathroom.png
          state_filter:
            'off': opacity(0%)
            'on': opacity(100%)
            unknown: opacity(0%)
          style:
            left: 76.85%
            top: 78.2%
            width: 46.1328125%
            mix-blend-mode: lighten
          tap_action:
            action: none
          type: image

Hmm thats a really good question. I'm pretty sure I took the pixel width of my PSD files and got a percentage using thier x and y position in the document with a bit of simple math haha. Sounds a little OCD indeed - I don't think you need to be THIS accurate, but I wanted my pictures to map perfectly.