Alignment component in widget

Hello all,

I have designed a widget but have some issue with the alignment…

The f7-segmented component is overlapping with the webframe … How can I align it the right way?

uid: widget_steckdosenewnew
tags: []
props:
  parameters:
    - context: item
      description: A actual power item to display
      label: Item
      name: itemActualPower
      required: false
      type: TEXT
    - context: item
      description: A total power item to display
      label: Item
      name: itemTotalePower
      required: false
      type: TEXT
    - context: item
      description: A daily total power item to display
      label: Item
      name: itemDailyTotalPower
      required: false
      type: TEXT
    - context: item
      description: the switch state
      label: Item
      name: itemSwitch
      required: false
      type: TEXT
    - description: URL to show in the frame
      label: Source URL
      name: URL
      required: true
      type: TEXT
    - default: from=now-6h&to=now;6h,from=now-12h&to=now;12h,from=now-1d&to=now;24h,from=now/d&to=now/d;Day,from=now-3d&to=now;Last 3 Days,from=now-7d&to=now;Last 7 Days,from=now-14d&to=now;Last 14 Days
      description: Comma-separated List of options. Example "from=now-6h&to=now;-6h,from=now-1d/d&to=now-1d/d;yesterday" for past "6h" and "yesterday". First entry is default.
      label: Time range options
      name: timerange
      required: true
      type: TEXT
  parameterGroups: []
timestamp: Feb 12, 2024, 3:13:58 PM
component: f7-card
config:
  backdrop: true
  class:
    - card-expandable-animate-width
  expandable: true
  style:
    height: 200px
    width: auto
  swipeToClose: true
