Gude Systems PDU 8035 series integration via MQTT: Part 5 - The Dashboard code

Gude Systems PDU 8035 series integration via MQTT: Part 5 - The Dashboard code

Look for the main article at Gude Systems PDU 8035 series integration via MQTT: Part 1 - Introduction

Due to size restrictions of this forum, I could only upload a trimmed version of the dashboard code: the dashboard code contains all elements except those of outlets 3 through 8. To get those outlets in your dashboard, simply:

  • duplicate outlet 2 in the dashboard editor,
  • switch from visual editor to YAML editor,
  • increase the number of an outlet entry accordingly,
  • save your dashboard.
    Done.
  - title: PDU (trimmed version)
    header:
      card:
        type: markdown
        text_only: true
        content: '# PDU Gude Systems 8035-3 R2'
    sections:
      - type: grid
        cards:
          - type: heading
            heading: Line in
            heading_style: title
            icon: ''
          - type: horizontal-stack
            cards:
              - show_name: false
                show_icon: true
                show_state: true
                type: glance
                entities:
                  - entity: sensor.pdu_8035_3_r2_pdu_line_voltage
              - show_name: false
                show_icon: true
                show_state: true
                type: glance
                entities:
                  - entity: sensor.pdu_8035_3_r2_pdu_line_current
                    show_state: true
              - show_name: false
                show_icon: true
                show_state: true
                type: glance
                entities:
                  - entity: sensor.pdu_8035_3_r2_pdu_line_power
              - type: vertical-stack
                cards:
                  - show_name: true
                    show_icon: true
                    type: button
                    entity: input_boolean.pdu_mqtt_telemetry_received
                    show_state: false
                    name: Telemetry received
                  - type: conditional
                    conditions:
                      - entity: input_boolean.pdu_mqtt_telemetry_received
                        state: 'on'
                    card:
                      type: markdown
                      content: 'yes'
                      title: null
                    else_card:
                      type: markdown
                      content: 'no'
                      title: null
              - show_name: true
                show_icon: true
                type: button
                entity: button.pdu_8035_3_r2_pdu_reset_all_outlets
                name: Power cycle ALL outlets
          - type: heading
            heading: Outlets
            heading_style: title
            icon: ''
          - type: horizontal-stack
            cards:
              - type: markdown
                content: |-
                  Outlet
                  # 1
              - type: conditional
                conditions:
                  - condition: or
                    conditions:
                      - condition: state
                        entity: switch.pdu_8035_3_r2_pdu_outlet_1
                        state: 'on'
                      - condition: state
                        entity: switch.pdu_8035_3_r2_pdu_outlet_1
                        state: 'off'
                card:
                  type: vertical-stack
                  cards:
                    - show_name: false
                      show_icon: true
                      type: button
                      entity: switch.pdu_8035_3_r2_pdu_outlet_1
                      show_state: false
                    - show_name: false
                      show_icon: false
                      show_state: true
                      type: glance
                      entities:
                        - entity: sensor.pdu_8035_3_r2_pdu_outlet_1_label
              - type: conditional
                conditions:
                  - condition: or
                    conditions:
                      - condition: state
                        entity: switch.pdu_8035_3_r2_pdu_outlet_1
                        state: 'on'
                card:
                  type: conditional
                  conditions: []
                  card:
                    type: vertical-stack
                    cards:
                      - show_name: false
                        show_icon: false
                        show_state: true
                        type: glance
                        entities:
                          - entity: sensor.none_pdu_outlet_1_power
                            show_state: true
                            show_last_changed: false
                      - show_name: false
                        show_icon: false
                        show_state: true
                        type: glance
                        entities:
                          - entity: sensor.pdu_8035_3_r2_pdu_outlet_1_current
              - type: conditional
                conditions:
                  - condition: or
                    conditions:
                      - condition: state
                        entity: switch.pdu_8035_3_r2_pdu_outlet_1
                        state: 'off'
                      - condition: state
                        entity: switch.pdu_8035_3_r2_pdu_outlet_1
                        state: unavailable
                      - condition: state
                        entity: switch.pdu_8035_3_r2_pdu_outlet_1
                        state: unknown
                card:
                  type: markdown
                  content: ' '
              - type: conditional
                conditions:
                  - condition: state
                    entity: switch.pdu_8035_3_r2_pdu_outlet_1
                    state: 'on'
                card:
                  show_name: true
                  show_icon: true
                  type: button
                  entity: button.pdu_8035_3_r2_pdu_reset_outlet_1
                  name: Power cycle outlet
              - type: conditional
                conditions:
                  - condition: or
                    conditions:
                      - condition: state
                        entity: switch.pdu_8035_3_r2_pdu_outlet_1
                        state: 'off'
                      - condition: state
                        entity: switch.pdu_8035_3_r2_pdu_outlet_1
                        state: unavailable
                      - condition: state
                        entity: switch.pdu_8035_3_r2_pdu_outlet_1
                        state: unknown
                card:
                  type: markdown
                  content: ' '
          - type: horizontal-stack
            cards:
              - type: markdown
                content: |-
                  Outlet
                  # 2
              - type: conditional
                conditions:
                  - condition: or
                    conditions:
                      - condition: state
                        entity: switch.pdu_8035_3_r2_pdu_outlet_2
                        state: 'on'
                      - condition: state
                        entity: switch.pdu_8035_3_r2_pdu_outlet_2
                        state: 'off'
                card:
                  type: vertical-stack
                  cards:
                    - show_name: false
                      show_icon: true
                      type: button
                      entity: switch.pdu_8035_3_r2_pdu_outlet_2
                      show_state: false
                    - show_name: false
                      show_icon: false
                      show_state: true
                      type: glance
                      entities:
                        - entity: sensor.pdu_8035_3_r2_pdu_outlet_2_label
              - type: conditional
                conditions:
                  - condition: or
                    conditions:
                      - condition: state
                        entity: switch.pdu_8035_3_r2_pdu_outlet_2
                        state: 'on'
                card:
                  type: conditional
                  conditions: []
                  card:
                    type: vertical-stack
                    cards:
                      - show_name: false
                        show_icon: false
                        show_state: true
                        type: glance
                        entities:
                          - entity: sensor.pdu_8035_3_r2_pdu_outlet_2_power
                            show_state: true
                            show_last_changed: false
                      - show_name: false
                        show_icon: false
                        show_state: true
                        type: glance
                        entities:
                          - entity: sensor.pdu_8035_3_r2_pdu_outlet_2_current
              - type: conditional
                conditions:
                  - condition: or
                    conditions:
                      - condition: state
                        entity: switch.pdu_8035_3_r2_pdu_outlet_2
                        state: 'off'
                      - condition: state
                        entity: switch.pdu_8035_3_r2_pdu_outlet_2
                        state: unavailable
                      - condition: state
                        entity: switch.pdu_8035_3_r2_pdu_outlet_2
                        state: unknown
                card:
                  type: markdown
                  content: ' '
              - type: conditional
                conditions:
                  - condition: state
                    entity: switch.pdu_8035_3_r2_pdu_outlet_2
                    state: 'on'
                card:
                  show_name: true
                  show_icon: true
                  type: button
                  entity: button.pdu_8035_3_r2_pdu_reset_outlet_2
                  name: Power cycle outlet
              - type: conditional
                conditions:
                  - condition: or
                    conditions:
                      - condition: state
                        entity: switch.pdu_8035_3_r2_pdu_outlet_2
                        state: 'off'
                      - condition: state
                        entity: switch.pdu_8035_3_r2_pdu_outlet_2
                        state: unavailable
                      - condition: state
                        entity: switch.pdu_8035_3_r2_pdu_outlet_2
                        state: unknown
                card:
                  type: markdown
                  content: ' '
          - type: heading
            heading: ' Mainentance (be sure what you are doing)'
            heading_style: title
            icon: ''
          - type: horizontal-stack
            cards:
              - type: markdown
                content: ' '
              - type: markdown
                content: ' '
              - show_name: true
                show_icon: true
                type: button
                entity: button.pdu_8035_3_r2_pdu_reboot
                name: Restart PDU
              - type: vertical-stack
                cards:
                  - show_name: true
                    show_icon: true
                    type: button
                    entity: input_boolean.pdu_mqtt_telemetry_received
                    show_state: false
                    name: Telemetry received
                  - type: conditional
                    conditions:
                      - entity: input_boolean.pdu_mqtt_telemetry_received
                        state: 'on'
                    card:
                      type: markdown
                      content: 'yes'
                      title: null
                    else_card:
                      type: markdown
                      content: 'no'
                      title: null
        column_span: 1
    type: sections
    max_columns: 1
    cards: []

A post was merged into an existing topic: Gude Systems PDU 8035 series integration via MQTT: Part 1 - Introduction