Hey everyone,
I would like to request some help for one of my widget.
I would like it to refresh the value of a oh-trend when its value change which is a component of a f7-swiper.
Is it possible? If so how can I do it?
- component: f7-swiper
config:
animate: false
comment: ("Horisontally scrollable screen")
disabled: =@props.itemSmartHomePanelState === 'showSettings' || vars.weather === 'showWeather'
params:
allowTouchMove: =@props.itemSmartHomePanelState !== 'showSettings' && vars.weather !== 'showWeather'
direction: horizontal
mousewheel: true
observeParents: true
observer: true
pagination:
clickable: false
color: white
dynamicBullets: true
scrollbar:
hide: true
slidesPerView: 1
scrollbar: true
style:
height: 100%
left: 0
overflow: hidden
pointer-events: "=@props.itemSmartHomePanelState != 'home' && @props.itemSmartHomePanelState != 'null' ? 'none' : 'auto'"
position: absolute
top: 0
width: 100%
visible: =@props.itemSmartHomePanelState === 'home' || @props.itemSmartHomePanelState === 'null' && vars.weather != 'showWeather'
slots:
default:
- component: f7-swiper-slide
slots:
default:
- component: f7-block
config:
comment: ('Environment air quality and temp')
#key: =Math.floor(Date.now() / 5000)
style:
border-radius: 24px
visible: =vars.weather != 'showWeather'
slots:
default:
- component: f7-card
config:
style:
backdrop-filter: blur(20px) saturate(110%) contrast(70%)
background: transparent
border: 1px solid rgba(255, 255, 255, 0.15)
border-radius: 24px
box-shadow: 0 1px 0 rgba(255,255,255,0.8) inset, 0 -1px 0 rgba(180, 180, 180, 0.55) inset, /* alsó világos él */ inset -1px 0 0 rgba(150, 150, 150, 0.3), inset 1px 0 0 rgba(150,150,150,0.3), 0 8px 10px rgba(0,0,0,0.3)
color: white
display: flex
height: 26.85rem
left: 25px
overflow: hidden
position: absolute
top: 80px
transition: opacity 0.15s ease 0.3s
width: 26.65rem
z-index: 90
stylesheet: ":host .card::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0.15) 15%, rgba(255,255,255,0.05) 30%, transparent 60%); pointer-events: none; }"
visible: =@props.itemSmartHomePanelState != 'showSecurity' && @props.itemSmartHomePanelState != "showSettings"
slots:
default:
- component: f7-card-content
slots:
default:
- component: f7-block
config:
style:
background-image: conic-gradient(rgba(80, 200, 80,0.22))
border-radius: 50%
display: block
height: 25rem
left: 125px
position: absolute
top: -100px
width: 25rem
z-index: 1
- component: f7-block
config:
style:
background-image: conic-gradient(rgba(60, 200, 80,0.06))
border-radius: 50%
display: block
height: 25rem
left: -125px
position: absolute
top: 100px
width: 25rem
z-index: -1
- component: Label
config:
comment: (Enviroment)
style:
font-size: 20px
font-weight: bold
left: 20px
position: absolute
top: 20px
white-space: nowrap
text: Environment
- component: Label
config:
comment: (All rooms)
style:
color: gray
font-size: 16px
left: 20px
position: absolute
top: 47px
white-space: nowrap
text: All rooms
- component: Label
config:
comment: (Air quality text -- dynamic)
style:
color: rgba(80, 200, 80,1)
font-size: 40px
left: 125px
position: absolute
top: 100px
white-space: nowrap
text: Excellent
- component: Label
config:
comment: (Air quality)
style:
color: gray
font-size: 16px
left: 175px
position: absolute
top: 155px
white-space: nowrap
text: Air quality
- component: Label
config:
comment: (Text)
style:
color: gray
font-size: 16px
left: 85px
position: absolute
top: 245px
white-space: nowrap
text: Temperature
- component: Label
config:
comment: (Temperature item)
style:
color: white
font-size: 20px
font-weight: bold
left: 95px
position: absolute
top: 215px
white-space: nowrap
text: =@props.average_temperature
- component: Label
config:
comment: (Text)
style:
color: gray
font-size: 16px
left: 265px
position: absolute
top: 245px
white-space: nowrap
text: Humidity
- component: Label
config:
comment: (Humidity item)
style:
color: white
font-size: 20px
font-weight: bold
left: 280px
position: absolute
top: 215px
white-space: nowrap
text: 52%
- component: f7-block
config:
style:
position: absolute
top: 50px
left: 15px
width: 100%
height: 120px
slots:
default:
- component: oh-trend
config:
trendItem: =props.average_temperature
key: =items[props.average_temperature].state
#period: h
trendGradient: =['white', 'white']
style:
background: transparent
position: absolute
width: 10rem
height: 100%
top: 250px
left: 25px
z-index: 1000
trendSampling: 5
- component: Label
config:
comment: ('Separation line for trend')
style:
border-bottom: 1px solid rgba(100,100,100,1.3)
display: block
position: absolute
top: 300px
left: 25px
width: 23.65rem
- component: Label
config:
comment: ('Separation line for trend')
style:
border-bottom: 1px solid rgba(100,100,100,1.3)
display: block
position: absolute
left: 25px
top: 330px
width: 23.65rem
- component: Label
config:
comment: ('Separation line for trend')
style:
border-bottom: 1px solid rgba(100,100,100,1.3)
display: block
position: absolute
left: 25px
top: 360px
width: 23.65rem
- component: Label
config:
comment: ('Separation line for trend')
style:
border-bottom: 1px solid rgba(100,100,100,1.3)
display: block
position: absolute
left: 25px
top: 390px
width: 23.65rem
I have attached the code. Thank you for your help!