slots:
  default:
    - component: oh-button
      config:
        class:
          - cell-open-button
          - card-opened-fade-out
        color: black
        iconF7: expand
        iconSize: 30px
        style:
          padding-bottom: 35px
          padding-top: 10px
          position: absolute
          right: 0
          top: 0
          z-index: 999
    - component: f7-card-content
      config:
        style:
          width: 100%
      slots:
        default:
          - component: oh-icon
            config:
              height: 80px
              icon: poweroutlet
              state: =items[props.itemSwitch].state
              style:
                opacity: 40%
                position: absolute
                right: 16px
                top: 120px
              width: 80px
          - component: oh-button
            config:
              class:
                - card-opened-fade-in
                - cell-close-button
                - card-close
              color: black
              iconF7: xmark_circle_fill
              iconSize: 30px
              style:
                padding-bottom: 35px
                padding-top: 10px
                position: absolute
                right: 0
                top: 0
                z-index: 999
          - component: oh-link
            config:
              action: toggle
              actionCommand: ON
              actionCommandAlt: OFF
              actionItem: =props.itemSwitch
              class:
                - card-prevent-open
              style:
                height: 100%
                left: 0
                position: absolute
                top: 0
                width: 100%
                z-index: 0
          - component: f7-block
            config:
              class:
                - no-padding
              style:
                height: 200px
                margin: 0px
            slots:
              default:
                - component: f7-row
                  config:
                    bgcolor: green
                    style:
                      height: 30px
                  slots:
                    default:
                      - component: Label
                        config:
                          style:
                            font-size: 25px
                            font-weight: 600
                          text: steckdose
                - component: f7-row
                  config:
                    bgcolor: green
                    style:
                      flex-wrap: nowrap
                      height: 80px
                      white-space: nowrap
                  slots:
                    default:
                      - component: f7-col
                        config:
                          width: 30
                        slots:
                          default:
                            - component: f7-chip
                              config:
                                action: toggle
                                actionCommand: ON
                                actionCommandAlt: OFF
                                actionItem: =props.itemSwitch
                                color: "=(items[props.itemSwitch].state === 'ON') ? 'green' : 'red'"
                                text: "=(items[props.itemSwitch].state === 'ON') ? 'AN' : 'AUS'"
                      - component: f7-col
                        slots:
                          default:
                            - component: oh-trend
                              config:
                                style:
                                  height: 100px
                - component: f7-row
                  config:
                    style:
                      bgcolor: green
                      height: 66px
                      overflow: hidden
                      width: 100%
                  slots:
                    default:
                      - component: f7-col
                        config:
                          style:
                            align-self: flex-end
                            flex-wrap: nowrap
                        slots:
                          default:
                            - component: f7-row
                              config:
                                class:
                                  - justify-content-flex-start
                                style:
                                  flex-wrap: nowrap
                                  width: 100%
                              slots:
                                default:
                                  - component: f7-icon
                                    config:
                                      color: blue
                                      f7: chart_bar
                                      size: 20px
                                      style:
                                        margin-top: 0px
                                      visible: true
                                  - component: Label
                                    config:
                                      style:
                                        font-size: 14px
                                        font-weight: 600
                                        margin-left: 5px
                                        overflow: hidden
                                        text-overflow: ellipsis
                                        white-space: nowrap
                                      text: =(Number.parseFloat(items[props.itemActualPower].state)).toFixed(1) + 'W'
                                      visible: true
                                  - component: f7-icon
                                    config:
                                      color: blue
                                      f7: chart_bar_circle
                                      size: 20px
                                      style:
                                        margin-left: 10px
                                        margin-top: 0px
                                      visible: true
                                  - component: Label
                                    config:
                                      style:
                                        font-size: 14px
                                        font-weight: 600
                                        margin-left: 5px
                                        overflow: hidden
                                        text-overflow: ellipsis
                                        white-space: nowrap
                                      text: =(Number.parseFloat(items[props.itemDailyTotalPower].state)).toFixed(1) + 'kWh'
                                      visible: true
                            - component: f7-row
                              config:
                                class:
                                  - justify-content-flex-start
                                style:
                                  flex-wrap: nowrap
                                  height: 20px
                                  margin-top: 5px
                              slots:
                                default:
                                  - component: f7-icon
                                    config:
                                      color: white
                                      material: restore
                                      size: 18px
                                      style:
                                        margin-left: 0px
                                        margin-top: 0px
                                  - component: Label
                                    config:
                                      style:
                                        color: white
                                        font-size: 12px
                                        margin-left: 8px
                                        overflow: hidden
                                        text-overflow: ellipsis
                                        white-space: nowrap
                                      text: ""
                                  - component: f7-icon
                                    config:
                                      color: gray
                                      f7: chart_bar_square_fill
                                      size: 15px
                                      style:
                                        margin-left: 10px
                                        margin-top: 2px
                                  - component: Label
                                    config:
                                      style:
                                        color: gray
                                        font-size: 12px
                                        margin-left: 3px
                                        overflow: hidden
                                        text-overflow: ellipsis
                                        white-space: nowrap
                                      text: =(Number.parseFloat(items[props.itemTotalePower].state)).toFixed(1) + 'kWh'
          - component: f7-block
            config:
              class:
                - card-prevent-open
                - card-content-padding
              style:
                height: 200px
            slots:
              default:
                - component: oh-list
                  config:
                    class:
                      - padding
                  slots:
                    default:
                      - component: oh-toggle-item
                        config:
                          color: green
                          icon: oh:poweroutlet
                          item: =props.itemSwitch
                          title: Steckdose
                      - component: oh-label-item
                        config:
                          color: blue
                          icon: f7:chart_bar_circle
                          item: =props.itemDailyTotalPower
                          title: Daily Total Power
                      - component: oh-label-item
                        config:
                          color: blue
                          icon: f7:chart_bar
                          item: =props.itemActualPower
                          title: Actual Power
                      - component: oh-label-item
                        config:
                          color: blue
                          icon: f7:chart_bar_square_fill
                          item: =props.itemTotalePower
                          title: Totale Power
                      - component: oh-webframe-card
                        config:
                          borders: false
                          noBorder: false
                          noShadow: true
                          height: 100px
                          src: =props.URL.replace('{period}', vars.selectedPeriod || [props.timerange.split(',')[0].split(';')[0]])
                      - component: f7-segmented
                        config:
                          round: false
                          outline: false
                          class:
                            - padding-bottom-half
                          style:
                            margin-left: 10px
                            margin-right: 10px
                            --f7-button-font-size: 14px
                            --f7-button-text-color: "=themeOptions.dark === 'light' ? 'black' : 'white'"
                            --f7-button-text-transform: none
                            --f7-button-border-radius: 4px
                            --f7-button-outline-border-width: 1px
                            --f7-button-font-weight: 300
                            --f7-button-padding-vertical: 0px
                            --f7-button-padding-horizontal: 0px
                        slots:
                          default:
                            - component: oh-repeater
                              config:
                                sourceType: range
                                for: size
                                fragment: true
                              slots:
                                default:
                                  - component: oh-repeater
                                    config:
                                      fragment: true
                                      for: period
                                      in: =[props.timerange.split(",")[loop.size].split(";")[1]]
                                    slots:
                                      default:
                                        - component: oh-button
                                          config:
                                            text: =loop.period
                                            fill: "=(([props.timerange.split(',')[loop.size].split(';')[0]] == vars.selectedPeriod) || (props.timerange.split(',')[0].split(';')[1] === loop.period) && !vars.selectedPeriod) ? true : false"
                                            round: false
                                            outline: true
                                            style:
                                              --f7-button-border-color: var(--f7-card-outline-border-color)
                                            action: variable
                                            actionVariable: selectedPeriod
                                            actionVariableValue: =props.timerange.split(",")[loop.size].split(";")[0]

