I have implemented a google actions backend that successfully communicates with Google Home/Assistant to open/close my garage door.
The SYNC replies with one device:
{
"requestId": "XXX",
"payload": {
"agentUserId": "XXX",
"devices": [
{
"id": "XXXX",
"type": "action.devices.types.GARAGE",
"traits": [
"action.devices.traits.OpenClose"
],
"name": {
"name": "Garage XXXX"
},
"willReportState": false,
"roomHint": "garage",
"attributes": {
"discreteOnlyOpenClose": true,
"commandOnlyOpenClose": false,
"openDirection": [
"UP",
"DOWN"
]
},
"deviceInfo": {
"manufacturer": "XXX"
}
}
]
}
}
When I open the app, I receive a QUERY:
{
"inputs": [
{
"intent": "action.devices.QUERY",
"payload": {
"devices": [
{
"id": "XXX"
}
]
}
}
],
"requestId": "XXX"
}
to which I reply:
{
"requestId": "XXX",
"payload": {
"agentUserId": "XXX",
"devices": {
"XXX": {
"online": true,
"status": "SUCCESS",
"openPercent": 0
}
}
}
}
I think I did right by answering that my device is a garage door, and I report that it's currently closed. However the app does not show a button to trigger an open/close action.
How can I have the app show a button like a light switch? Currently when I click on the device in the app, it just displays information (like the vendor, device name, etc) but no button and no actionable thing.
It does work though when I speak "open the garage", and the garage door opens successfully when I process the EXECUTE.