{% extends 'base.html.twig' %} {% block title %}Versteckte HAT-Sensoren verwalten - Dashboard{% endblock %} {% block content %}

Datalogger: {{ datalogger.name }}

{% if datalogger.location %}

{{ datalogger.location }}

{% endif %}
{% for message in app.flashes('success') %}
{{ message }}
{% endfor %} {% for message in app.flashes('error') %}
{{ message }}
{% endfor %} {% if not apiAvailable %}
Warnung: Datalogger API ist nicht erreichbar. Die HAT-Sensoren können nicht geladen werden.
{% endif %} {% if hatsData.error is defined %}
Fehler: {{ hatsData.error }}
{% elseif hatsData %} {% set hatDataToProcess = hatsData.hat_data is defined and hatsData.hat_data is iterable ? hatsData.hat_data : (hatsData is iterable ? hatsData : {}) %} {% if hatDataToProcess and hatDataToProcess is iterable %}

Verfügbare HAT-Sensoren

Klicken Sie auf einen Sensor oder Channel, um ihn für normale User zu verstecken/zeigen.

{% for hatKey, hat in hatDataToProcess %} {% if hat is iterable and hat.inputs is defined and hat.inputs is iterable %} {% set hatName = hat.name is not iterable ? hat.name : hatKey %} {% set hatStack = hat.stack is not iterable ? hat.stack : null %}

{{ hatName }} {% if hatStack is not null %}Stack {{ hatStack }}{% endif %}

{% set hatKey = hatName ~ '_' ~ (hatStack ?? 'null') ~ '_null' %}
{% for input in hat.inputs %} {% if input is iterable %} {% set inputChannel = input.channel is not iterable ? input.channel : null %} {% set channelKey = hatName ~ '_' ~ (hatStack ?? 'null') ~ '_' ~ (inputChannel ?? 'null') %} {% set isHidden = channelKey in hiddenMap|keys %}
{% if isHidden %}{% else %}{% endif %} Channel {{ inputChannel ?? 'N/A' }}
{% if input.sensor_name is defined and input.sensor_name is not iterable %}
{{ input.sensor_name }}
{% endif %}
{% endif %} {% endfor %}
{% endif %} {% endfor %}
{% else %}
Keine HAT-Daten verfügbar
{% endif %} {% endif %}

Aktuell versteckte Sensoren

{% if hiddenSensors is empty %}

Keine Sensoren versteckt.

{% else %}
{% for hidden in hiddenSensors %} {% endfor %}
HAT Name Stack Channel Erstellt am Aktionen
{{ hidden.hatName }} {{ hidden.stack ?? '-' }} {{ hidden.channel ?? '-' }} {{ hidden.createdAt|date('d.m.Y H:i') }}
{% endif %}
Zurück zum Dashboard
{% endblock %}