You already set margin for your f7-segmented control. Out of the top of my head try with 20px and 0px

But the F7-segment should be below the webframe element or?

You have put non-list items as the direct children of a list. This is always going to cause issues, because it winds up creating malformed html lists. It is possible to mask this with css changes but it’ll take you forever and a day to find all the changes you need to make and it will never be “right” (that is there will be unexpected rendering errors that crop up in various combinations of devices and screens).

The better way to do this is to put the webframe and the segmented buttons in a f7-list-item-row (either both in the same one or each one in their own, the difference depends on what else you’d like to achieve).

I put it out of the list now

uid: widget_steckdosenewnew
tags: []
props:
  parameters:
    - context: item
      description: A actual power item to display
      label: Item
      name: itemActualPower
      required: false
      type: TEXT
    - context: item
      description: A total power item to display
      label: Item
      name: itemTotalePower
      required: false
      type: TEXT
    - context: item
      description: A daily total power item to display
      label: Item
      name: itemDailyTotalPower
      required: false
      type: TEXT
    - context: item
      description: the switch state
      label: Item
      name: itemSwitch
      required: false
      type: TEXT
    - description: URL to show in the frame
      label: Source URL
      name: URL
      required: true
      type: TEXT
    - default: from=now-6h&to=now;6h,from=now-12h&to=now;12h,from=now-1d&to=now;24h,from=now/d&to=now/d;Day,from=now-3d&to=now;Last 3 Days,from=now-7d&to=now;Last 7 Days,from=now-14d&to=now;Last 14 Days
      description: Comma-separated List of options. Example "from=now-6h&to=now;-6h,from=now-1d/d&to=now-1d/d;yesterday" for past "6h" and "yesterday". First entry is default.
      label: Time range options
      name: timerange
      required: true
      type: TEXT
  parameterGroups: []
timestamp: Feb 12, 2024, 8:09:49 PM
component: f7-card
config:
  backdrop: true
  class:
    - card-expandable-animate-width
  expandable: true
  style:
    height: 200px
    width: auto
  swipeToClose: true
slots:
  default:
    - component: oh-button
      config:
        class:
          - cell-open-button
          - card-opened-fade-out
        color: black
        iconF7: expand
        iconSize: 30px
        style:
          padding-bottom: 35px
          padding-top: 10px
          position: absolute
          right: 0
          top: 0
          z-index: 999
    - component: f7-card-content
      config:
        style:
          width: 100%
      slots:
        default:
          - component: oh-icon
            config:
              height: 80px
              icon: poweroutlet
              state: =items[props.itemSwitch].state
              style:
                opacity: 40%
                position: absolute
                right: 16px
                top: 120px
              width: 80px
          - component: oh-button
            config:
              class:
                - card-opened-fade-in
                - cell-close-button
                - card-close
              color: black
              iconF7: xmark_circle_fill
              iconSize: 30px
              style:
                padding-bottom: 35px
                padding-top: 10px
                position: absolute
                right: 0
                top: 0
                z-index: 999
          - component: oh-link
            config:
              action: toggle
              actionCommand: ON
              actionCommandAlt: OFF
              actionItem: =props.itemSwitch
              class:
                - card-prevent-open
              style:
                height: 100%
                left: 0
                position: absolute
                top: 0
                width: 100%
                z-index: 0
          - component: f7-block
            config:
              class:
                - no-padding
              style:
                height: 200px
                margin: 0px
            slots:
              default:
                - component: f7-row
                  config:
                    bgcolor: green
                    style:
                      height: 30px
                  slots:
                    default:
                      - component: Label
                        config:
                          style:
                            font-size: 25px
                            font-weight: 600
                          text: steckdose
                - component: f7-row
                  config:
                    bgcolor: green
                    style:
                      flex-wrap: nowrap
                      height: 80px
                      white-space: nowrap
                  slots:
                    default:
                      - component: f7-col
                        config:
                          width: 30
                        slots:
                          default:
                            - component: f7-chip
                              config:
                                action: toggle
                                actionCommand: ON
                                actionCommandAlt: OFF
                                actionItem: =props.itemSwitch
                                color: "=(items[props.itemSwitch].state === 'ON') ? 'green' : 'red'"
                                text: "=(items[props.itemSwitch].state === 'ON') ? 'AN' : 'AUS'"
                      - component: f7-col
                        slots:
                          default:
                            - component: oh-trend
                              config:
                                style:
                                  height: 100px
                - component: f7-row
                  config:
                    style:
                      bgcolor: green
                      height: 66px
                      overflow: hidden
                      width: 100%
                  slots:
                    default:
                      - component: f7-col
                        config:
                          style:
                            align-self: flex-end
                            flex-wrap: nowrap
                        slots:
                          default:
                            - component: f7-row
                              config:
                                class:
                                  - justify-content-flex-start
                                style:
                                  flex-wrap: nowrap
                                  width: 100%
                              slots:
                                default:
                                  - component: f7-icon
                                    config:
                                      color: blue
                                      f7: chart_bar
                                      size: 20px
                                      style:
                                        margin-top: 0px
                                      visible: true
                                  - component: Label
                                    config:
                                      style:
                                        font-size: 14px
                                        font-weight: 600
                                        margin-left: 5px
                                        overflow: hidden
                                        text-overflow: ellipsis
                                        white-space: nowrap
                                      text: =(Number.parseFloat(items[props.itemActualPower].state)).toFixed(1) + 'W'
                                      visible: true
                                  - component: f7-icon
                                    config:
                                      color: blue
                                      f7: chart_bar_circle
                                      size: 20px
                                      style:
                                        margin-left: 10px
                                        margin-top: 0px
                                      visible: true
                                  - component: Label
                                    config:
                                      style:
                                        font-size: 14px
                                        font-weight: 600
                                        margin-left: 5px
                                        overflow: hidden
                                        text-overflow: ellipsis
                                        white-space: nowrap
                                      text: =(Number.parseFloat(items[props.itemDailyTotalPower].state)).toFixed(1) + 'kWh'
                                      visible: true
                            - component: f7-row
                              config:
                                class:
                                  - justify-content-flex-start
                                style:
                                  flex-wrap: nowrap
                                  height: 20px
                                  margin-top: 5px
                              slots:
                                default:
                                  - component: f7-icon
                                    config:
                                      color: white
                                      material: restore
                                      size: 18px
                                      style:
                                        margin-left: 0px
                                        margin-top: 0px
                                  - component: Label
                                    config:
                                      style:
                                        color: white
                                        font-size: 12px
                                        margin-left: 8px
                                        overflow: hidden
                                        text-overflow: ellipsis
                                        white-space: nowrap
                                      text: ""
                                  - component: f7-icon
                                    config:
                                      color: gray
                                      f7: chart_bar_square_fill
                                      size: 15px
                                      style:
                                        margin-left: 10px
                                        margin-top: 2px
                                  - component: Label
                                    config:
                                      style:
                                        color: gray
                                        font-size: 12px
                                        margin-left: 3px
                                        overflow: hidden
                                        text-overflow: ellipsis
                                        white-space: nowrap
                                      text: =(Number.parseFloat(items[props.itemTotalePower].state)).toFixed(1) + 'kWh'
          - component: f7-block
            config:
              class:
                - card-prevent-open
                - card-content-padding
              style:
                height: 200px
            slots:
              default:
                - component: f7-list
                  config:
                    class:
                      - padding
                  slots:
                    default:
                      - component: oh-toggle-item
                        config:
                          color: green
                          icon: oh:poweroutlet
                          item: =props.itemSwitch
                          title: Steckdose
                      - component: oh-label-item
                        config:
                          color: blue
                          icon: f7:chart_bar_circle
                          item: =props.itemDailyTotalPower
                          title: Daily Total Power
                      - component: oh-label-item
                        config:
                          color: blue
                          icon: f7:chart_bar
                          item: =props.itemActualPower
                          title: Actual Power
                      - component: oh-label-item
                        config:
                          color: blue
                          icon: f7:chart_bar_square_fill
                          item: =props.itemTotalePower
                          title: Totale Power
          - component: oh-webframe-card
            config:
              borders: false
              noBorder: false
              noShadow: true
              height: 150px
              src: =props.URL.replace('{period}', vars.selectedPeriod || [props.timerange.split(',')[0].split(';')[0]])
              class:
                - display-block
          - component: f7-segmented
            config:
              round: false
              outline: false
              class:
                - padding-bottom-half
              style:
                margin-left: 10px
                margin-right: 10px
                --f7-button-font-size: 14px
                --f7-button-text-color: "=themeOptions.dark === 'light' ? 'black' : 'white'"
                --f7-button-text-transform: none
                --f7-button-border-radius: 4px
                --f7-button-outline-border-width: 1px
                --f7-button-font-weight: 300
                --f7-button-padding-vertical: 0px
                --f7-button-padding-horizontal: 0px
              slots:
                default:
                  - component: oh-repeater
                    config:
                      sourceType: range
                      for: size
                      fragment: true
                    slots:
                      default:
                        - component: oh-repeater
                          config:
                            fragment: true
                            for: period
                            in: =[props.timerange.split(",")[loop.size].split(";")[1]]
                          slots:
                            default:
                              - component: oh-button
                                config:
                                  text: =loop.period
                                  fill: "=(([props.timerange.split(',')[loop.size].split(';')[0]] == vars.selectedPeriod) || (props.timerange.split(',')[0].split(';')[1] === loop.period) && !vars.selectedPeriod) ? true : false"
                                  round: false
                                  outline: true
                                  style:
                                    --f7-button-border-color: var(--f7-card-outline-border-color)
                                  action: variable
                                  actionVariable: selectedPeriod
                                  actionVariableValue: =props.timerange.split(",")[loop.size].split(";")[0]

