Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assistance - Pictures instead of icons #430

Open
Roving-Ronin opened this issue Oct 8, 2024 · 6 comments
Open

Assistance - Pictures instead of icons #430

Roving-Ronin opened this issue Oct 8, 2024 · 6 comments

Comments

@Roving-Ronin
Copy link

In the examples it mentions using pictures instead of icons and shows an example with wheelie bins:

image

or like this (needing Red, Green and Yellow tops):
image

Are these wheelie bin type pictures available to download? If so, from where ?

Thanks in Advance.

@theitghost
Copy link

If i want use a big picture, they have all only a small Icon format. Can not change the size.

@barthel-eu
Copy link

I have the same problem that the "picture" is showing only in default icon size. icon_size:200 does not change anything. It would be very helpful to have a code example how to set up like in the example of the wheeled trash can.
Aside, it is in a horizontal layout but fill_container: true does not result in a fill of the area either, nor can I make it show a background, would likely need to do that on the image? PEBKAS? Or "feature"?

event_grouping: true
drop_todayevents_from: "10:00:00"
next_days: 3
icon_size: 100
fill_container: true
full_size: true
pattern:
  - icon: mdi:leaf-circle-outline
    color: green
    type: organic
    pattern: Grüne Tonne
    picture: /local/images/trashcan-green.png
  - icon: mdi:newspaper
    color: blue
    type: paper
  - icon: mdi:recycle
    color: amber
    type: recycle
    pattern: Wertstofftonne
    picture: /local/images/trashcan-yellow2.png
  - icon: mdi:trash-can-outline
    color: grey
    type: waste
    pattern: Graue Tonne
    picture: /local/images/trashcan-black.png
  - icon: mdi:dump-truck
    color: purple
    type: others
day_style: weekday
card_style: icon
alignment_style: left
color_mode: icon
items_per_row: 1
refresh_rate: 60
with_label: true
type: custom:trash-card
entities:
  - calendar.apps_by_abfall
use_summary: false

I tried changing "icon" also to the picture:

  - icon: /local/images/trashcan-green.png
    color: green
    type: organic
    pattern: Grüne Tonne
    picture: /local/images/trashcan-green.png

Or remove the line icon:
No change (background is a NASA image, next to the trash card is a gauge in default size). Whatever I do, the trash card doesn't change the icon size:
tmp

@barthel-eu
Copy link

P.S.: My trashcan icon: trashcan-green
It's adapted for my personal use from one I found on the web, so not public domain.

@specularius
Copy link

it looks like the icon size configuration only works for icons, not for images

@barthel-eu
Copy link

But if it only works on icons, the description on https://github.com/idaho/hassio-trash-card/ shows incorrect, as seen also in the original post of this thread (second picture)?
https://github.com/idaho/hassio-trash-card/assets/664101/212537e0-65d3-4c2c-a25c-9431d7ff04b9 shows the trashcan image in different sizes. Image is last one in https://github.com/idaho/hassio-trash-card/ used. Or how would I achieve the first example?
Would be nice to have the code for the examples somewhere to know how to achieve those variants?

@mrgrey916
Copy link

mrgrey916 commented Dec 18, 2024

What I did was I used the wheelie bin images from this website https://wheeliebinwarehouse.com/wheelie-bin-240-litre/ then used Photoshop (use Photopea https://www.photopea.com if you don't have Photoshop) to combine 2 wheelie bins, for example my paper recycling is a black with purple lid bin, so I just put the black and purple bins in the same file then drew a mask around the lid to only leave the purple lid on top of the black bin. I removed the white background so it was be transparent, but you could add whatever you wanted behind. I also resized the canvas to 1200 x 1200 so the width matched the height of the original image and when I exported I set the export scale to 50% to reduce file size.

You could also change the Hue & Saturation settings to change colours if there's not an image available. I've saved all the 240L wheelie bin images on their website in case they disappear and I need to make another colour combination or I get another bin, or I implement an HA for family who have different bins.

Here's my example, the next 4 collections are shown, but in my dashboard I only show the next 2 collections:
wheelie-bin-example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants