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

Every device logged in to your broker can send the mirror what you allow above. On a Mosquitto broker of your own, an ACL file with the lines below keeps the mirror's user to its own topics; give your other devices their own users and lines too. Home Assistant's Mosquitto add-on lets its own logins through whatever an ACL says, so there only the choices above hold: allow no more than you need.

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.