Fixed incoorect data type for humidity

This commit is contained in:
Ziver Koc 2023-08-20 23:40:31 +02:00
parent 4d473573db
commit cfcebca5a0
2 changed files with 3 additions and 3 deletions

View file

@ -18,7 +18,7 @@ You will need to create a service account Create Service account key which allow
* Click New Project and give your project a name.
* Click on the Smart Home card, then click the Start Building button.
* Click Build your Action, then click Add Action(s).
* Add your Home Assistant URL: https://{Hal External URL}:{External Port}/api/google_assistant in the Fulfillment URL box.
* Add your Home Assistant URL: https://{Hal External URL}:{External Port}/api/assistant/google/smarthome in the Fulfillment URL box.
* Click Save.
* Click on the Overview tab, which will lead you back to the app details screen.

View file

@ -58,8 +58,8 @@ public class HumiditySettingTrait extends DeviceTrait {
HashMap<String, Object> response = new HashMap<>();
if (data instanceof HumiditySensorData) {
//response.put("humiditySetpointPercent", data.getData());
response.put("humidityAmbientPercent", data.getData());
//response.put("humiditySetpointPercent", (int) data.getData());
response.put("humidityAmbientPercent", (int) data.getData());
}
return response;