cancel
Showing results for 
Search instead for 
Did you mean: 

How to find currentSensorStateData field paths?

nathanperkins
Community Member

I'm trying to use the script editor to make an automation that is conditional on the light level reading from my Eve Motion sensor.

For device.state.SensorState, the state field must be a field path like "currentSensorStateData.SmokeLevel.rawValue", but there's no auto-completion and no listing of the possible values. I have no idea what to put here and it's not clear how to figure it out.

How can you see the possible sensor state fields for a given device?

 

nathanperkins_0-1688320203408.png

The examples look like:

 

starters:
- type: device.state.SensorState
 
device: My Device - Room Name
 
state: currentSensorStateData.SmokeLevel.currentSensorState
 
is: high

 

Ref: https://developers.home.google.com/automations/schema/reference/entity/sht_device/sensor_state_state

20 REPLIES 20

DWB1973
Community Member

I'm not a coder but I was scanning through the scripted automation examples at https://developers.home.google.com/automations/example-scripts and saw a possible (shot in the dark) solution.

currentSensorStateData.BrightnessLevel.currentSensorState

 If that doesn't work, then my next guess is that since Google Home is cloud-based, it may prevent the automation from functioning as you intend because (if I understand correctly) luminance level measurements may not be a cloud-to-cloud supported sensor trait, yet.

Reference: https://developers.home.google.com/cloud-to-cloud/traits/sensorstate

For a definitive answer, I recommend that you contact Google Home technical support.

domwhewell
Community Member

@nathanperkinsdid you find an answer? I too am looking to utilize my Light Sensors but seems they are just useless at the moment

sammers
Community Member

Following

domwhewell
Community Member

Specifically for Eve motion sensor V2 I opened a ticket with Eve Home support saying I am unable to access the light sensor for automations using the script editor and they replied saying this is a feature Google must implement?! I would have thaught it would be the other way round but ok then...

VictorAdriel
Community Member

I have the same problem. With the new script editor, I can finally use the motion data as a starter for my automation. However, even if I can see the device, I cannot use "currentSensorStateData" to read the light level readings. Any idea of when will that be possible?

FreemanAMG
Community Member

Same issue with the Eve Motion Sensor. I can maybe get away with a time condtion, but the brightness level would be ideal.
By the way, I tried BrightnessLevel.currentSensorState and is not supported

Adow
Community Member

lightLevel.currenSensorState seems working, but I couldn't find right state, I tried everything (dark, bright, direct sunlight...), no success... rawValue doesn't work, so no chance to use number of lux (Philips Hue outdoor sensor)

Chiggyeuh
Community Member

Also following, hoping to extract some more sensor state data from Hue motion sensors.

deezid
Community Member

Same here with the Eve motion sensor. No clue how to use the brightness data provided from the sensor for automations. Feels kinda useless right now.

Chiggyeuh
Community Member

I found some info on another thread, and this (for hue motion sensors) is working! I

’temperatureAmbient’ is what I was looking for. Now to find humidity and lux…

 

starters:
- type: device.state.TemperatureControl
state: temperatureAmbient
greaterThan: 25C
device: Garage Motion Sensor - Garage

Crayuk
Community Member

I'm interested in this as well.

 

No problem in setting up the motion sensor in a script and that is working well.

It would be good to use the light level too in a script. It's strange as I can see the light level in the Google Home app for the sensor, but I don't know what starter type I need to use in the script to use this data in an automation. 

nylonee
Community Member

I've been struggling with this as well, it looks like when you go to set up an automation (not via script) there's only Occupancy setting, so it does sound like either Eve is not correctly advertising the Lux setting, or Google is not correctly receiving it (but it shows up in the google app when you click on device settings, so I'm leaning towards it being a Google problem)

Hoping that a Google dev out there sees this and can take a look at why these devices are not working...

Crayuk
Community Member

Yes I agree. The fact it's in the Google Home App shows the Eve device is sending the data out. It would be good to know how to use this lux data in the script editor. 

 

Hopefully someone in the Google Home team will be able to help...?

HaroldBien
Community Member

I see officially at https://www.evehome.com/en-us/eve-motion at the bottom of the page light level is shown as not available for Google home. However, I do agree that I can see it on Google Home device data. I believe now the issue is that Eve has to implement a specific feature for us to use this in automation, and then I guess Google would have to approve it. Hopefully this won't end up being a chicken and egg problem. 

Crayuk
Community Member

It's a shame there's been no update on this as being able to use the lux data in the script editor would be really useful. 

deezid
Community Member

We can see the light level inside the Google Home app but still cannot use the sensor data for automations.

Chiggyeuh
Community Member

As we search for the solution - what is everybody planning to use the light level for? 

I'd like to auto-adjust my roller-shutters, based on the amount of light that comes from the windows

deezid
Community Member

I just gave up and added an aeotec hub with matter.

Automations using both light and motion are working flawlessly and everything runs locally and finally absolutely reliably.

 

Matter sensors on Google home have been a huge mess since the Fuchsia 16 update on my and my parents nest hubs.

Chofu
Community Member

Just submitting yet another request to use light level data from Eve Motion sensors in Google Home automations.

 

Has anyone figured out a way to do this without getting a new hub?