MQTT

Show the mirror in Home Assistant through your MQTT broker (such as the Mosquitto add-on): the screen, the sensors, the buttons and what your modules share, without any YAML. Home Assistant can only look until you let it control something below.

{% if cfg.enabled %}

{% if status == "connected" %} Connected to {{ cfg.host }}. {% else %} {{ status | capitalize }}{% endif %}

{% if not cfg.username %}

No user: a broker that lets the mirror in without one lets anyone in, and they can do all you allow below. Give the mirror a login of its own.

{% endif %} {% endif %}

What Home Assistant may control

Anyone who can write to your broker can do what you allow here. Never more: no settings, installs or restarts.

{% if modules %}

What modules share

{% for module in modules %} {% set choice = choices.get(module.id, {}) %}

{% for name, entity in module.entities.items() %}{{ entity.title }}{% if not loop.last %}, {% endif %}{% endfor %}

{% for name, entity in module.entities.items() if entity.control %} {% endfor %}
{% endfor %} {% endif %}
{% if cfg.enabled %} {% endif %}
{% if cfg.enabled and cfg.id %}
Lock the broker down (recommended)

Without this, every device logged in to your broker could send the mirror what you allow above, and take over its connection. In the Mosquitto add-on, turn on customize and put these in its folder (/share/mosquitto): an ACL file with the lines below, and use_username_as_clientid true in a .conf file. Give your other devices their own users and lines too.

user {{ cfg.username or "" }}
topic write mirrordash/{{ cfg.id }}/#
topic read mirrordash/{{ cfg.id }}/+/set
topic read mirrordash/{{ cfg.id }}/enabled/+/set
topic read mirrordash/{{ cfg.id }}/m/+/+/set
topic write homeassistant/device/{{ cfg.id }}/#
topic read homeassistant/status
{% endif %}

Step by step in the user guide.