• 2 Posts
  • 44 Comments
Joined 3 years ago
cake
Cake day: August 4th, 2023

help-circle



  • Thanks! took me a little under a week of tweaking here and there.

    I learned that you should really just want until you’re SURE you’re done with the 3d model before making images and getting into the HomeAssistant part. Saves you from doing the same repetitive stuff over and over when you want to make a change.

    its really not that hard, I bet you’d get the hang of it fast. Just start with the SweetHome3D part, once you are happy with it move on to the Gimp part.

    dont settle for the built in resources that arent exactly what your furniture looks like. this site has practically everything: https://3dwarehouse.sketchup.com/










  • 4lan@lemmy.worldOPtohomeassistant@lemmy.worldFinally made a Floorplan!
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    24 hours ago

    idk what site to use these days lol. i thought i was using file.io but i guess they got acquired? too long to put in a comment reply, it cuts off :/

    this is the begining, shows the basics of how its set up. One image for white, one image for red (used for colors). lowest opacity is 40%, so that they don’t look off when they are really dim.

    type: picture-elements
    image:
      media_content_id: /local/home/bg5.png
      media_content_type: ""
      metadata:
        navigateIds:
          - {}
          - media_content_type: ""
            media_content_id: __MANUAL_ENTRY__
    elements:
      - type: conditional
        conditions:
          - condition: state
            entity: light.livingroom_ceiling
            state: "on"
        elements:
          - type: image
            entity: light.livingroom_ceiling
            image: /local/home/livingroom.png
            style:
              left: 50%
              top: 50%
              width: 100%
              pointer-events: none
            card_mod:
              style: |
                :host {
                  {% set mode = state_attr('light.livingroom_ceiling', 'color_mode') %}
                  {% if mode not in ['rgb', 'hs', 'xy'] %}
                    opacity: {{ 0.4 + (state_attr('light.livingroom_ceiling', 'brightness') | float(0) / 425) }};
                  {% else %}
                    opacity: 0;
                  {% endif %}
                }
          - type: image
            entity: light.livingroom_ceiling
            image: /local/home/livingroom-red.png
            style:
              left: 50%
              top: 50%
              width: 100%
              pointer-events: none
            card_mod:
              style: |
                :host {
                  {% set mode = state_attr('light.livingroom_ceiling', 'color_mode') %}
                  {% set hs = state_attr('light.livingroom_ceiling', 'hs_color') %}
                  {% if mode in ['rgb', 'hs', 'xy'] %}
                    opacity: {{ 0.4 + (state_attr('light.livingroom_ceiling', 'brightness') | float(0) / 425) }};
                    filter: hue-rotate({{ hs[0] if hs else 0 }}deg) saturate(500%);
                  {% else %}
                    opacity: 0;
                  {% endif %}
                }
    



  • SweetHome3D does that part.
    You export an image for every light, where its the only light on. Everything is black except where the light shines. Make those black parts transparent in Gimp or PS.

    now when you layer them you have each light’s beams all intersecting and mixing.
    There is a background image where all lights are off that they all stack on top of

    Its far simpler than you might imagine.