Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send a notification with biomass boiler status #87

Open
alberto-lessi opened this issue Dec 9, 2023 · 10 comments
Open

Send a notification with biomass boiler status #87

alberto-lessi opened this issue Dec 9, 2023 · 10 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@alberto-lessi
Copy link

Hi,
I would like to create an automation that send a notification when the biomass bolier state changes.
Unfortunately, when I configure the notification message, I can have only the numeric status information, not the translation.
In the message I've used:
{{ states('sensor.solarfocus_biomass_boiler_status') }} but I can get only a number.
Could you help me to find a solution?
Thanks

@LavermanJJ LavermanJJ self-assigned this Jan 3, 2024
@LavermanJJ LavermanJJ added the question Further information is requested label Jan 3, 2024
@colgrim
Copy link

colgrim commented Jan 14, 2024

Same here, would be interested too...

@tinerop
Copy link
Contributor

tinerop commented Jan 15, 2024

Have you tried this in Home Assistant? (see screenshot)

The Screenshot is in German but if you add an new automation it should look the same...

automation

eg ... If the status X changes.. then send an message to iphone...

I have not tested this myself... I will try this later this week... but thats how i usually do automations...

@colgrim
Copy link

colgrim commented Jan 16, 2024

@tinerop the problem is not the message working itself, but the message content. What we try to achieve is, that the status like "Bereitschaft", "Zündphase" etc. is displayed within the message. What we get at the moment is "boiler has changed to status 2" but the result should look like "boiler has changed to Pelletsbetrieb"

@LavermanJJ
Copy link
Owner

LavermanJJ commented Jan 16, 2024

The reason being, that the state in the backend is a numerical value, and is translated by the frontend to the respective text. Therefore, the text is unfortunately unavailable in templates or messages, as they are handled by the backend and not the frontend. This is a general "issue" of home assistant.

You would need to provide a mapping yourself (doubling the translation mapping of the frontend). As done here: https://community.home-assistant.io/t/how-can-i-get-the-translation-of-a-sensor-state/620106/8

@lein1013
Copy link
Contributor

Just to confirm - the status should be translated to the text
and not like
grafik
I think I need to check if the integration was update correctly

@LavermanJJ
Copy link
Owner

LavermanJJ commented Jan 17, 2024

If the screenshot is from your Lovelace dashboard, and not showing a template sensor, yes there should be text.

@colgrim
Copy link

colgrim commented Jan 17, 2024

Ok, I think I've got something for you:

alias: Status Pelletkessel
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.solarfocus_biomass_boiler_status
    to: null
