Hallo Björn, ich will es mal versuchen.
Ich habe auch nur wenig Ahnung von den Codes, habe mir alles lange zusammengesucht und sehr viel probiert.
Ist schon eine Weile her, mal schauen ob ich das noch zusammenbekomme.
Erstmal habe ich diesen Eintrag zum Modbus in der configuration.yaml erstellt.
# Integriert alle Modbus Anwendungen des Ordners "modbus"
modbus: !include_dir_merge_list modbus
Dann habe ich einen Ordner modbus erstellt. In dem liegt die Datei blauberg.yaml. Sie hat diesen Inhalt:
# Modbus Konfiguratione der Vents Wohnraumlüftung (Identisch mit Blauberg)
- name: 'Blauberg'
type: tcp
host: 192.168.178.7 # ip ggf. anpassen
port: 502
sensors:
# Input Registers (16-Bit-Register) - Modbus-Funktionen: 4 (input_type: input)
- name: "Aktuelle Temperatur des ausgewählten Sensors zur Temperaturregelung"
unit_of_measurement: "°C"
address: 0 # Startadresse des ersten Input Registers
slave: 1 # Modbus-Slave-ID
device_class: temperature
data_type: int16
input_type: input
- name: "Frischluft am Einlass"
unique_id: Frischluft am Einlass
unit_of_measurement: "°C"
address: 1
slave: 1
device_class: temperature
data_type: int16
input_type: input
scale: 0.1 # Skalierung des Rohwerts
precision: 1 # Angabe der Anzahl der Dezimalstellen
- name: "Zuluft zur Wohnung"
unique_id: Zuluft zur Wohnung
unit_of_measurement: "°C"
address: 2
slave: 1
device_class: temperature
data_type: int16
input_type: input
scale: 0.1 # Skalierung des Rohwerts
precision: 1 # Angabe der Anzahl der Dezimalstellen
- name: "Abluft aus Wohnung"
unique_id: Abluft aus Wohnung
unit_of_measurement: "°C"
address: 3
slave: 1
device_class: temperature
data_type: int16
input_type: input
scale: 0.1 # Skalierung des Rohwerts
precision: 1 # Angabe der Anzahl der Dezimalstellen
- name: "Abluft nach aussen"
unique_id: Abluft nach aussen
unit_of_measurement: "°C"
address: 4
slave: 1
device_class: temperature
data_type: int16
input_type: input
scale: 0.1 # Skalierung des Rohwerts
precision: 1 # Angabe der Anzahl der Dezimalstellen
- name: "Luftfeuchte aus Wohnung"
unique_id: Luftfeuchte aus Wohnung
unit_of_measurement: "%"
address: 10
slave: 1
device_class: humidity
data_type: int16
input_type: input
scale: 1 # Skalierung des Rohwerts
precision: 1 # Angabe der Anzahl der Dezimalstellen
# Holding Registers (16-Bit-Register) - Modbus-Funktionen: 3, 6, 16 (input_type: holding )
- name: "Luefterstufe lesen und schreiben"
unique_id: luefterstufe_lesen_und_schreiben
address: 2
slave: 1
device_class: current
data_type: int16
input_type: holding
- name: "Lüftungsstärke des Zuluftventilators bei Standby"
address: 5
slave: 1
device_class: wind_speed
data_type: int16
input_type: holding
- name: "Lüftungsstärke des Abluftventilators bei Standby"
address: 6
slave: 1
device_class: wind_speed
data_type: int16
input_type: holding
- name: "Lüftungsstärke des Zuluftventilators bei der ersten Lüftungsstufe"
address: 7
slave: 1
device_class: wind_speed
data_type: int16
input_type: holding
- name: "Lüftungsstärke des Abluftventilators bei der ersten Lüftungsstufe"
address: 8
slave: 1
device_class: wind_speed
data_type: int16
input_type: holding
- name: "Lüftungsstärke des Zuluftventilators bei der zweiten Lüftungsstufe"
address: 9
slave: 1
device_class: wind_speed
data_type: int16
input_type: holding
- name: "Lüftungsstärke des Abluftventilators bei der zweiten Lüftungsstufe"
address: 10
slave: 1
device_class: wind_speed
data_type: int16
input_type: holding
- name: "Lüftungsstärke des Zuluftventilators bei Boost"
address: 19
slave: 1
device_class: current
data_type: int16
input_type: holding
- name: "Lüftungsstärke des Abluftventilators bei Boost"
address: 20
slave: 1
device_class: current
data_type: int16
input_type: holding
- name: "Betriebsart der Lüftungsanlage: 0 - nur Lüftung 1 - Heizung, 2 - Kühlung, 3 - 0 Auto"
address: 43
slave: 1
device_class: wind_speed
data_type: int16
input_type: holding
- name: "Raumtemperatursollwert im Normalbetrieb"
address: 44
slave: 1
device_class: current
data_type: int16
input_type: holding
- name: "Feuchtesollwert"
address: 45
slave: 1
device_class: current
data_type: int16
input_type: holding
- name: "CO2-Sollwert"
unit_of_measurement: "ppm"
address: 46
slave: 1
device_class: current
data_type: int16
input_type: holding
- name: "PM2.5-Sollwert"
unit_of_measurement: "μg/m3"
address: 47
slave: 1
device_class: current
data_type: int16
input_type: holding
- name: "VOC-Sollwert"
unit_of_measurement: "Byte"
address: 48
slave: 1
device_class: current
data_type: int16
input_type: holding
- name: "HR_TIMER_MODE"
address: 49
slave: 1
device_class: current
data_type: int16
input_type: holding
- name: "Status Bypass"
unique_id: status_bypass
address: 74
slave: 1
device_class: current
data_type: int16
input_type: holding
Damit frage ich auch Entitäten ab, die ich aktuell nicht nutze.
Schau mal ob Du dann die Werte in den Entitäten schonmal sehen kannst.
Dann habe ich eine Stapelkarte mit diesem Code erstellt.
Die Entität des Shelly muss natürlich auch an mehreren Stellen angepasst werden
type: vertical-stack
cards:
- type: custom:mushroom-template-card
primary: Wohnraumlüftung EIN / AUS
secondary: |-
{% if is_state('switch.shellyplusplugs_b0b21c1925e8_switch_0', 'off') %}
aktuell ausgeschaltet
{% else %}
aktuell eingeschaltet
{% endif %}
icon: |-
{% if is_state('switch.shellyplusplugs_b0b21c1925e8_switch_0', 'off') %}
mdi:fan-off
{% else %}
mdi:fan-auto
{% endif %}
entity: switch.shellyplusplugs_b0b21c1925e8_switch_0
badge_color: ""
icon_color: |-
{% if is_state('switch.shellyplusplugs_b0b21c1925e8_switch_0', 'on') %}
green
{% else %}
red
{% endif %}
multiline_secondary: true
fill_container: false
layout: horizontal
tap_action:
action: toggle
badge_icon: ""
- type: custom:mushroom-template-card
primary: Öffnen Bypass Wohnraumlüftung (bei Feuchte)
secondary: |-
{% if is_state('sensor.status_bypass', '2') %}
aktuell geschlossen (mit Rückgewinnung)
{% else %}
aktuell geöffnet (ohne Rückgewinnung)
{% endif %}
icon: |-
{% if is_state('sensor.status_bypass', '2') %}
mdi:valve-closed
{% else %}
mdi:valve-open
{% endif %}
entity: input_button.luftung_bypass_offnen
badge_color: green
icon_color: |-
{% if is_state('sensor.status_bypass', '2') %}
green
{% else %}
red
{% endif %}
multiline_secondary: true
fill_container: false
layout: horizontal
tap_action:
action: toggle
visibility:
- condition: state
entity: sensor.status_bypass
state: "2"
- type: custom:mushroom-template-card
primary: Schließen Bypass Wohnraumlüftung (Standard)
secondary: |-
{% if is_state('sensor.status_bypass', '2') %}
aktuell geschlossen (mit Rückgewinnung)
{% else %}
aktuell geöffnet (ohne Rückgewinnung)
{% endif %}
icon: |-
{% if is_state('sensor.status_bypass', '2') %}
mdi:valve-closed
{% else %}
mdi:valve-open
{% endif %}
entity: input_button.luftung_bypass_schliessen
badge_color: green
icon_color: |-
{% if is_state('sensor.status_bypass', '2') %}
green
{% else %}
red
{% endif %}
multiline_secondary: true
fill_container: false
layout: horizontal
tap_action:
action: toggle
visibility:
- condition: state
entity: sensor.status_bypass
state: "1"
- type: entities
entities:
- entity: input_button.luftung_stufe_0
- entity: input_button.luftung_stufe_1
- entity: input_button.luftung_stufe_2
- entity: input_button.luftung_stufe_3
- entity: sensor.luefterstufe_lesen_und_schreiben
- entity: sensor.shellyplusplugs_b0b21c1925e8_switch_0_power
state_color: true
show_header_toggle: false
theme: Mushroom Square Shadow
Nicht wundern das sich dieFarben und die Texte in Abhängigkeit des Zustandes ändern oder teilweise ausgeblendet werden.
Viel Erfolg bei der Umsetzung
VG Bernd