HOWTO send/simulate a sensor 433Mhz

Ok. I´ll try to make sense of my question.

I have a RFXCOM 433Mhz reciever/transmitter and am using node red and a 433Mhz “keyfob” for my alarm system. I have identified the keyfob a a sensor and when i press the different buttons the sensor shows “ARMED”, “ARMED AWAY” and “DISARMED”

How i go about to SEND these codes from home assistant?
I.e. i want to ARM etc my alarm system from home assistant without using the keyfob?

Any explanations?

I’ve done something similar to send a signal to alarm bells in HA:
I’ve read the signal from a remote, deiscover came up with a couple of binary_sensors, I’ve simply copied their code and created switches with them and deleted the binary_sensors
I end up with this:

    09130006131408015e70:
      # name: Kerui Panic
      name: Kerui Alarm
      fire_event: true
    09130008131402016070:
      # name: Kerui Arm Home
      name: Kerui Disarm
      fire_event: true

Thank you for your input. I have however a problem.
I removed the sensor and added “true” on binary sensor
binary_sensor:
platform: rfxtrx
automatic_add: true

But the buttonpress does not generate a “autoadd”
2019-03-25 21:34:53 DEBUG (Thread-2) [homeassistant.components.rfxtrx] Receive RFXCOM event from (Device_id: a7a6c0_32 Class: RFXtrxDevice Sub: 0, Pkt_id: 08200000a7a6c00d79)

I the changed binary_sensor to false and added true on the switch
switch:
platform: rfxtrx
automatic_add: true

And again nothing is added automatically.
2019-03-25 21:31:23 DEBUG (Thread-2) [homeassistant.components.rfxtrx] Receive RFXCOM event from (Device_id: a7a6c0_32 Class: RFXtrxDevice Sub: 0, Pkt_id: 08200006a7a6c00d79)

How would i go about to add the button as a switch if it:s not autoadded?

don’t use discovery / auto add. Now that you have the device’s ID (something like 09130006131408015e70), use this to manually create a switch as per my example above

Again. Thank you for your patience!
I tried as you wrote and added
"08200006a7a6c00d79":
name: Alarm Disarm
fire_event: true

Under the

switch:
platform: rfxtrx
automatic_add: false

Section. I can now se a switch called:
[switch.alarm_disarm] friendly_name: Alarm Disarm
assumed_state: true

However, when i click on the on/off on the switch im presented with the errormessage:

Failed to call service switch/turn_on. ‘RFXtrxDevice’ object has no attribute ‘send_on’

And no signal is sent to the alarm-system.

Any further input?

Can you copy your full switch config and use the blue bar to format your code correctly?

I managed to figure this out! Mainly due to this post: https://community.home-assistant.io/t/kerui-d026-door-window-sensor-rfxtrxe/67469/16

I disabled the X10 protocol via rfxmgnr and now the button presses are identified as lightning4 and the switches are added!

ah yes you need to ensure you have the right protocols selected and no interferences with other.
Check the RFXcom manual, esp. Point 2.4