I like the visualization of the locations on the overview page very much. Is there a way to use specific location-cards in own pages (e.g. layer pages), e.g. to split the locations to different pages.
I tried to copy the oh-location-card-component from the Overview YAML configuration to my own page but it’s not working.
Is there a way to reuse this awesome visualization?
@ysc for the ignorant of us who have no idea of the effort required - is this something that would be possible in the future?
Also wondering if its not possible for reasons mortals may not understand, could it be possible to expose the YAML of the card “at this time” we could copy to a personal widget - this would speed up statically creating personal widgets based on locations ENORMOUSLY, obviously as the location changes this would need to be redone if we were to keep the location card and the personal widget “the same”
Yeah I’m sure there is more to it than meets the eye just thought it would be a way to get location widgets up and running quick - I was thinking more of a “convert contents to yaml” than reading the source of the actual card. The way I have my old school site map is quick access items at the top with every room below - without basically recreating the location card on a page I can’t see how to do this quickly -
Other alternative could be to allow masonry on the location page?
i have a related question, would it be possible to add the tab´s of the overview page on every of my own created pages? I want to be more consistent and increase the usability. If i am now in a created page ( like Wohnzimmer ) i need to open the left navigation, click on the openhab logo to go back to the overview page first be able to use the bottom tabs again to eventually go to the location overview.
I have made 2 widgets like the location widget that you can use.
The first:
The tittle have a prop to open another page.
The image have a link to my Sonos widget and shows the current album cover or radio station.
The glance icons are replaced by 4 buttons and have props that can be linked to open the groupdetails of lights, temperatures, heating and cooling.
uid: Location_card_extended
tags:
- location
- extended
props:
parameters:
- description: Set the location name
label: Location name
name: Location_Name
required: false
type: TEXT
groupName: general
- description: Set the subname
label: Sub tittle
name: Sub_Tittle
required: false
type: TEXT
groupName: general
- context: page
label: Page to navigate to
name: targetPage
required: false
type: TEXT
groupName: general
- description: Set the Sonos player prefix
label: Sonos player
name: sonos_Prefix
required: false
type: TEXT
groupName: media
- context: item
description: Album Cover-art or other image
label: Cover-art
name: coverArt
required: false
type: TEXT
groupName: media
- description: Select a background card color eg.'rgb(57,60,76)' or 'lime'
label: Background color
name: Background_Color
required: false
type: TEXT
groupName: color
- context: item
description: Select group lights
label: Lights group
name: activeLights
required: false
type: TEXT
groupName: group
- context: item
description: Select group temperatures
label: Temperatures group
name: groupTemperatures
required: false
type: TEXT
groupName: group
- context: item
description: Select actual room temperature
label: Temperature item
name: RoomTemperature
required: false
type: TEXT
groupName: state
- context: item
description: Select the heating setpoint temperature for the room
label: Heating setpoint item
name: HeatSetpoint
required: false
type: TEXT
groupName: state
- description: Select icon color heating valve state
label: Heating valve icon color
name: heatingValve
required: false
type: TEXT
groupName: color
- context: item
description: Select the cooling setpoint temperature for the room
label: Cooling setpoint item
name: CoolingSetpoint
required: false
type: TEXT
groupName: state
parameterGroups:
- name: general
label: General settings
- name: color
label: Color settings
- name: group
label: Buttons group settings
- name: state
label: Items state settings
- name: media
label: Sonos settings
- name: actionHeating
context: action
label: Action Heating button
- name: actionCooling
context: action
label: Action Cooling button
timestamp: Feb 27, 2021, 8:53:46 PM
component: f7-card
config:
padding: true
style:
position: relative
border-radius: 15px
border-color: lime
height: 200px
background-color: =(props.Background_Color)
slots:
default:
- component: f7-card-content
config:
padding: true
slots:
default:
- component: oh-link
config:
visible: true
color: white
action: popup
actionModal: =props.targetPage
class:
- no-padding
- no-margin
style:
width: 65%
height: 60%
position: absolute
top: 0
left: 0
z-index: 98
- component: Label
config:
text: =(props.Location_Name)
style:
height: 45px
position: relative
left: 0px
top: -5px
letter-spacing: .75px
font-size: min(max(28px, 4vw), 30px)
font-weight: 600
color: white
- component: Label
config:
text: =(props.Sub_Tittle)
style:
height: 35px
position: relative
left: 0px
top: -12px
width: 100%
letter-spacing: .75px
font-size: min(max(20px, 4vw), 25px)
color: rgba(255,255,255,.9)
- component: oh-image
config:
item: =props.coverArt
visible: "=props.coverArt ? true : false"
action: popup
actionModal: widget:Sonos_Player
actionModalConfig:
itemTitle: =props.sonos_Prefix + "_MediaTitle"
itemCover: =props.sonos_Prefix + "_CurrentAlbumCoverArt"
propWidgetTitle: = "Sonos " + (props.Location_Name)
itemArtist: =props.sonos_Prefix + "_MediaArtist"
itemPlayer: =props.sonos_Prefix + "_MediaControl"
itemVolume: =props.sonos_Prefix + "_Volume"
itemShuffle: =props.sonos_Prefix + "_Shuffle"
itemRepeat: =props.sonos_Prefix + "_Repeat"
propZoneName: =(props.Location_Name)
style:
position: absolute
right: 15px
top: 20px
height: 100px
width: 100px
- component: oh-button
config:
action: group
actionGroupPopupItem: =props.activeLights
raised: true
round: true
text: =items[props.activeLights].state.split(".")[0]
visible: "=props.activeLights ? true : false"
color: white
iconMaterial: lightbulb
iconSize: 18px
iconColor: white
style:
position: relative
width: 106px
font-size: 16px
top: 0px
left: -13px
text-align: left
- component: f7-row
config:
style:
position: absolute
top: 125px
height: 25px
left: 5px
slots:
default:
- component: oh-button
config:
action: group
actionGroupPopupItem: =props.groupTemperatures
raised: true
round: true
text: =items[props.RoomTemperature].state
visible: "=props.RoomTemperature ? true : false"
color: white
iconF7: thermometer
iconSize: 18px
iconColor: white
style:
position: relative
width: 106px
font-size: 16px
left: -1px
text-align: left
- component: oh-button
config:
actionPropsParameterGroup: actionHeating
outline: false
raised: true
round: true
text: =items[props.HeatSetpoint].state
visible: "=props.HeatSetpoint ? true : false"
color: white
iconF7: flame
iconSize: 18px
iconColor: =props.heatingValve
style:
position: relative
Top: 200px
width: 105px
font-size: 16px
text-align: left
- component: oh-button
config:
actionPropsParameterGroup: actionCooling
outline: false
raised: true
round: true
text: =items[props.CoolingSetpoint].state
visible: "=props.CoolingSetpoint ? true : false"
color: white
iconMaterial: ac_unit
iconSize: 19px
iconColor: white
style:
position: relative
Top: 200px
width: 106px
font-size: 16px
text-align: left
The second is the same but have 9 buttons that you can completely set by props, what you want
very nice widgets, Philippe. I will come back to them for some use cases on my overview page. I am not sure if this was in reply to my question.
Let me re-phrase my question: Simply speeking my desire is wherever i am in my different pages selected from the left menu i want to keep the same bottom navigation visible like in the overview page. Is this possible or not and if yes how and if no is it related to the above discussion?
I have searched like you to have the same bottom navigation on my pages but I don’t think this is possible.
I open my pages as a popup then you have a “back” link on the top of the popup.
Otherwise you can add a close page button or link on your page, these are the only options I have found.
I recreate the location widgets to use on my overview and all my other pages, and if you want I have create other ones.
Feel free to ask.
I really like your widgets, thanks! As I never worked with widgets before, I have some questions.
What I was wondering is how can I disable the color of the text and the background. I would like them to follow the general layout/colorscheme, because of dark/light mode on macOS/iOS…