Manual alarm control panel acting funny

Hi,

I set up the manual alarm control panel with MQTT. Then I setup telegram and notify with it. Made few command so that I can check with telegram what is the status of lights. But the problem comes with the alarm control panel. If it is deactivated telegram notify works fine. If alarm is activated (home or away) I get an error message below.

Any suggestions what to do?

ERROR (Thread-20) [homeassistant.components.telegram_bot] Error sending message: Can’t parse entities in message text: can’t find end of the entity starting at byte offset 81. Args: (435656865, ‘Home\nAll HUE lights are off. Some of the SWITCH lights are on. Alarm state: armed_home.’), kwargs: {‘reply_to_message_id’: None, ‘disable_web_page_preview’: None, ‘reply_markup’: None, ‘timeout’: None, ‘parse_mode’: ‘Markdown’, ‘disable_notification’: False}

My configuration.yaml:

alarm_control_panel:
  - platform: manual_mqtt
    name: "HA Alarm"
    state_topic: home/alarm
    command_topic: home/alarm/set

telegram_bot:
  - platform: polling
    api_key: !secret telegram_api_key
    allowed_chat_ids:
      - !secret telegram_chat_id_1

notify:
  - name: kirka
    platform: telegram
    chat_id: !secret telegram_chat_id_1

My automation.yaml:

- id: telegram_bot_home_status
  alias: telegram bot home status
  hide_entity: true
  initial_state: 'on'
  trigger:
  - platform: event
    event_type: telegram_command
    event_data:
      command: /home_status
  action:
  - service: notify.kirka
    data_template:
      title: Home
      message: >
        {% if is_state("group.all_lights", "on") %}Some of the HUE lights are on.{% else %}All HUE lights are off.{% endif %} {% if is_state("group.all_switches","on") %}Some of the SWITCH lights are on.{% else %}All SWITCH lights are off.{% endif %} Alarm state: {{ states("alarm_control_panel.ha_alarm") }}.

Example messages coming to telegram:

/home_status
kirka_bot, [17.10.17 20:18]
Home
All HUE lights are off. Some of the SWITCH lights are on. Alarm state: disarmed.

/home_status
kirka_bot, [17.10.17 20:18]
Home
All HUE lights are off. Some of the SWITCH lights are on. Alarm state: pending.