To represent a television in HomeKit, use the television type. You can define multiple input sources (e.g., HDMI1, HDMI2, Live TV) using the inputs array. If inputs is provided, you can use setActiveInput and getActiveInput topics to manage them. Remote control commands can be sent via the setRemoteKey topic, which can be triggered from the iOS Control Center.
Use integerValue: true if your MQTT device uses 1|0 instead of true|false for on/off states. You can also customize the onValue and offValue strings.
{
"accessory": "mqttthing",
"type": "television",
"name": "<name of TV>",
"url": "<url of MQTT server (optional)",
"username": "<username for MQTT (optional)",
"password": "<password for MQTT (optional)",
"caption": "<label (optional)",
"topics":
{
"setActive": "<topic to set the status>",
"getActive": "<topic to get the status>",
"setActiveInput": "<topic to set the active input source (optional)",
"getActiveInput": "<topic to get the active input source (optional)",
"setRemoteKey": "<topic for publishing remote key actions (optional)"
},
"inputs": [
{
"name": "<name for first input source>",
"value": "<MQTT value for first input source>"
},
{
"name": "<name for second input source>",
"value": "<MQTT value for second input source>"
}
],
"integerValue": "<true to use 1|0 instead of true|false default onValue and offValue>",
"onValue": "<value representing on (optional)",
"offValue": "<value representing off (optional)"
}