condition: []
action:
  - service: notify.mobile_app*
    data:
      title: Solarfocus Pelletkessel
      message: >-
        Status geändert zu  {% set kessel_message = {'0': 'Bereitschaft',
        '1': 'Zündphase',
        '2': 'Pelletsbetrieb',
        '3': 'Kesselsolltemperatur erreicht, Nachlauf',
        '4': 'Nachlauf',
        '5': 'keine Anforderung, Nachlauf',
        '6': 'Brenner ausgeschaltet',
        '7': 'Pelletsvorratsbehälter ist leer, Nachlauf',
        '8': 'Wärmetauscherreinigung ist aktiv',
        '9': 'Wärmetauscherreinigung benötigt, Nachlauf',
        '10': 'Stromausfall, Nachlauf',
        '11': 'zweiter Zündversuch, Nachlauf',
        '12': 'Füllraumtemperatur überschritten, Nachlauf',
        '13': 'Einschub überlastet, Nachlauf',
        '14': 'Fremdkessel aktiv, Nachlauf',
        '15': 'Fremdkessel aktiv, Bereitschaft',
        '16': 'Brenner ausgeschaltet, Nachlauf',
        '17': 'Sicherheitskette ist offen',
        '18': 'Sicherheitskette ist offen, Nachlauf',
        '19': 'Restsauerstoffgehalt zu hoch, Nachlauf',
        '20': 'Abgastemperatur zu gering, Nachlauf',
        '21': 'Abgastemperatur zu hoch, Bereitschaft',
        '22': 'Abgasfühler ist defekt, Bereitschaft',
        '23': 'Einschubtemperatur zu hoch, Bereitschaft',
        '24': 'Lambdasonde ist defekt, Nachlauf',
        '25': 'Kesseltemperatur ist ausreichend, Bereitschaft',
        '26': 'kein Stromfluss Einschubmotor, Nachlauf',
        '27': 'Kesselfühler ist defekt, Bereitschaft',
        '28': 'Kesselfühler ist defekt, Nachlauf',
        '29': 'Lambdasonde wird beheizt',
        '30': 'Wärmetauscherreinigung wartet auf eine Freigabe, Zeit',
        '31': 'Wärmetauscherreinigung wartet auf eine Freigabe, AGT',
        '32': 'Wärmetauscherreinigung wartet auf eine Freigabe, KT',
        '33': 'Saugaustragung wartet auf nächste Freigabezeit',
        '34': 'Pelletsvorratsbehälter wird befüllt',
        '35': 'Einschubfühlerkurzschluss, Bereitschaft',
        '36': 'Rückbrandschieber öffnet',
        '37': 'Kessel wird befüllt',
        '38': 'Lambdasonde wird kalibriert',
        '39': 'Kaminkehrer Messfreigabe',
        '40': 'Alarm aktiv!',
        '41': 'Kesseltür ist offen, Bereitschaft',
        '42': 'Tür war zu lange offen, Nachlauf',
        '44': 'keine Brennerzeitfreigabe, Nachlauf',
        '45': 'Luftzahl Zündphase zu tief, Nachlauf',
        '46': 'Ascheaustragung aktiv',
        '47': 'Kesseltür/Aschebox ist offen, Bereitschaft',
        '48': 'Kesseltür/Aschebox wurde geöffnet, Nachlauf',
        '49': 'Kessel aktiv',
        '50': 'Saugaustragung wartet auf Umschalteinheit',
        '51': 'Brenner ausgeschaltet, Mindestkessellaufzeit aktiv',
        '52': 'Kaminkehrermessung beendet, Nachlauf',
        '53': 'warten bis die Raumluftklappe offen ist',
        '54': 'Stromausfall, Bereitschaft',
        '55': 'Stromausfall, Nachlauf',
        '56': 'WT-Spülung Brennwertmodul aktiv',
        '57': 'Differenzdruckschalter hat ausgelöst, Nachlauf',
        '58': 'warten auf Freigabe von Differenzdruckschalter',
        '59': 'WT-Spülung Brennwertmodul wartet auf eine Freigabe'} %} 
        {% set kessel_state = states('sensor.solarfocus_biomass_boiler_status') %}  {% if kessel_state
        in kessel_message %} {{ kessel_message[kessel_state] }} {% else %} {{
        kessel_state }} {% endif %}
mode: single

@LavermanJJ
Copy link
Owner

Thanks for your effort! Do you want to make it part of the readme? Or do you want me to do it? Making it easier for others to find it.

@colgrim
Copy link

colgrim commented Jan 18, 2024

No problem, please feel free to make this part of the readme. Maybe you could generalize some specific parts which belong to my configuration ;-)

@LavermanJJ LavermanJJ added documentation Improvements or additions to documentation and removed question Further information is requested labels Feb 26, 2024
@LavermanJJ LavermanJJ pinned this issue Feb 26, 2024
@LavermanJJ
Copy link
Owner

I just read, that with 2024.03 this is fixed cf https://rc.home-assistant.io/blog/2024/02/28/release-20243/


# Translated
{{ state_translated("binary_sensor.movement_backyard") }}  # Shows: Detected
{{ state_translated("sun.sun") }}  # Shows: Below horizon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

5 participants