{% extends "base.html" %} {% block title %}{% if device %}Edit Device – {{ device.name }}{% else %}Add Device{% endif %}{% endblock %} {% block content %}

{% if device %}Edit Device{% else %}Add Device{% endif %}

Give your device a name and map it to a relay or sensor channel on one of your boards. Once mapped, toggling the device will control the physical hardware.

Identity
Device Type

Sets default icon, state labels and colours. Auto-filled when you pick a channel.

{% for tkey, tdef in relay_types.items() %} {% endfor %}
Custom Icon
Leave blank to use device type default.
{% for icon_cls, icon_name in icon_palette %} {% endfor %}
Board & Channel Binding

Select a board, then click the relay or sensor you want to bind to this device. Toggling the device later will directly control the physical hardware.

Select a board above to see its relay and sensor channels.
Cancel
{% endblock %} {% block scripts %} {% endblock %}