Closed balthus closed 3 years ago
Its queryOnlyTemperatureSetting
, not queryOnlyTemperatureControl
. See: https://developers.google.com/assistant/smarthome/traits/temperaturesetting
Hello, Thanks for such quick answer. I fixed the tag to queryOnlyTemperatureSetting but it still doesn't start unless I specify a command. It's now working, but we have to specify a command tag. Here is the full json I'm using for reference. It's a sonoff relay with temperature and humidity. I dissociate the 2 (plug & sensor) for convenience.
"espperfumeRelay": {
"id": "espperfumeRelay",
"type": "action.devices.types.OUTLET",
"disabled": false,
"willReportState": false,
"roomHint": "Hall",
"name": {
"defaultNames": [
"Perfume"
],
"name": "Perfume",
"nicknames": []
},
"deviceInfo": null,
"traits": [
{
"trait": "action.devices.traits.OnOff",
"commands": {
"action.devices.commands.OnOff": {
"on": "esp-perfume/relay/0/set"
}
},
"state": {
"on": {
"topic": "esp-perfume/relay/0",
"googleType": "bool",
"valueMap": [
{
"mqtt": "1",
"type": "value",
"google": "true"
},
{
"mqtt": "0",
"type": "value",
"google": "false"
}
]
}
}
}
],
"customData": null
}
,
"espPerfumeSensor": {
"id": "espPerfumeSensor",
"type": "action.devices.types.SENSOR",
"disabled": false,
"willReportState": false,
"roomHint": "Hall",
"name": {
"defaultNames": [
"Hall", "Hall sensor"
],
"name": "Hall sensor",
"nicknames": []
},
"deviceInfo": null,
"traits": [
{
"trait": "action.devices.traits.TemperatureControl",
"attributes": {
"queryOnlyTemperatureSetting": true,
"temperatureUnitForUX": "C"
},
"commands": { "action.devices.commands.SetTemperature": { "temperature": "esp-perfume/temperature/set" } },
"state": {
"temperatureSetpointCelsius": {
"topic": "esp-perfume/temperature",
"googleType": "numeric"
},
"temperatureAmbientCelsius": {
"topic": "esp-perfume/temperature",
"googleType": "numeric"
}
}
}
,
{
"trait": "action.devices.traits.HumiditySetting",
"attributes": {
"queryOnlyHumiditySetting": true
},
"state": {
"humiditySetpointPercent": {
"topic": "esp-perfume/humidity",
"googleType": "numeric"
},
"humidityAmbientPercent": {
"topic": "esp-perfume/humidity",
"googleType": "numeric"
}
}
}
],
"customData": null
}
I think we can close this "non" issue, but seems weird that the setTemperature must still be specified...
Best regards and best wishes for 2021 ;)
Ah, you're using TemperatureControl. not TermperatureSetting. my bad. Your original queryOnlyTemperatureControl
is correct for that one, but the existing validation doesn't support that. I'm in the process of abandoning all that validation in favor of a simplified, generated validation layer based on the Google Home trait schemas (i.e., it can actually be actively maintained by a single human without going out of date every other week as Google changes things).
Im trying to get that into a releasable state now while I'm on vacation, but its enough of a rewrite I've been dragging my heels... I have to figure out how to best do a Docker pre-release so I and a few people can try it out...
For now you'll have to live with this, but watch for 2.0. It'll have a number of breaking changes, but pulls the trigger on some much needed changes.
Hello again,
I'm trying to integrate some temperature sensor and I found the #88 which provide a solution for tasmota. If we copy/paste the same code as in the ticket:
it doesn't start due to the following error:
I tried to look in the code, but i've limited knowledge on google home and c#. I thought that the given code would work out of the box and would need to adapt it to my settings, but maybe something as changed since then? I'm using latest docker version (2020-11-16T22:16:15.859900825Z)
Best regards