But now the f7-segment part is missing in the widget…how do I get it back now?

My guess is that the elements are still being rendered they just don’t fit in the expanded card container (which has a fixed size that I don’t think you’ve overridden). You set several of the components to fixed heights and I think you are taking up all the space on the card before you even get to the segmented buttons.

Use the browser page inspector to see if the segmented buttons are really not there or just rendered below the bottom of the card.

I solved it by this version:

uid: widget_steckdosenewnew
tags: []
props:
  parameters:
    - context: item
      description: A actual power item to display
      label: Item
      name: itemActualPower
      required: false
      type: TEXT
    - context: item
      description: A total power item to display
      label: Item
      name: itemTotalePower
      required: false
      type: TEXT
    - context: item
      description: A daily total power item to display
      label: Item
      name: itemDailyTotalPower
      required: false
      type: TEXT
    - context: item
      description: the switch state
      label: Item
      name: itemSwitch
      required: false
      type: TEXT
    - description: URL to show in the frame
      label: Source URL
      name: URL
      required: true
      type: TEXT
    - default: from=now-6h&to=now;6h,from=now-12h&to=now;12h,from=now-1d&to=now;24h,from=now/d&to=now/d;Day,from=now-3d&to=now;Last 3 Days,from=now-7d&to=now;Last 7 Days,from=now-14d&to=now;Last 14 Days
      description: Comma-separated List of options. Example "from=now-6h&to=now;-6h,from=now-1d/d&to=now-1d/d;yesterday" for past "6h" and "yesterday". First entry is default.
      label: Time range options
      name: timerange
      required: true
      type: TEXT
  parameterGroups: []
