Hi there,
I’m currently trying to create an automation system for my EV charging station. I have a SMA EV-Charger charging station and I get the status via the sensor sensor.smaev_3013950814_charging_session_status as device class enum in Home Assistant. Now I want to send some values automated in a Telegram chat when switching to the ‘not_connected’ state. When I run the automation manually (without the trigger), it works. But I can’t get it to work with the trigger. Even when I set the state to ‘not_connected’ manually, nothing happens. Does anyone have any ideas?
My automation:
- id: '1735682603342'
alias: Send Telegram Message When Charging Status Changes to Not Connected
description: Sends a message to Telegram when the charging session status changes
from active_mode to not_connected.
trigger:
- platform: state
entity_id: sensor.smaev_3013950814_charging_session_status
to: 'not_connected'
condition:
- condition: template
value_template: >
{{ states('sensor.smaev_3013950814_charging_session_status') == 'not_connected' }}
actions:
- action: notify.telegram_smarthome_bot
data:
message: 'EV hat am SMA EV Charger: {{ states(''sensor.smaev_3013950814_charging_session_energy'')}} Wh geladen. Drehschalter steht auf {{ states(''select.smaev_3013950814_operating_mode_of_charge_session'') }}'
data:
parse_mode: html
mode: single
Sensor sensor.smaev_3013950814_charging_session_status information:
options: not_connected, sleep_mode, active_mode, station_locked
device_class: enum
friendly_name: EV Charger Status Ladevorgang