From ae59e21a2e56afe5b709e14e931036ee5d403783 Mon Sep 17 00:00:00 2001 From: Timo Makinen Date: Sat, 19 Apr 2025 19:14:07 +0000 Subject: [PATCH] homeassistant: Disable manual mqtt configuration --- roles/homeassistant/tasks/main.yml | 10 ---------- roles/homeassistant/templates/mqtt.yaml.j2 | 13 ------------- 2 files changed, 23 deletions(-) delete mode 100644 roles/homeassistant/templates/mqtt.yaml.j2 diff --git a/roles/homeassistant/tasks/main.yml b/roles/homeassistant/tasks/main.yml index 3e368d1..746b312 100644 --- a/roles/homeassistant/tasks/main.yml +++ b/roles/homeassistant/tasks/main.yml @@ -146,16 +146,6 @@ group: "{{ ansible_wheel }}" setype: _default -- name: Create mqtt config file - ansible.builtin.template: - dest: /srv/homeassistant/mqtt.yaml - src: mqtt.yaml.j2 - mode: "0644" - owner: root - group: "{{ ansible_wheel }}" - setype: _default - notify: Restart homeassistant - - name: Create directories for custom integrations ansible.builtin.file: path: "{{ item }}" diff --git a/roles/homeassistant/templates/mqtt.yaml.j2 b/roles/homeassistant/templates/mqtt.yaml.j2 deleted file mode 100644 index c0b7ac3..0000000 --- a/roles/homeassistant/templates/mqtt.yaml.j2 +++ /dev/null @@ -1,13 +0,0 @@ ---- -sensor: -{% for shelly in shellies | selectattr("name", "match", "^shellyplug-s-") | list %} - - name: Power Usage - state_topic: home/{{ shelly["room"] }}/{{ shelly["device"] }}/power - unique_id: {{ shelly["name"] }} - unit_of_measurement: W - device: - name: {{ shelly["device"] | capitalize }} - suggested_area: {{ shelly["room"] | replace("_", " ") | capitalize }} - identifiers: - - {{ shelly["name"] }} -{% endfor %}