diff --git a/.HA_VERSION b/.HA_VERSION index 9c0cd24..3295314 100644 --- a/.HA_VERSION +++ b/.HA_VERSION @@ -1 +1 @@ -2025.5.2 \ No newline at end of file +2025.7.3 \ No newline at end of file diff --git a/automations.yaml b/automations.yaml index 4e5e142..9abd138 100644 --- a/automations.yaml +++ b/automations.yaml @@ -125,28 +125,32 @@ - id: '1623868115464' alias: 420! description: '' - trigger: - - platform: time - at: '16:20' - condition: [] - action: - - service: notify.mobile_app_le2123 + triggers: + - at: '16:20' + trigger: time + conditions: [] + actions: + - action: notify.mobile_app_apollo data: + message: Lodere es, Lustknabe. + title: 420! + - data: title: 420! message: Lodere es, Lustknabe. - - service: tts.speak - data: + action: notify.mobile_app_le2123 + - data: cache: true media_player_entity_id: media_player.raspiaudio_muse_luxe message: 4 20 lodere es, Lustknabe target: entity_id: tts.piper - - service: mqtt.publish - data: + action: tts.speak + - data: qos: 0 retain: false topic: awtrix_b8658c/notify payload: '{"text": "420, lodere es, Lustknabe!"}' + action: mqtt.publish mode: single - id: '1623911524804' alias: TV Anti-Reflexion (undo) @@ -351,25 +355,25 @@ - id: '1628972885682' alias: Raumduft zum Aufstehen einschalten description: '' - trigger: - - platform: state - entity_id: input_text.sleep_as_android + triggers: + - entity_id: input_text.sleep_as_android to: sleep_tracking_stopped - condition: + trigger: state + conditions: - condition: state entity_id: person.marcus_scholz state: home - action: + actions: - type: turn_on device_id: 5a08ac4c3b3893b540a9934fa92dccfa entity_id: switch.flur_raumduft domain: switch - - service: light.turn_on - data: {} + - data: {} target: entity_id: - - light.awtrix_desk_matrix - - light.awtrix_kitchen_matrix + - light.awtrix_528bd4_matrix + - light.awtrix_b8658c_matrix + action: light.turn_on mode: single - id: '1630914505161' alias: Beim Verlassen der Wohnung alles abschalten @@ -458,12 +462,12 @@ - id: '1675778284738' alias: Stündliche Zeitansage description: '' - trigger: - - platform: time_pattern - minutes: '0' + triggers: + - minutes: '0' seconds: '0' hours: '*' - condition: + trigger: time_pattern + conditions: - condition: state entity_id: person.marcus_scholz state: home @@ -475,9 +479,8 @@ - condition: state entity_id: input_text.sleep_as_android state: alarm_alert_dismiss - action: - - service: tts.speak - data: + actions: + - data: cache: true media_player_entity_id: media_player.raspiaudio_muse_luxe message: '{{message}} @@ -486,14 +489,15 @@ target: entity_id: tts.piper enabled: true - - service: mqtt.publish - data: + action: tts.speak + - data: topic: awtrix_desk/notify payload: '{"text": "{{message}}", "icon": "clockcolor", "duration": 16}' - - service: mqtt.publish - data: + action: mqtt.publish + - data: topic: awtrix_kitchen/notify payload: '{"text": "{{message}}", "icon": "clockcolor", "duration": 16}' + action: mqtt.publish variables: message: '{% set t = now().hour %} {% set m = ''Morgen'' if t < 12 else ''Nachmittag'' if t < 18 else ''Abend'' %} Guten {{m}} Marcus. Draußen sind es {{states(''sensor.aussentemperatur'')}} @@ -517,16 +521,16 @@ alias: Fenster schließen, wenn es warm wird description: Tagsüber im Sommer, wenn die Außentemperatur sich der Innentemperatur annähert. - trigger: - - platform: numeric_state - entity_id: + triggers: + - entity_id: - sensor.aussentemperatur above: sensor.wohnungstemperatur for: hours: 0 minutes: 5 seconds: 0 - condition: + trigger: numeric_state + conditions: - condition: state entity_id: person.marcus_scholz state: home @@ -536,16 +540,15 @@ - condition: sun after: sunrise before: sunset - action: - - service: notify.mobile_app_le2123 - data: + actions: + - data: title: Schlaues lüften message: '{{message}} ' enabled: true - - service: tts.speak - data: + action: notify.mobile_app_le2123 + - data: cache: true media_player_entity_id: media_player.raspiaudio_muse_luxe message: '{{message}} @@ -553,6 +556,7 @@ ' target: entity_id: tts.piper + action: tts.speak variables: message: 'Die Außentemperatur ist mit {{states(''sensor.aussentemperatur'')}} ° Celsius {{((states(''sensor.aussentemperatur'')|float)-(states(''sensor.wohnungstemperatur'')|float)) @@ -564,16 +568,16 @@ - id: '1686327239749' alias: Fenster öffnen wenn es kühler wird description: Im Sommer, wenn die Außentemperatur sich der Innentemperatur annähert. - trigger: - - platform: numeric_state - entity_id: + triggers: + - entity_id: - sensor.aussentemperatur for: hours: 0 minutes: 5 seconds: 0 below: sensor.wohnungstemperatur - condition: + trigger: numeric_state + conditions: - condition: state entity_id: person.marcus_scholz state: home @@ -588,16 +592,15 @@ - condition: state entity_id: sensor.season state: summer - action: - - service: notify.mobile_app_le2123 - data: + actions: + - data: title: Schlaues lüften message: '{{message}} ' enabled: true - - service: tts.speak - data: + action: notify.mobile_app_le2123 + - data: cache: true media_player_entity_id: media_player.raspiaudio_muse_luxe message: '{{message}} @@ -605,6 +608,7 @@ ' target: entity_id: tts.piper + action: tts.speak mode: single variables: message: 'Die Außentemperatur ist mit {{states(''sensor.aussentemperatur'')}} @@ -731,19 +735,19 @@ - id: '1699969052661' alias: 'Awtrix: Matrix einschalten' description: '' - trigger: - - platform: state - entity_id: person.marcus_scholz + triggers: + - entity_id: person.marcus_scholz to: home from: not_home - condition: [] - action: - - service: light.turn_on - data: {} + trigger: state + conditions: [] + actions: + - data: {} target: entity_id: - - light.awtrix_desk_matrix - - light.awtrix_kitchen_matrix + - light.awtrix_b8658c_matrix + - light.awtrix_528bd4_matrix + action: light.turn_on mode: single - id: '1700482951854' alias: Licht bei Sonnenuntergang einschalten (XMas) diff --git a/configuration.yaml b/configuration.yaml index 9e4bd55..9920f36 100644 --- a/configuration.yaml +++ b/configuration.yaml @@ -36,6 +36,7 @@ utility_meter: !include utility_meters.yaml # MQTT sensors mqtt: !include mqtt.yaml +mqtt_statestream: !include mqtt_statestream.yaml # Template sensors template: !include template.yaml diff --git a/custom_components/hochwasserportal/manifest.json b/custom_components/hochwasserportal/manifest.json index 6ac3c34..5724b5b 100644 --- a/custom_components/hochwasserportal/manifest.json +++ b/custom_components/hochwasserportal/manifest.json @@ -9,6 +9,6 @@ "iot_class": "cloud_polling", "issue_tracker": "https://github.com/stephan192/hochwasserportal/issues", "loggers": ["hochwasserportal"], - "requirements": ["lhpapi==1.0.4"], - "version": "1.0.2" + "requirements": ["lhpapi==1.0.5"], + "version": "1.0.3" } \ No newline at end of file diff --git a/mqtt.yaml b/mqtt.yaml index 1f26aa8..be452fc 100644 --- a/mqtt.yaml +++ b/mqtt.yaml @@ -81,3 +81,157 @@ model: Vauno-EN8822C manufacturer: rtl_433 + - device_class: humidity + unit_of_measurement: '%' + value_template: '{{ value|float }}' + state_class: measurement + state_topic: rtl_433/sdr/devices/Nexus-TH/1/238/humidity + unique_id: Nexus-TH-1-238-H + device: + identifiers: + - Nexus-TH-1-238 + model: Nexus-TH + manufacturer: rtl_433 + name: Nexus-TH-1-238 + name: Humidity + + - device_class: humidity + unit_of_measurement: '%' + value_template: '{{ value|float }}' + state_class: measurement + state_topic: rtl_433/sdr/devices/Nexus-TH/1/238/humidity + unique_id: Nexus-TH-1-238-H + device: + identifiers: + - Nexus-TH-1-238 + model: Nexus-TH + manufacturer: rtl_433 + name: Nexus-TH-1-238 + name: Humidity + +# Cotech-367959 + + - device_class: battery + unit_of_measurement: '%' + value_template: '{{ ((float(value) * 99)|round(0)) + 1 }}' + state_class: measurement + entity_category: diagnostic + state_topic: rtl_433/sdr/devices/Cotech-367959/130/battery_ok + unique_id: Cotech-367959-130-B + device: + identifiers: + - Cotech-367959-130 + model: Cotech-367959 + manufacturer: rtl_433 + name: Cotech-367959-130 + name: Battery + + - device_class: temperature + unit_of_measurement: °F + value_template: '{{ value|float|round(1) }}' + state_class: measurement + state_topic: rtl_433/sdr/devices/Cotech-367959/130/temperature_F + unique_id: Cotech-367959-130-F + device: + identifiers: + - Cotech-367959-130 + model: Cotech-367959 + manufacturer: rtl_433 + name: Cotech-367959-130 + name: Temperature + + - device_class: humidity + unit_of_measurement: '%' + value_template: '{{ value|float }}' + state_class: measurement + state_topic: rtl_433/sdr/devices/Cotech-367959/130/humidity + unique_id: Cotech-367959-130-H + device: + identifiers: + - Cotech-367959-130 + model: Cotech-367959 + manufacturer: rtl_433 + name: Cotech-367959-130 + name: Humidity + + - device_class: precipitation + unit_of_measurement: mm + value_template: '{{ value|float|round(2) }}' + state_class: total_increasing + state_topic: rtl_433/sdr/devices/Cotech-367959/130/rain_mm + unique_id: Cotech-367959-130-RT + device: + identifiers: + - Cotech-367959-130 + model: Cotech-367959 + manufacturer: rtl_433 + name: Cotech-367959-130 + name: Rain Total + + - unit_of_measurement: ° + value_template: '{{ value|float }}' + state_class: measurement + state_topic: rtl_433/sdr/devices/Cotech-367959/130/wind_dir_deg + unique_id: Cotech-367959-130-WD + device: + identifiers: + - Cotech-367959-130 + model: Cotech-367959 + manufacturer: rtl_433 + name: Cotech-367959-130 + name: Wind Direction + + - device_class: wind_speed + unit_of_measurement: km/h + value_template: '{{ (float(value|float) * 3.6) | round(2) }}' + state_class: measurement + state_topic: rtl_433/sdr/devices/Cotech-367959/130/wind_avg_m_s + unique_id: Cotech-367959-130-WS + device: + identifiers: + - Cotech-367959-130 + model: Cotech-367959 + manufacturer: rtl_433 + name: Cotech-367959-130 + name: Wind Average + + - device_class: wind_speed + unit_of_measurement: km/h + value_template: '{{ (float(value|float) * 3.6) | round(2) }}' + state_class: measurement + state_topic: rtl_433/sdr/devices/Cotech-367959/130/wind_max_m_s + unique_id: Cotech-367959-130-GS + device: + identifiers: + - Cotech-367959-130 + model: Cotech-367959 + manufacturer: rtl_433 + name: Cotech-367959-130 + name: Wind max + + - device_class: illuminance + unit_of_measurement: lx + value_template: '{{ value|int }}' + state_class: measurement + state_topic: rtl_433/sdr/devices/Cotech-367959/130/light_lux + unique_id: Cotech-367959-130-lux + device: + identifiers: + - Cotech-367959-130 + model: Cotech-367959 + manufacturer: rtl_433 + name: Cotech-367959-130 + name: Outside Luminance + + - unit_of_measurement: UV Index + value_template: '{{ value|float|round(1) }}' + state_class: measurement + state_topic: rtl_433/sdr/devices/Cotech-367959/130/uv + unique_id: Cotech-367959-130-uv + device: + identifiers: + - Cotech-367959-130 + model: Cotech-367959 + manufacturer: rtl_433 + name: Cotech-367959-130 + name: UV Index