[Card] Sofabaton Virtual Remote for the X2, X1S and the X1


A highly customizable virtual remote for your lovelace dashboard.
It works with the Sofabaton X1, X1S, and X2 remotes.

:sparkles: Features

  • It’s your remote, in Home Assistant: Mirrors how you’ve set up your physical remote, including macros and favorites.
  • Works with all Sofabaton hubs: Compatible with the Sofabaton X1, X1S, and X2 hubs.
  • Theming friendly: The virtual remote plays nice with your dashboard’s theme, or override it for a different one.
  • Custom Layouts: Show only the button groups you need (D-pad, Volume, etc.), and change their order too.
  • Custom Favorites: For the virtual remote only: make your own favorites that send any command or call any Home Assistant action.
  • Responsive Design: The card scales to however much space it has. Tweak its behavior by setting a maximum width.
  • Configure via the UI: No need for YAML*. (*except for custom favorites)

:warning: Before installing

This card does not work standalone, it is a frontend component only. It is dependent on an integration that communicates with the hub, via Home Assistant’s backend. You will need to have that integration installed and working, before you can use this card.

  • If you have an X1 or X1S remote, install and configure the Sofabaton X1S integration via HACS or Github.
  • If you have an X2 remote, install and configure the Sofabaton Hub integration via HACS or Github.

:rocket: Installation

With the backend integration installed and working, click the blue button!

Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

To install manually, read code or docs, visit the repo:

Feel free to reach out with your questions and comments, and thank you for trying this lovelace card.

Stay well.

Sofabaton Virtual Remote is updated to version 0.0.7

  • Automation Assist, a feature intended for making your own buttons and automations a little bit easier.

    • For X1/X1S/X2 users: Record your keypresses and receive ready to paste YAML for your Dashboard and Automations. Each button press is delivered as a Notification to your Home Assistant’s side bar.
    • For X2 users: if you have configured a Home Assistant/MQTT device on your remote, Automation Assist detects when one of its “buttons” is pressed (either with the physical or virtual remotes or the app). It will then give you the option to create MQTT Discovery Triggers. Read about that here.

Sofabaton Virtual Remote has been updated to 0.0.8.

It includes some minor bugfixes but also enhancements to Automation Assist.

  • It now also delivers YAML for changing Activities and Powering Off.
  • Additional MQTT triggers can also optionally be created for Activity and Power state changes.
  • Resolved an issue where the Select would not re-populate after the remote entity returns to availability.

I am not sure where to put this code: “Edit dashboard”->“Raw Configuraton Editor”. And then, where in this yaml-file, or somewhere else?

Please advise.


type: button
name: blue
icon: mdi:remote
tap_action:
  action: perform-action
  perform_action: remote.send_command
  target:
    entity_id: remote.sofbbatoon_hub_remote
  data:
    command: 193
    device: 101
hold_action:
  action: none

Do I put it below this code in the yaml-file?

          - type: custom:sofabaton-virtual-remote
            entity: remote.sofbbatoon_hub_remote
            theme: ''
            show_activity: true
            show_dpad: true
            show_nav: true
            show_mid: true
            show_media: true
            show_colors: true
            show_abc: true
            show_macro_favorites: false
            show_macros_button: false
            show_favorites_button: false
            custom_favorites: []
            max_width: 310
            group_order:
              - activity
              - macro_favorites
              - dpad
              - nav
              - mid
              - media
              - abc
              - colors
            shrink: 0
            show_automation_assist: true

hello @Tomahawk. I should make that more clear from within the application. This is how you do it:

Click Add Card in your dashboard. In the Card selection menu, scroll all the way to the bottom and select Manual:

Then whatever YAML/text you see in the text box, replace it with what you copy from the notification, like this:

After pasting in the YAML from the Notification, you can then click that Show visual editor link. You can then customize further using the UI.

Hit Save and there is your button.

What I tried to accomplish is to press a button on the physical remote, the blue button, and then trigger an automation in HA.

I believe the issue #197 is what I am looking for.

Ok, I understand. What remote do you have, the X1, X1S or the X2? What you’re looking for is possible but works differently depending on which remote you have.

I have the X1.

On the X1, this is what you do:

Add this Integration to Home Assistant: Emulated Roku - Home Assistant
This will emulate a Roku device.

Your X1 supports Wifi Devices, specifically it supports Sonos, Hue and Roku devices. If you install Emulated Roku on your Home Assistant, and then in your Sofabaton app you Add device > Wifi device > Roku device, the app will find your Emulated Roku and will treat it as the real thing. It will add the device to your hub with 25 or so commands included (Play, Pause etc, the controls you would expect a real Roku device to have).

You can now map those buttons to whatever Activity and buttons on your physical remote. In Home Assistant you configure what happens when one of those buttons is pressed.

