Skip to content

Send Message to HA

Action → Plugin → TaskerHA → HA Send Message Back

Fires an event from Tasker to Home Assistant, allowing your HA automations to react to things happening on your phone.

WebSocket required

This action sends the event over the active WebSocket connection. Make sure WebSocket is enabled in the TaskerHA app.

How to use

  1. In Tasker, open a task and tap +PluginTaskerHAHA Send Message Back.
  2. Set a Type — a label that HA automations can filter on.
  3. Optionally set a Message — additional data to pass along.
Send Message action config with Type and Message fields
Action config — set Type and Message

You can use Tasker variables in both fields.

If you configure a type/message filter in your HA automation, the values sent from Tasker must match exactly for the automation to fire. Both sides act as filters — leave a field empty on either end to match anything.

Receiving the message in Home Assistant

There are two ways to listen for this in Home Assistant, depending on whether you have the companion integration installed.

Use the TaskerHA Companion device trigger in an automation. This gives you a proper UI with optional type and message filter fields — no YAML required.

  1. Create a new automation in HA.
  2. Add a trigger → Device → select your TaskerHA Companion device.
  3. Trigger type: Message received from TaskerHA.
  4. Optionally fill in Type filter and/or Message filter to only fire for specific messages.

Without the companion integration

Listen for the taskerha_message_back event manually:

yaml
trigger:
  - trigger: event
    event_type: taskerha_message_back
    event_data:
      type: this_automation      # optional filter
      message: some_message      # optional filter

Leave event_data empty (or omit it) to fire on any taskerha_message_back event.

Example — Trigger a specific HA automation

In Tasker:

FieldValue
Typethis_automation
Messagesome_message

In Home Assistant — using the raw event approach:

yaml
trigger:
  - trigger: event
    event_type: taskerha_message_back
    event_data:
      type: this_automation
      message: some_message

Variables set after the action

VariableDescription
%ha_typeThe type value that was sent.
%ha_messageThe message value that was sent.
%rawJsonRaw JSON response from the event.
%errError code. 0 means success. See Error codes below.
%errmsgHuman-readable error message, often followed by a Java exception for details.

Error codes

CodeDescription
0No error.
1Cannot connect to Home Assistant. WebSocket may not be connected.
9999Unknown error. Check %errmsg for the Java exception.

Released under the MIT License.