i was waiting for the new topic to post widgets based on @Dimitris style, but i’ll post them here.
90% are complete, i’m not a skilled programmer, so i ask to who believe in this project to take these widgets and improve and complete them. please forgive me if in the code there are big mistakes or stupid things, i would like to learn from anyone has better knowns.
here is the security widget:
uid: test:Security_V3
tags:
- MadeByEvil
props:
parameters:
- label: Icona
name: Icon
required: false
type: TEXT
- label: Titolo della card
name: title
required: false
type: TEXT
- default: Item 1
label: Item 1 Label
name: label1
required: false
type: TEXT
- context: item
label: Item 1
name: item1
required: false
type: TEXT
- label: Item 2 Label
name: label2
required: false
type: TEXT
- context: item
label: Item 2
name: item2
required: false
type: TEXT
- label: Item 3 Label
name: label3
required: false
type: TEXT
- context: item
label: Item 3
name: item3
required: false
type: TEXT
- label: Item 4 Label
name: label4
required: false
type: TEXT
- context: item
label: Item 4
name: item4
required: false
type: TEXT
- label: Item 5 Label
name: label5
required: false
type: TEXT
- context: item
label: Item 5
name: item5
required: false
type: TEXT
parameterGroups:
- name: widgetAction
context: action
label: Action
description: Action to perform when the element is clicked
timestamp: Aug 25, 2022, 6:46:53 PM
component: f7-card
config:
style:
border-radius: 10px
height: 320px
min-height: 320px
slots:
content:
- component: oh-icon
config:
icon: iconify:bi:shield-check
color: green
height: 20px
style:
position: absolute
- component: Label
config:
text: Contacts & Alarm
top: 13px
style:
position: absolute
left: 35%
font-weight: 500
- component: oh-icon
config:
icon: '=items[props.item1].state == "ON" ? "iconify:akar-icons:square-fill" : "iconify:akar-icons:square"'
color: green
height: 10px
style:
position: absolute
top: 40px
left: 95px
- component: oh-icon
config:
icon: '=items[props.item2].state == "ON" ? "iconify:akar-icons:square-fill" : "iconify:akar-icons:square"'
color: green
height: 10px
style:
position: absolute
top: 40px
left: 115px
- component: oh-icon
config:
icon: '=items[props.item3].state == "ON" ? "iconify:akar-icons:square-fill" : "iconify:akar-icons:square"'
color: green
height: 10px
style:
position: absolute
top: 40px
left: 135px
- component: oh-icon
config:
icon: '=items[props.item4].state == "ON" ? "iconify:akar-icons:square-fill" : "iconify:akar-icons:square"'
color: green
height: 10px
style:
position: absolute
top: 40px
left: 155px
- component: oh-icon
config:
icon: '=items[props.item5].state == "ON" ? "iconify:akar-icons:square-fill" : "iconify:akar-icons:square"'
color: green
height: 10px
style:
position: absolute
top: 40px
left: 175px
- component: oh-icon
config:
icon: '=items[props.item6].state == "ON" ? "iconify:akar-icons:square-fill" : "iconify:akar-icons:square"'
color: green
height: 10px
style:
position: absolute
top: 40px
left: 195px
- component: oh-icon
config:
icon: '=items[props.item7].state == "ON" ? "iconify:akar-icons:square-fill" : "iconify:akar-icons:square"'
color: green
height: 10px
style:
position: absolute
top: 40px
left: 215px
- component: oh-icon
config:
icon: '=items[props.item8].state == "ON" ? "iconify:akar-icons:square-fill" : "iconify:akar-icons:square"'
color: green
height: 10px
style:
position: absolute
top: 40px
left: 235px
- component: oh-icon
config:
icon: iconify:bi:shield-check
color: '=items[props.item5].state == "ON" ? "green" : items[props.item4].state == "ON" ? "green" : items[props.item3].state == "ON" ? "green" : items[props.item2].state == "ON" ? "green" : items[props.item1].state == "ON" ? "green" : "grey"'
height: 50px
style:
position: absolute
top: 70px
left: 4%
- component: Label
config:
text: Stay
style:
position: absolute
top: 125px
left: 7%
font-weight: 500
- component: oh-icon
config:
icon: iconify:bi:shield-check
color: grey
height: 50px
style:
position: absolute
top: 70px
left: 43%
- component: Label
config:
text: Off
style:
position: absolute
top: 125px
left: 48%
font-weight: 500
- component: oh-icon
config:
icon: iconify:bi:shield-check
color: '=items[props.item5].state == "OFF" && items[props.item4].state == "OFF" && items[props.item3].state == "OFF" && items[props.item2].state == "OFF" && items[props.item1].state == "OFF" ? "red" : "grey"'
height: 50px
style:
position: absolute
top: 70px
left: 81%
- component: Label
config:
text: Arm
style:
position: absolute
top: 125px
left: 85%
font-weight: 500
- component: Label
config:
text: =props.label1
style:
position: absolute
top: 180px
left: 6%
- component: oh-toggle
config:
item: =props.item1
color: green
style:
--f7-toggle-height: 20px
--f7-toggle-width: 40px
font-size: 100%
top: 160px
left: 250px
- component: Label
config:
visible: '=props.item2 ? "true" : "false"'
text: =props.label2
style:
position: absolute
top: 205px
left: 6%
- component: oh-toggle
config:
visible: '=props.item2 ? "true" : "false"'
item: =props.item2
color: green
style:
--f7-toggle-height: 20px
--f7-toggle-width: 40px
top: 185px
left: 210px
- component: Label
config:
visible: '=props.item3 ? "true" : "false"'
text: =props.label3
style:
position: absolute
top: 230px
left: 6%
- component: oh-toggle
config:
visible: '=props.item3 ? "true" : "false"'
item: =props.item3
color: green
style:
--f7-toggle-height: 20px
--f7-toggle-width: 40px
top: 210px
left: 170px
- component: Label
config:
visible: '=props.item4 ? "true" : "false"'
text: =props.label4
style:
position: absolute
top: 255px
left: 6%
- component: oh-toggle
config:
visible: '=props.item4 ? "true" : "false"'
item: =props.item4
color: green
style:
--f7-toggle-height: 20px
--f7-toggle-width: 40px
top: 235px
left: 130px
- component: Label
config:
visible: '=props.item5 ? "true" : "false"'
text: =props.label5
style:
position: absolute
top: 280px
left: 6%
- component: oh-toggle
config:
visible: '=props.item5 ? "true" : "false"'
item: =props.item5
color: green
style:
--f7-toggle-height: 20px
--f7-toggle-width: 40px
top: 260px
left: 90px
footer:
- component: f7-block
config:
style:
top: 125px
left: 0
position: absolute
and here the rollershutter widget:
uid: Rollershutter Preset
tags:
- New UI
props:
parameters:
- description: Title of the card
label: Title
name: Title
required: false
type: TEXT
- context: item
description: Das Item mit dem die Solltemperatur eingestellt wird
label: Rollershutter Item
name: RollerItem
required: true
type: TEXT
timestamp: Aug 22, 2022, 11:41:00 PM
component: f7-card
config:
noShadow: false
padding: false
style:
padding: 0px
border-radius: 10px
box-shadow: 5px 5px 15px 1px rgba(0,0,0,0.05)
--f7-card-header-border-color: transparent
min-width: 90%
slots:
default:
- component: f7-card-header
config:
style:
--f7-card-header-border-color: none
slots:
default:
- component: oh-icon
config:
icon: iconify:mdi:window-shutter-alert
height: 30px
style:
margin-top: 3%
margin-bottom: 3%
- component: Label
config:
text: =props.Title
style:
position: absolute
top: 8%
left: 17%
- component: Label
config:
text: =items[props.RollerItem].state + "% " + " close"
style:
position: absolute
top: 30%
left: 17%
background: gray
border-radius: 9px
- component: oh-button
config:
iconColor: teal
iconF7: arrow_up_circle
iconSize: 30
action: command
actionItem: =props.RollerItem
actionCommand: UP
style:
position: absolute
top: 15%
right: 20%
height: 33px
background: transparent
z-index: 98
- component: oh-button
config:
iconColor: gray
iconF7: stop_circle
iconSize: 30
action: command
actionItem: =props.RollerItem
actionCommand: STOP
style:
position: absolute
top: 15%
right: 10%
height: 33px
background: transparent
z-index: 98
- component: oh-button
config:
iconColor: teal
iconF7: arrow_down_circle
iconSize: 30
action: command
actionItem: =props.RollerItem
actionCommand: DOWN
style:
position: absolute
top: 15%
right: 0%
height: 33px
background: transparent
z-index: 98
- component: f7-card-footer
config:
style:
height: 60px
background: "#B1ACA2"
border-radius: 0 0 10px 10px
slots:
default:
- component: Label
config:
text: "Preset positions:"
style:
position: absolute
top: 5%
color: white
- component: oh-button
config:
round: true
text: "0"
action: command
actionItem: =(props.RollerItem)
actionCommand: UP
class:
- margin
- display-flex
- flex-direction-column
style:
position: absolute
height: 24px
width: 10px
top: 63%
left: 20%
z-index: 98
background: '=items[props.RollerItem].state == "0" ? "teal" : "gray"'
color: white
- component: oh-button
config:
round: true
text: 50
action: command
actionItem: =(props.RollerItem)
actionCommand: 50
class:
- margin
- display-flex
- flex-direction-column
style:
position: absolute
height: 24px
width: 10px
top: 63%
left: 33%
z-index: 98
background: '=items[props.RollerItem].state == "50" ? "teal" : "gray"'
color: white
- component: oh-button
config:
round: true
text: 75
action: command
actionItem: =(props.RollerItem)
actionCommand: 75
class:
- margin
- display-flex
- flex-direction-column
style:
position: absolute
height: 24px
width: 10px
top: 63%
right: 33%
z-index: 98
background: '=items[props.RollerItem].state == "75" ? "teal" : "gray"'
color: white
- component: oh-button
config:
round: true
text: 100
action: command
actionItem: =(props.RollerItem)
actionCommand: DOWN
class:
- margin
- display-flex
- flex-direction-column
style:
position: absolute
height: 24px
width: 10px
top: 63%
right: 20%
z-index: 98
background: '=items[props.RollerItem].state == "100" ? "teal" : "gray"'
color: white
both are missing the function “expandable” and the “hours bars” details of when the item have been modified.
width and weight are perfect for iphone layout.
hope someone can help me/us adding functions and better screen adapt.
bye!