Followed your instructions. Roku integration installed. Did see HA in the SB iPad app. Mapped the HA devise - color buttons. Added HA to my activity. Enabled the SB integration again in HA.

SB config

Am I supposed to se the key press in the sensor.sofbbatoon_hub_recorded_keypress ?

What happens now is that every time you press one of those buttons you created with the Roku device, an Event is raised in Home Assistant. You can use that event as a trigger for an automation.
Go to: Settings > Automations & scenes > Create automation > Create new automation
Then click Add trigger > Manual event > Manual event
In the dialog that appears on the right, under Event type, enter roku_command.
Then it gets a little bit fuzzy for me as I do not have Emulated Roku installed myself, I do not remember the exact payload that the Event returns, so i can’t tell you exactly what to put in Event data.

What you can do to find out what goes there: go to Settings > Developer Tools > Events. Under Listen to events > Event to subscribe to, you enter roku_command. Click Start listening. Now every time you press one of those buttons on your remote, you will see the event pop up here. This same information will be available in your automation’s trigger, so you can use it to then check which button was pressed and run the appropriate action.

If you show me the exact payload you get in Developer Tools > Events, i can help you set up the automations.

Important that I clarify this to you:

Sofabaton hubs have support for what they call Wifi devices, where they provide direct support for Sonos, Hue and Roku devices. What makes these devices different from IR and Bluetooth controllable devices is that they are controlled by making HTTP requests to the device.

By making the Sofabaton hub think that our Home Assistant is a Roku device, it is now making these HTTP requests to our Home Assistant, for every button that you press. It’s the Roku integration that is actually receiving these incoming requests, and then passing them on as a Home Assistant Event.

A long way of saying that the Sofabaton integration is not the one receiving these button presses. This will continue to work even if you remove the integration. The integration can only send commands to the hub, and trigger on Activity changes. This may change in the future, but such is the status quo.

Finally, for anyone reading this: If you are on an X1S or X2, there are other ways of achieving the same result. On the X1S “IP Commands” are the recommended approach, on the X2 it’s MQTT.

Appreciate your patience and help.

I am getting this in HA, when i press the button color red and green in the iPad app.

event_type: roku_command
data:
  source_name: Home Assistant
  type: launch
  app_id: "1"
origin: LOCAL
time_fired: "2026-02-10T15:57:29.707364+00:00"
context:
  id: 01KH44B97BSDTWK6VE0EG99Q3E
  parent_id: null
  user_id: null

event_type: roku_command
data:
  source_name: Home Assistant
  type: launch
  app_id: "2"
origin: LOCAL
time_fired: "2026-02-10T15:57:52.684428+00:00"
context:
  id: 01KH44BZNCD2N0KB1KD5N66QHR
  parent_id: null
  user_id: null

When using the physical remote control, “Devices”-> “Home Assistant” and then pressing the buttons i am getting:

event_type: roku_command
data:
  source_name: Home Assistant
  type: launch
  app_id: "1"
origin: LOCAL
time_fired: "2026-02-10T16:09:41.503583+00:00"
context:
  id: 01KH451KVZSZAVHFD5SAQR86DC
  parent_id: null
  user_id: null


event_type: roku_command
data:
  source_name: Home Assistant
  type: launch
  app_id: "2"
origin: LOCAL
time_fired: "2026-02-10T16:09:52.387447+00:00"
context:
  id: 01KH451YG36MWHB7GQZK56TM44
  parent_id: null
  user_id: null

But it does nor work when using the physics remote control, “Activity”->“TV” and then the color buttons.

My experience with this remote, X1, is that its very clunky. Often not getting the correct mappings from the hub when synchronizing.

Appreciate you showing how to set up the trigger in an automation.

I can see that the difference between button presses is that app_id value. app_id 1, 2 etc.

To have an automation trigger on a specific app_id, do this:

  • Settings > Automations & Scenes > Create automation > Create new automation
  • Click Add trigger > Manual event > Manual event
  • In the dialog on the right, under Event type, enter roku_command.
  • Under Event data, enter: app_id: "1", or app_id: "2" or app_id: "3" etc

All the double quotes and spaces are important, copy it in exactly like i put it here.
With this you have created a trigger for your automation, it will fire every time you press the specific button (1, 2 etc) you linked it to.

To have it do a thing, click Add action > Light > Toggle > Add target > light.living_room
Click Save. Now every time you press the “1” button, the lights in the living room will toggle.

By the way, what you said about the hub executing commands properly but the remote is failing to perform them; I have noticed this too, especially when I’ve been doing multiple small changes to a device or activity. I’ve found that when this happens, and I hit the sync button on the remote itself, that it seems to rebuild the configuration of the remote, and that the remote will then function as expected.

1 Like