android icon indicating copy to clipboard operation
android copied to clipboard

Add Orientation Sensor support

Open MrFr33man123 opened this issue 4 years ago • 2 comments

Describe the solution you'd like An extra Sensor that is made avaliable. It should output an orientation like face down, face up, horizontal, and so on like a dice.

Describe alternatives you've considered, if any Alternative i think one could give the raw degree angles for each axis. XYZ But it would be a pain to use.

Additional context Example: You want to Automate something that is only Triggered if you wake up at night. if state was face up and charging and between 10pm and 5am(you where probably asleep) then turn on some light in nightlight mode.

Or in the Car if connected to specific Bluetooth device and upright orientation (phone holder) + leaving home zone => send notification to partner phone with text "I'am leaving"

MrFr33man123 avatar Apr 08 '22 16:04 MrFr33man123

So looking more into this request. I think we can get by with reporting the rotation angle of the device that can translate to portrait/landscape based on the 4 data points (0, 90, 180, 270). The other part of this request should be doable already. The proximity sensor should be able to tell the user if something is blocking the sensor or not so on a flat surface that can determine if its laying face down or not. Might be a bit of a stretch, if that is not good enough here then yes we will be needing to create a sensor with raw values from the accelerometer so the user can translate them for their own use case.

dshokouhi avatar Jun 30 '22 15:06 dshokouhi