{% extends "base.j2" %}

{% block content %}
{{ breadcrumbs([{'text': 'inverter'|lang}]) }}

<h6 class="text-primary">{{ "inverter_status"|lang }}</h6>
<div id="inverter_status">
  {{ html|safe }}
</div>

<div class="pt-3">
  <a href="inverter.cgi?do=set-osp&amp;value={{ 'sub' if rated.output_source_priority == 'Solar-Battery-Utility' else 'sbu' }}">
    <button type="button" class="btn btn-primary">{{ "inverter_switch_to"|lang }} <b>{{ 'Solar-Utility-Battery' if rated.output_source_priority == 'Solar-Battery-Utility' else 'Solar-Battery-Utility' }}</b></button>
  </a>
</div>
{% endblock %}

{% block js %}
Inverter.poll();
{% endblock %}