I want to put a local background image on the oh-label-card
how do I do it?
Hi @razserv2010 , you are using MainUI? If so:
Go to the ‘Pages’ side menu, then select it and you should see ‘Home Page’ in the list of pages to the right of the settings menu. Do you see that page?
Hey, I do not think you understand me,
I meant if it is possible to change the color background to the background image
component: oh-label-card
config:
action: navigate
actionPage: page:Blinds
actionPageTransition: f7-flip
background: "linear-gradient(to bottom right, #D7BC71 10%, #ff89cc 100%)"
label: תריסים
fontWeight: bold
icon: oh:blinds
vertical: true
Ah, right. Yep that’s something I haven’t played around with. Does setting a file location for the background work? As in:
/static/pacman.jpg
with the file ‘pacman.jpg’ placed in the html folder?
I tried, does not work
I think this will help you:
Something like this? (replace packman.jpg with your file name)
Component: oh-label-card
config:
action: navigate
actionPage: page:Blinds
actionPageTransition: f7-flip
backgroundImage: /static/pacman.jpg
filter: brightness(60%)
position: absolute
label: תריסים
fontWeight: bold
icon: oh:blinds
vertical: true
It works if I put a URL of a picture from the internet but local, does not work for me
And this is the location of the file locally
/static/map.jpg
not working
Even that does not work, I think I have a permissions issue …
openhabian@openhabian:~ $ find / -name map.jpg
/srv/openhab-conf/static/map.jpg
find: ‘/lost+found’: Permission denied
That’s is saying you don’t have permission to the lost+ found folder.
Just run this command and it will show the permissions.
ls -l /srv/openhab-conf/static/map.jpg
That file is not in the right place anyway.
It should be in here:
/etc/openhab/html
Copy your map.jpg file to the /etct/openhab/html folder.
You do not need to create a static folder.
Also to test the web page use your IP address of the openhab server. For example:
http://192.168.0.164:8080/static/map.jpg
If you use localhost to test it then that will only work if you are running the browser on the same computer as openhab is running on.
Good luck.
True, I forgot about that!
I copied the file to this path but it still does not work for me
I was trying to add a background image and a web search took me to this page. I wish instead it had taken me to Pages - Overview Page | openHAB as it has a good explanation there.