timestamp: Feb 13, 2024, 12:13:21 AM
component: f7-card
config:
  backdrop: true
  class:
    - card-expandable-animate-width
  expandable: true
  style:
    height: 200px
    width: auto
  swipeToClose: true
slots:
  default:
    - component: oh-button
      config:
        class:
          - cell-open-button
          - card-opened-fade-out
        color: black
        iconF7: expand
        iconSize: 30px
        style:
          padding-bottom: 35px
          padding-top: 10px
          position: absolute
          right: 0
          top: 0
          z-index: 999
    - component: f7-card-content
      config:
        style:
          width: 100%
      slots:
        default:
          - component: oh-icon
            config:
              height: 80px
              icon: poweroutlet
              state: =items[props.itemSwitch].state
              style:
                opacity: 40%
                position: absolute
                right: 16px
                top: 120px
              width: 80px
          - component: oh-button
            config:
              class:
                - card-opened-fade-in
                - cell-close-button
                - card-close
              color: black
              iconF7: xmark_circle_fill
              iconSize: 30px
              style:
                padding-bottom: 35px
                padding-top: 10px
                position: absolute
                right: 0
                top: 0
                z-index: 999
          - component: oh-link
            config:
              action: toggle
              actionCommand: ON
              actionCommandAlt: OFF
              actionItem: =props.itemSwitch
              class:
                - card-prevent-open
              style:
                height: 100%
                left: 0
                position: absolute
                top: 0
                width: 100%
                z-index: 0
          - component: f7-block
            config:
              class:
                - no-padding
              style:
                height: 200px
                margin: 0px
            slots:
              default:
                - component: f7-row
                  config:
                    bgcolor: green
                    style:
                      height: 30px
                  slots:
                    default:
                      - component: Label
                        config:
                          style:
                            font-size: 25px
                            font-weight: 600
                          text: steckdose
                - component: f7-row
                  config:
                    bgcolor: green
                    style:
                      flex-wrap: nowrap
                      height: 80px
                      white-space: nowrap
                  slots:
                    default:
                      - component: f7-col
                        config:
                          width: 30
                        slots:
                          default:
                            - component: f7-chip
                              config:
                                action: toggle
                                actionCommand: ON
                                actionCommandAlt: OFF
                                actionItem: =props.itemSwitch
                                color: "=(items[props.itemSwitch].state === 'ON') ? 'green' : 'red'"
                                text: "=(items[props.itemSwitch].state === 'ON') ? 'AN' : 'AUS'"
                      - component: f7-col
                        slots:
                          default:
                            - component: oh-trend
                              config:
                                style:
                                  height: 100px
                - component: f7-row
                  config:
                    style:
                      bgcolor: green
                      height: 66px
                      overflow: hidden
                      width: 100%
                  slots:
                    default:
                      - component: f7-col
                        config:
                          style:
                            align-self: flex-end
                            flex-wrap: nowrap
                        slots:
                          default:
                            - component: f7-row
                              config:
                                class:
                                  - justify-content-flex-start
                                style:
                                  flex-wrap: nowrap
                                  width: 100%
                              slots:
                                default:
                                  - component: f7-icon
                                    config:
                                      color: blue
                                      f7: chart_bar
                                      size: 20px
                                      style:
                                        margin-top: 0px
                                      visible: true
                                  - component: Label
                                    config:
                                      style:
                                        font-size: 14px
                                        font-weight: 600
                                        margin-left: 5px
                                        overflow: hidden
                                        text-overflow: ellipsis
                                        white-space: nowrap
                                      text: =(Number.parseFloat(items[props.itemActualPower].state)).toFixed(1) + 'W'
                                      visible: true
                                  - component: f7-icon
                                    config:
                                      color: blue
                                      f7: chart_bar_circle
                                      size: 20px
                                      style:
                                        margin-left: 10px
                                        margin-top: 0px
                                      visible: true
                                  - component: Label
                                    config:
                                      style:
                                        font-size: 14px
                                        font-weight: 600
                                        margin-left: 5px
                                        overflow: hidden
                                        text-overflow: ellipsis
                                        white-space: nowrap
                                      text: =(Number.parseFloat(items[props.itemDailyTotalPower].state)).toFixed(1) + 'kWh'
                                      visible: true
                            - component: f7-row
                              config:
                                class:
                                  - justify-content-flex-start
                                style:
                                  flex-wrap: nowrap
                                  height: 20px
                                  margin-top: 5px
                              slots:
                                default:
                                  - component: f7-icon
                                    config:
                                      color: white
                                      material: restore
                                      size: 18px
                                      style:
                                        margin-left: 0px
                                        margin-top: 0px
                                  - component: Label
                                    config:
                                      style:
                                        color: white
                                        font-size: 12px
                                        margin-left: 8px
                                        overflow: hidden
                                        text-overflow: ellipsis
                                        white-space: nowrap
                                      text: ""
                                  - component: f7-icon
                                    config:
                                      color: gray
                                      f7: chart_bar_square_fill
                                      size: 15px
                                      style:
                                        margin-left: 10px
                                        margin-top: 2px
                                  - component: Label
                                    config:
                                      style:
                                        color: gray
                                        font-size: 12px
                                        margin-left: 3px
                                        overflow: hidden
                                        text-overflow: ellipsis
                                        white-space: nowrap
                                      text: =(Number.parseFloat(items[props.itemTotalePower].state)).toFixed(1) + 'kWh'
          - component: f7-block
            config:
              class:
                - card-prevent-open
              outline: false
            slots:
              default:
                - component: f7-list
                  config:
                    style:
                      height: 100%
                  slots:
                    default:
                      - component: oh-toggle-item
                        config:
                          color: green
                          icon: oh:poweroutlet
                          item: =props.itemSwitch
                          title: Steckdose
                      - component: oh-label-item
                        config:
                          color: blue
                          icon: f7:chart_bar_circle
                          item: =props.itemDailyTotalPower
                          title: Daily Total Power
                      - component: oh-label-item
                        config:
                          color: blue
                          icon: f7:chart_bar
                          item: =props.itemActualPower
                          title: Actual Power
                      - component: oh-label-item
                        config:
                          color: blue
                          icon: f7:chart_bar_square_fill
                          item: =props.itemTotalePower
                          title: Totale Power
                - component: oh-webframe-card
                  config:
                    borders: false
                    class:
                      - display-block
                    height: 240px
                    noBorder: false
                    noShadow: true
                    src: =props.URL.replace('{period}', vars.selectedPeriod || [props.timerange.split(',')[0].split(';')[0]])
                - component: f7-segmented
                  config:
                    class:
                      - padding-bottom-half
                    outline: false
                    round: false
                    style:
                      --f7-button-border-radius: 4px
                      --f7-button-font-size: 14px
                      --f7-button-font-weight: 300
                      --f7-button-outline-border-width: 1px
                      --f7-button-padding-horizontal: 0px
                      --f7-button-padding-vertical: 0px
                      --f7-button-text-color: "=themeOptions.dark === 'light' ? 'black' : 'white'"
                      --f7-button-text-transform: none
                      margin-left: 10px
                      margin-right: 10px
                      margin-top: 250px
                  slots:
                    default:
                      - component: oh-repeater
                        config:
                          for: size
                          fragment: true
                          sourceType: range
                        slots:
                          default:
                            - component: oh-repeater
                              config:
                                for: period
                                fragment: true
                                in: =[props.timerange.split(",")[loop.size].split(";")[1]]
                              slots:
                                default:
                                  - component: oh-button
                                    config:
                                      action: variable
                                      actionVariable: selectedPeriod
                                      actionVariableValue: =props.timerange.split(",")[loop.size].split(";")[0]
                                      fill: "=(([props.timerange.split(',')[loop.size].split(';')[0]] == vars.selectedPeriod) || (props.timerange.split(',')[0].split(';')[1] === loop.period) && !vars.selectedPeriod) ? true : false"
                                      outline: true
                                      round: false
                                      style:
                                        --f7-button-border-color: var(--f7-card-outline-border-color)
                                      text: =loop.period