ozzi91
(ozzi91)
January 30, 2019, 2:04pm
1
Hello!
I am trying to use lovelace and i get trouble with frontend of hassio.
There is my config and how it looks like:
cards:
I am getting these images from: http://www.meteo.pl/um/php/meteorogram_id_um.php?ntype=0u&id=606
I would like to make this card without any scrolls (scale it down somehow?) and these diagram legend be like this link above, the same dimensions. How to make it? Any solutions? Scale manualy this diagram legend down?
Ty in advance.
Why dont you just use a “Picture card”
Or set the picure as a camera sensor
wmaker
(Tommy Long)
January 30, 2019, 10:29pm
3
Picture Card is what I currently use for Meteo using Camera component and Generic platform to acquire the image.
configuration.yaml:
camera:
- platform: generic
name: Weather
still_image_url: <your www.meteo.pl url>
content_type: <See camera component Generic Camera>
and lovelace:
- type: picture-entity
name: Meteogram for xxxx
entity: camera.weather
camera_image: camera.weather
tap_action:
action: more-info
Tap on the picture and it enlarges.
The only drawback is there is a gray transparent bar at the bottom of the image that also shows a state of the camera.
iantrich
(Ian)
January 31, 2019, 2:03pm
4
wmaker
(Tommy Long)
January 31, 2019, 6:55pm
5
Ah thanks for that!..and if both show_state
and show_name
are false, no gray transparent bar at all.
1 Like
ozzi91
(ozzi91)
January 31, 2019, 10:26pm
6
I dont know what a
content_type: <See camera component Generic Camera>
should i set up, Could you give me a hint? I need only these 2 images with meteogram and meteogram legend. Can u help me?
wmaker
(Tommy Long)
February 1, 2019, 4:45am
7
Take a look…
and this
A media type (also known as a Multipurpose Internet Mail Extensions or MIME type) indicates the nature and format of a document, file, or assortment of bytes.
MIME types are defined and standardized in IETF's RFC 6838.
I think your pictures are png, so try
content_type: ‘image/png’
ozzi91
(ozzi91)
February 2, 2019, 5:22pm
8
I already tried it and it is not working Any ideas?
wmaker
(Tommy Long)
February 2, 2019, 11:04pm
9
The following worked for me
camera:
- platform: generic
name: Weather
still_image_url: 'http://www.meteo.pl/um/metco/mgram_pict.php?ntype=0u&fdate=2019020218&row=458&col=225&lang=pl'
content_type: 'image/png'
Lovelace:
- type: picture-entity
name: Weather (Picture Entity)
entity: camera.weather
camera_image: camera.weather
show_info: true
#tap_action: dialog
tap_action:
action: more-info
ozzi91
(ozzi91)
February 3, 2019, 1:10am
10
That is working but u need to look at the structure of link which is not the same day after day.
still_image_url:
http://www.meteo.pl/um/metco/mgram_pict.php?ntype=0u&fdate=**20190202**18&row=458&col=225&lang=pl
That means link changes everyday like days For example if u type 01 instead 02 it will shows different image. We need sth smarter