{% extends "base.html" %} {% block title %}Dashboard – Location Management{% endblock %} {% block content %}

Dashboard

{% if current_user.is_admin() %} Add Board {% endif %}
{{ boards | length }}
Total Boards
{{ boards | selectattr('is_online') | list | length }}
Online
{{ active_workflows }}
Active Workflows
{% if boards %}
{% for board in boards %}
{{ board.name }}
{{ board.board_type }} {% if board.is_online %}Online{% else %}Offline{% endif %}

{{ board.host }}:{{ board.port }}

{% for n in range(1, board.num_relays + 1) %} {% set relay_key = "relay_" ~ n %} {% set is_on = board.relay_states.get(relay_key, false) %} {% set e = board.get_relay_entity(n) %} {% endfor %}
{% if board.num_inputs > 0 %}
{% for n in range(1, board.num_inputs + 1) %} {% set input_key = "input_" ~ n %} {% set raw_state = board.input_states.get(input_key, true) %} {% set is_active = not raw_state %} {% set e = board.get_input_entity(n) %} {{ e.name }} {% endfor %}
{% endif %}
{% endfor %}
{% else %}

No boards added yet.

{% if current_user.is_admin() %} Add your first board {% endif %}
{% endif %} {% endblock %} {% block scripts %} {% endblock %}