About this query
Triggers, queries, and actions are the building blocks of Applets. Triggers tell an Applet to start, queries ask a question, and actions are its end result.
Developer info
- Description
- This query returns a list of when a device in your house turns on or off.
- API endpoint slug
- sense_energy_monitor.history_of_device_turned_onoff
- Runtime method
- performQuery("sense_energy_monitor.history_of_device_turned_onoff")
Query fields
Device ID Dropdown list
- Label
- Which device?
- Slug
- device_id
- Required
- true
- Can have default value
- false
State Dropdown list
- Label
- Which state?
- Slug
- state
- Required
- true
- Can have default value
- true
Ingredients
Device nameThe name of the device.
- Slug
- device_name
- Filter code
- SenseEnergyMonitor.historyOfDeviceTurnedOnoff.DeviceName
- Type
- String
- Example
- Oven
StateThe new state of the device, either 'On' or 'Off'.
- Slug
- state
- Filter code
- SenseEnergyMonitor.historyOfDeviceTurnedOnoff.State
- Type
- String
- Example
- On
Changed atDate and time the device changed state.
- Slug
- changed_at
- Filter code
- SenseEnergyMonitor.historyOfDeviceTurnedOnoff.ChangedAt
- Type
- Date with time (ISO8601)
- Example
- 2020-07-08T04:17:06.000+05:00
Device IDThe unique ID of the device.
- Slug
- device_id
- Filter code
- SenseEnergyMonitor.historyOfDeviceTurnedOnoff.DeviceId
- Type
- String
- Example
- abc123