-
Notifications
You must be signed in to change notification settings - Fork 12
Description
When sending messages from Home Assistant automations through MeshCore-HA, some messages include stray characters (e.g., < or <01) at the end, even though the same automation/template code is used each time.
Note: This occurs on any automation I have written that sends messages to channels.
Example
Now 15°C⛅ H55% W12km/h | Tmr 17°C☀️ H45% W14km/h<�

Expected
Now 15°C⛅ H55% W12km/h | Tmr 17°C☀️ H45% W14km/h

Steps to reproduce:
- Create a Home Assistant automation that sends channel messages through MeshCore-HA. Example (weather bot):
alias: MeshCore - Bot - Weather
description: ""
triggers:
- event_type: meshcore_message
event_data:
message_type: channel
channel_idx: 0
trigger: event
conditions:
- condition: template
value_template: >-
{% set msg = trigger.event.data.message | default('', true) | lower %}
{{ '@[bender]' in msg and '!weather' in msg }}
actions:
- variables:
weather_entity: weather.home
- target:
entity_id: "{{ weather_entity }}"
data:
type: daily
response_variable: wx
action: weather.get_forecasts
- variables:
msg: >-
Now {{ state_attr(weather_entity,'temperature') }}°C | Tmr {{
(wx[weather_entity].forecast[1].temperature if (wx[weather_entity].forecast|length) > 1 else '—') }}°C
- data:
channel_idx: 0
message: "{{ msg }}"
action: meshcore.send_channel_message
mode: queued
max: 10
- Trigger the automation repeatedly.
- The output is sometimes correct, but other times includes an extra < or control character at the end.
Observed behavior:
The same automation produces both correct and malformed messages.
The stray characters appear randomly.
Expected behavior:
Messages should be delivered exactly as rendered by the Home Assistant template, without extra characters.
Environment:
Home Assistant version: 2025.7.2
MeshCore-HA version: 2.1.5
Platform: HAOS