Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to create my own blueprint #87

Open
Vandiliz3r opened this issue Jul 13, 2022 · 1 comment
Open

Trying to create my own blueprint #87

Vandiliz3r opened this issue Jul 13, 2022 · 1 comment

Comments

@Vandiliz3r
Copy link

Vandiliz3r commented Jul 13, 2022

Could you please advise why the below blueprint does not work on the dashboard?

`blueprint:
custom_cards:

  • mushroom-template-card
  • mini-graph-card
    description: Created from the Pi-Hole Layout
    name: SolarPower
    type: page
    version: '1.0'
    card:
    cards:
  • cards: []
    item_classes: col-lg-3
    type: vertical-stack
  • cards:
    • cards:
      • entity: sensor.eskom_gridfreq
        icon: |2
        {% if is_state(entity, '0.0') %}
        mdi:transmission-tower-off
        {% else %}
        mdi:transmission-tower
        {% endif %}
        icon_color: |2-
        {% if not is_state(entity, '0.0') %}
        #0c0
        {% else %}
        red
        {% endif %}
        layout: vertical
        primary: |2-
        {% if not is_state(entity, '0.0') %}
        Eskom
        {% else %}
        Eskom
        {% endif %}
        secondary: |2-
        {% if not is_state(entity, '0.0') %}
        Supply Is On!
        {% else %}
        Supply Is Dead!
        {% endif %}
        tap_action:
        action: toggle
        type: custom:mushroom-template-card

      • entity: sensor.solar_watts
        icon: |2-
        {% if is_state(entity, '0.0') %}
        mdi:weather-sunset-down
        {% else %}
        mdi:solar-power
        {% endif %}
        icon_color: |2-
        {% if not is_state(entity, '0.0') %}
        #0c0
        {% else %}
        red
        {% endif %}
        layout: vertical
        primary: |2-
        {% if not is_state(entity, '0.0') %}
        Solar
        {% else %}
        Solar
        {% endif %}
        secondary: |2-
        {% if not is_state(entity, '0.0') %}
        Generating Power!
        {% else %}
        Is it night time?
        {% endif %}
        tap_action:
        action: toggle
        type: custom:mushroom-template-card

      • entity: sensor.eskom_loadshedding_stage
        icon: |2+
        {% if is_state(entity, '0') %}
        mdi:check-circle
        {% else %}
        mdi:alert-circle
        {% endif %}

        icon_color: |2-
        {% if is_state(entity, '0') %}
        #0c0
        {% else %}
        red
        {% endif %}
        layout: vertical
        primary: |2-
        {% if is_state(entity, '0') %}
        Loadshedding
        {% else %}
        LoadShedding
        {% endif %}
        secondary: |2-
        {% if is_state(entity, '0.0') %}
        None
        {% else %}
        Stage {{
        states('sensor.eskom_loadshedding_stage')}}
        {% endif %}
        tap_action:
        action: toggle
        type: custom:mushroom-template-card
        type: horizontal-stack

    • cards:
      • entity: sensor.inverter_maxload
        icon: mdi:speedometer
        layout: vertical
        multiline_secondary: false
        primary: Max Laod
        secondary: '{{states(entity)}}'
        type: custom:mushroom-template-card
      • entity: sensor.solar_maxpv
        icon: mdi:speedometer
        layout: vertical
        multiline_secondary: false
        primary: PV Max
        secondary: '{{states(entity)}}'
        type: custom:mushroom-template-card
      • entity: sensor.battery_volts
        icon: mdi:battery
        layout: vertical
        multiline_secondary: false
        primary: Battery Volts
        secondary: '{{states(entity)}}'
        type: custom:mushroom-template-card
      • entity: sensor.battery_soc
        icon: mdi:battery
        layout: vertical
        multiline_secondary: false
        primary: Battery SOC
        secondary: '{{states(entity)}} %'
        type: custom:mushroom-template-card
        type: horizontal-stack
    • cards:
      • aggregate_func: avg
        entities:
        • color: '#f205b3'
          entity: sensor.inverter_totalwatts
          font_size: 65
          font_size_header: 9
          height: 35
          hours_to_show: 24
          icon: mdi:account-cancel-outline
          line_width: 1
          name: Current Load
          points_per_hour: 3600
          show:
          average: true
          extrema: true
          graph: bar
          smoothing: false
          style: |
          ha-card {
          background: var(--paper-card-background-color);
          border-radius: 10px;
          box-shadow: 10px;
          font-weight: bold;
          opacity: 0.8;
          }
          tap_action: none
          type: custom:mini-graph-card
          update_interval: 1
          items_classes: col-lg-12 col-md-12 col-sm-12 col-xs-12
          padding: true
          type: custom:dwains-flexbox-card
    • cards:
      • cards:
        • aggregate_func: avg
          entities:
          • color: '#69FE08'
            entity: sensor.solar_watts
            font_size: 65
            font_size_header: 9
            height: 35
            hours_to_show: 24
            icon: mdi:account-cancel-outline
            line_width: 1
            name: Current Load
            points_per_hour: 3600
            show:
            average: true
            extrema: true
            graph: bar
            smoothing: false
            style: |
            ha-card {
            background: var(--paper-card-background-color);
            border-radius: 10px;
            box-shadow: 10px;
            font-weight: bold;
            opacity: 0.8;
            }
            tap_action: none
            type: custom:mini-graph-card
            update_interval: 1
            type: horizontal-stack
      • cards:
        • aggregate_func: avg
          entities:
          • color: '#FE0826'
            entity: sensor.eskom_gridwatts
            font_size: 65
            font_size_header: 9
            height: 35
            hours_to_show: 24
            icon: mdi:account-cancel-outline
            line_width: 1
            name: Current Load
            points_per_hour: 3600
            show:
            average: true
            extrema: true
            graph: bar
            smoothing: false
            style: |
            ha-card {
            background: var(--paper-card-background-color);
            border-radius: 10px;
            box-shadow: 10px;
            font-weight: bold;
            opacity: 0.8;
            }
            tap_action: none
            type: custom:mini-graph-card
            update_interval: 1
            type: horizontal-stack
            items_classes: col-lg-6 col-md-6 col-sm-12 col-xs-12
            padding: true
            type: custom:dwains-flexbox-card
            item_classes: col-lg-6 col-xs-12
            type: vertical-stack
  • cards: []
    item_classes: col-lg-3
    type: vertical-stack
    items_classes: col-xs-12
    padding: true
    type: custom:dwains-flexbox-card`
@ghost
Copy link

ghost commented Jul 13, 2022

Hard to find an error with the code you submitted, it is not well formatted. But, the start of the Blueprint must have looked like this.

649814C5-4DD7-4633-B6A1-50720E620FE0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant