endor-force / lovelace-carnet

Home-Assistant lovelace ui image card
37 stars 5 forks source link

How to add to new lovelace interface? #1

Open VitaliFrolov opened 4 years ago

VitaliFrolov commented 4 years ago

Can this card be added to the new lovelace interface without the yaml file? Via manual card.

endor-force commented 4 years ago

Sorry i have no insight or experience with the non-yaml editor.

RealElwood commented 4 years ago

Can this card be added to the new lovelace interface without the yaml file? Via manual card.

Yes it can, it's pretty straight forward, just paste all the info into manual card. That's what i did, below is my code. Copy+paste should work

elements:
  - entity: switch.passat_gte_climatisation
    image: /local/carnet/blank.png
    state_image:
      'on': /local/carnet/passat_heat.png
    style:
      left: 55%
      top: 39.5%
      width: 43%
    type: image
  - entity: binary_sensor.passat_gte_external_power
    image: /local/carnet/blank.png
    state_image:
      'on': /local/carnet/passatcharging.png
    style:
      left: 21.2%
      top: 62.8%
      width: 43%
    type: image
  - entity: binary_sensor.passat_gte_parking_light
    image: /local/carnet/blank.png
    state_image:
      'on': /local/carnet/passat_light.png
    style:
      left: 37.2%
      top: 66.8%
      width: 37%
    type: image
  - entity: lock.passat_gte_doors_locked
    image: /local/carnet/blank.png
    state_image:
      locked: /local/carnet/blink.gif
    style:
      left: 57%
      top: 42.3%
      width: 2%
    type: image
  - entity: lock.passat_gte_doors_locked
    style:
      left: 47%
      top: 87%
    type: state-icon
  - entity: switch.passat_gte_climatisation
    hold_action: toggle
    style:
      left: 58%
      top: 87%
    type: state-icon
  - entity: switch.passat_gte_window_heater
    hold_action: toggle
    style:
      left: 69%
      top: 87%
    type: state-icon
  - entity: switch.passat_gte_charging
    style:
      left: 80%
      top: 87%
    type: state-icon
  - entity: sensor.passat_gte_battery_level
    style:
      left: 81%
      top: 96%
    type: state-label
  - entity: sensor.passat_gte_fuel_level
    style:
      left: 91%
      top: 87%
    type: state-icon
  - entity: sensor.passat_gte_fuel_level
    style:
      left: 92%
      top: 96%
    type: state-label
image: local/carnet/passat.png
type: picture-elements
VitaliFrolov commented 4 years ago

Thank you! I managed to add the card now.