Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 106113

Floorplan Picture Entity - Only working with last added element

$
0
0

Wondered if anyone could please help. New to HA, I have created and setup my floorplans and used a sensor to change the main floor plan at different times of the day.

I have created images as icons for the lights, after setting up no matter where I click it will only turn on and off the last entity in the code. I can’t re size the state image as the image goes well off any ideas?

Also have this annoying loading icon that just randomly shows?

Appreciate anyones help!

type: picture-elements
panel: true
entity: sensor.time_of_day
state_image:
  Morning: local/ground8am.png
  Afternoon: local/ground12pm.png
  Evening: local/ground7pm.png
  Night: /local/ground7pm.png
elements:
  - type: image
    entity: light.downstairs_hallway
    state_image:
      "on": /local/groundhallway.png
    style:
      left: 50%
      top: 50%
      width: 100%
      mix-blend-mode: lighten
      filter: >-
        ${ "hue-rotate(" +
        (states['light.downstairs_hallway'].attributes.hs_color ?
        states['light.downstairs_hallway'].attributes.hs_color[0] : 0) + "deg)"}
      opacity: >-
        ${states['light.downstairs_hallway'].state === 'on' ?
        (states['light.downstairs_hallway'].attributes.brightness / 255) : '0'}
    tap_action:
      action: none
  - type: image
    tap_action:
      action: toggle
    title: Hallway
    entity: light.downstairs_hallway
    image: local/mainlight1.png
    style:
      top: 58%
      left: 26%
      border: null
  - type: image
    entity: light.living_room_tv
    state_image:
      "on": /local/groundtvled.png
    style:
      left: 50%
      top: 50%
      width: 100%
      mix-blend-mode: lighten
      filter: >-
        ${ "hue-rotate(" + (states['light.living_room_tv'].attributes.hs_color ?
        states['light.living_room'].attributes.hs_color[0] : 0) + "deg)"}
      opacity: >-
        ${states['light.living_room'].state === 'on' ?
        (states['light.living_room'].attributes.brightness / 255) : '0'}
    tap_action:
      action: none
  - type: image
    title: TV Light
    entity: light.living_room_tv
    image: local/mainlight1.png
    style:
      top: 75%
      left: 70%
      border: null
    tap_action:
      action: toggle

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 106113

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>