{% load i18n %}

{% trans "Connected devices" %}

{% trans "My sensors" %}

{% trans "Manage the devices that authenticate with BoomCast." %}

{% if messages %}{% endif %}
{% for sensor in sensors %}

{{ sensor.name }}

{% with status=sensor.heartbeat_status %}● {{ status.1 }}{% endwith %}
{% if sensor.is_active %}{% trans "Enabled" %}{% else %}{% trans "Disabled" %}{% endif %}
{% trans "Sensor ID" %}
{{ sensor.pk }}
{% trans "Last heartbeat" %}
{{ sensor.last_heartbeat|date:"j M Y, H:i"|default:"—" }}
{% trans "Created" %}
{{ sensor.created_at|date:"j M Y" }}
{% trans "Token prefix" %}
{{ sensor.token_prefix|default:"—" }}
{% trans "Manage" %}
{% empty %}

{% trans "No sensors yet. Add a device to receive an API token for hardware submissions." %}

{% endfor %}
{% csrf_token %}

{% trans "Add a sensor" %}

{% trans "Give your device a name so you can recognise it later." %}