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

Boards

{% if current_user.is_admin() %} Add Board {% endif %}
{% 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 %}
{% endif %} {% if boards %}
{% for b in boards %} {% endfor %}
NameTypeHostRelaysInputsStatusLast Seen
{% if b.board_type == 'sonoff_ewelink' %} {{ b.name }} {% else %} {{ b.name }} {% endif %} {{ b.board_type }} {{ b.host }}:{{ b.port }} {{ b.num_relays }} {{ b.num_inputs }} {% if b.is_online %}Online{% else %}Offline{% endif %} {% if b.last_seen %}{{ b.last_seen.strftime('%Y-%m-%d %H:%M') }}{% else %}—{% endif %} {% if not b.is_online %} {% else %} {% endif %} {% if current_user.is_admin() %}
{% endif %}
{% else %}

No boards yet.

{% if current_user.is_admin() %} Add Board {% endif %}
{% endif %} {% endblock %} {% block scripts %} {% endblock %}