i8beef / HomeAutio.Mqtt.GoogleHome

MIT License
215 stars 29 forks source link

DeviceType SENSOR missing? #80

Closed Piedro1 closed 4 years ago

Piedro1 commented 4 years ago

Hello i8beef,

I tried to add a device with google-type SENSOR, which resulted in an error from homeautio. Is it possible to add support for this device? I would like to use this device as a temperature/humidity/light sensor.

Kind regards, Piet

i8beef commented 4 years ago

https://github.com/i8beef/HomeAutio.Mqtt.GoogleHome/blob/master/src/HomeAutio.Mqtt.GoogleHome/Models/DeviceType.cs

If it isn't in there, I don't support it yet. Google added a bunch of new types a little while ago that I need to add in and I think that's one of them.

Piedro1 commented 4 years ago

Ok, I'll try a supported one 👍 . Thanks.

i8beef commented 4 years ago

In all honesty, I don't think Google is doing any validation of device type to supported Traits, nor am I enforcing (since they don't either). You could probably literally choose any device type, and just add the traits you need... as long as I support the traits you want which is a whole nother question.

i8beef commented 4 years ago

Note, in the latest release, SENSOR device type should be available. Also what I said above isn't quite true anymore, I am now enforcing the acceptable traits on devices as I've moved to generating this support from Google's docs instead of manually maintaining.