now that Ildar helped me out on adding a camera view as background of a card with
ha-card {
background: url({{state_attr('camera.weerkaart_nl','entity_picture')}});
/*color: black;*/
background-repeat: no-repeat;
background-size: 100%;
}
I was wondering if card-mod-theme could do the same for a View. according to Card mod Themes Ā· thomasloven/lovelace-card-mod Wiki Ā· GitHub we can set things for
card-mod-view, and maybe use the same? Ofc I did give it a try, but not sure of the syntax for that wasnt successful just yet.
Update
card-mod-view: |
hui-masonry-view {
background: url({{state_attr('camera.weerkaart_nl','entity_picture')}});
}
actually makes happen!
as does:
card-mod-view: |
hui-masonry-view {
background: url({{state_attr('camera.weerkaart_nl','entity_picture')}});
background-repeat: no-repeat;
background-size: 100%;
}
but youād need a better stream than the 1 I test right now, showing a bit pixelatedā¦
have to figure out the view-name for the custom:layout viewsā¦ because right now I can only get it to work for the masonry-view, and not for vertical-view or horizontal-view created by that custom component.
card-mod-view: |
hui-masonry-view {
background: url({{state_attr('camera.weerkaart_nl','entity_picture')}});
}
hui-horizontal-view {
background: url({{state_attr('camera.weerkaart_nl','entity_picture')}});
}
hui-vertical-view {
background: url({{state_attr('camera.weerkaart_nl','entity_picture')}});
}
update2
found that:
horizontal-layout {
background: url({{state_attr('camera.weerkaart_nl','entity_picture')}});
}
vertical-layout {
background: url({{state_attr('camera.weerkaart_nl','entity_picture')}});
}
make it happen on the other views, probably also for grid-view, but I dont use that,so cant say for sure Doesnt work for Grid layout
trying to find a way to set a camera view on a single view, I found out that:
paper-tab[aria-label='Weer & Klimaat'] {
color: {{states('sensor.temperature_color_name')}};
background: url({{state_attr('camera.weerkaart_nl','entity_picture')}});
}
sets it to the tab in the menu bar. Pretty useless, but nice to know
this works too:
{% if state_attr('sensor.browsermod_safari','path') == '/ui-overview/weer_klimaat' %}
hui-masonry-view {
background: url({{state_attr('camera.weerkaart_nl','entity_picture')}});
}
{% endif %}
but isnt yet what I am looking for