MQTT - Paradox Passive sensors as motion detection sensors

HI,

Just started out with Home Assistant, I only have a few sonoff light switches (using sonoff firmware) which are working.
Background:
I have a Paradox alarm system which is monitored by my armed response provider, they use an IoT device called Olarm which has a phone app to arm, disarm and get status of the PiR’s and door mags.
I have used the Alarm panel integration to be able to arm and disarm the alarm via MQTT and would like to use the data from the passives and door mags in home assistant in 2 ways.

  1. Use the PiR info for presence detection
  2. Be able to have a switch for each PiR / Door mag to set the status to bypass if required

I have the MQTT feed that is coming from my Armed response provider fed into node-red and relayed to mosquito in HA with all the info however I am getting very confused on how and where I should configure the sensors (and of which type).
The zone info is in the payload as an array and has 3 states

  • a active
  • b bypass
  • c closed
    (sample of the JSON below)

I have been reading though the documentation but they all seem to use simple on/off or temp sensors which when using an inject node I have managed to get working however this is evading me.

I would assume that I require 2 different configurations, one for the switch and another for the active and closed states.

Question:

  • Is this possible with the config topics from MQTT or do I need to set manual configuration in the YAML file?
  • Will it extract the individual entities from the array ?
  • How would i tell HA that a equals motion and c equals no motion do I need to split everything out in Node-red and use a change node?

Any help or documentation I may have missed will be appreciated.
The PiR’s and Door Mags are in the zones key of the JSON.

{
  "status": "OK",
  "type": "alarmPayload",
  "data": {
    "timestamp": 1606557843454,
    "cmdRecv": 0,
    "type": "",
    "areas": [
      "notready"
    ],
    "areasDetail": [
      "19"
    ],
    "areasStamp": [
      1606537007231
    ],
    "zones": [
      "c",
      "c",
      "c",
      "c",
      "c",
      "c",
      "c",
      "c",
      "c",
      "c",
      "c",
      "c",
      "c",
      "c",
      "c",
      "c",
      "c",
      "c",
      "c",
      "c",
      "c",
      "c",
      "c",
      "a",
      "c",
      "c",
      "c",
      "c",
      "c",
      "c",
      "c",
      "c"
    ],
    "zonesStamp": [
      1606484431302,
      1605078085129,
      1605078090086,
      1604916841552,
      1598707023235,
      1606555491678,
      1606555461635,
      1606557421105,
      1606492783631,
      1606557330960,
      1604512411860,
      1606557843464,
      1568803350769,
      1606557270971,
      0,
      1606555853873,
      1605904038840,
      1604916841553,
      1606483616610,
      1606484762991,
      1604475867416,
      1606463805740,
      1605902259758,
      1606552205195,
      1606484913669,
      1606553953610,
      1596956721580,
      1604916841554,
      0,
      1604475867417,
      0,
      1604475867418
    ],
    "pgm": [
      "c",
      "c",
      "c",
      "c"
    ],
    "pgmOb": [
      "c",
      "c"
    ],
    "ukeys": [],
    "power": {
      "AC": "1",
      "Batt": "1"
    }
  }
}