I just started out with a few xiaomi sensors including one of their vibration sensors. It seems a little different from other sensors I have encountered. I was wondering if somebody who has used it can fill me in on the best way to use it in automatons. Ive done alot of googling and found some stuff on this forum and github. I guess my first question is the binary sensor that is automatically added to the front end supposed to work. When I look on the states page there is a last_action attribute which changes to tilt,vibrate,or free-fall depending on what I do with it. I think the state returns the angle of deflection but for example when vibrate is shown the state is set to off. From what I’m reading there is no attribute shown for not_vibrate so there is no way to tell if vibration has stopped. Is this correct or is my info dated? It seems that it is difficult to use these attributes to determine if vibration has stopped. I was hoping that the binary sensor might be on with vibration and then off when no vibration but this does not seem to be the case.
If this is true how are people working around this. I assume some kind of rechecking must occur. Has anybody been able to come up with a template that can show on and off vibration? I’m not sure how often the actual sensor returns a new value either sometimes it seems to quickly react? Dropping the sensor from one hand to the other always seems to change the last_action to free fall but then trying to get it to switch to vibration seems like it takes awhile.
Any helpful info would be nice. Thanks