I’m new to Home assistant and struggling with the syntax with automations. What I want to do is send a message, via Telegram, once every day, that lists the values of some of my Entities. It’s a Daily Report. I have managed to send a single message reporting the dns id value. It just sends the number. I have other Entities that I would like to send at the same time, like :sensor.max_current, sensor.min_current.
I would like to send all these values with a header that says "max_current = " etc.
Remember I am very much a beginner.
Thank you in advance.
Like this:
- action: notify.telegram_general
data:
title: '🔌 <b>Daily Energy Summary</b>'
message: >
Offpeak: {{ states('sensor.energy_from_grid_daily_offpeak')|float(0)|round(1) }} kWh
Peak: {{ states('sensor.energy_from_grid_daily_peak')|float(0)|round(1) }} kWh
Import: {{ states('sensor.import_energy')|float(0)|round(1) }} kWh
Solar Use: {{ states('sensor.self_solar_energy')|float(0)|round(1) }} kWh
Total: {{ states('sensor.self_total_energy')|float(0)|round(1) }} kWh
Solar Yield: {{ states('sensor.solar_production_energy')|float(0)|round(1) }} kWh
Feed-in: {{ states('sensor.export_energy')|float(0)|round(1) }} kWh
Earnings: ${{ states('sensor.solar_earnings_today') }} income.
Solar Forecast Error Today: {{ states('sensor.solar_forecast_error') }}%
Cost ${{ states('sensor.total_cost_today') }}
Total cost ${{ '%0.2f'|format( states('input_number.cumulative_energy_cost')|float(0) ) }}
Since: {{ states('input_datetime.last_reset') }}
Average Daily Cost: ${{ states('sensor.average_daily_cost') }}
Bill Estimate: ${{ states('sensor.next_bill_estimate') }}
The extra blank lines between each item put them on a new line.
Thanks for that. Just tried it and it works. An important feature is to put the blank line in to ensure a new line in the output.
Many thanks.