{# Fragment: track-power control. Swappable via htmx. #} {# ``writable`` defaults True; passive drivers (jmri-ncemonitor) set it False so we can hide the ON/OFF buttons rather than invite a command that will raise. #} {% set _writable = power.writable if power.writable is defined else True %}

Track power {% if power.state == 2 %}ON {% elif power.state == 4 %}OFF {% elif power.state == 8 %}IDLE {% else %}UNKNOWN{% endif %} {% if not _writable %}observed{% endif %}

{% if _writable %} {% endif %} Connection prefix {{ power.name }}