MisterWil / abodepy

A thin Python wrapper for the Abode alarm API
MIT License
50 stars 17 forks source link

Set the type of glass break sensors to 'vibration' #18

Closed vickyg3 closed 7 years ago

vickyg3 commented 7 years ago

HA will display the vibration icon instead of connectivity for these sensors (similar to motion sensors).

This really helps when you have several sensors in the same room with just the room name (using the type to distinguish them).

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 86.92% when pulling 5b530c7a1cc151f2744f5a57aac4cf0a1c7aaaa3 on vickyg3:master into 76d702011880e471ed67e73e7100a0f5de011a19 on MisterWil:master.

MisterWil commented 7 years ago

I disagree with this if only because I don't think sensors that only have an online/offline status should show as a different type. It gives the impression that the sensor is reporting vibration/glass break status when it is in fact not giving that sort of data at all. I think a better approach would be to place the type of sensor into the name of the component in hass.

arsaboo commented 7 years ago

Indeed, there is a vibration device_class that can be used.

vickyg3 commented 7 years ago

It gives the impression that the sensor is reporting vibration/glass break status when it is in fact not giving that sort of data at all.

That is a good point, but the same "bug" exists with motion sensors and HASS then today. Because abodepy reports motion sensors with generic_type as 'motion' and on HASS it means that motion is being detected rather than just on.

Since abodepy is basically just reporting the connectivity status of the motion sensor as well, it should report them as a 'connectivity' device and not a 'motion' device. Thoughts?

MisterWil commented 7 years ago

Right. It seems that a lot of the devices in Abode don't actually even report their status and merely report "online" and "offline". I was hopeful that there were certain devices that would report their status correctly, but given the lack of actual data I couldn't confirm one way or the other. I still believe there are devices which report information to the front end such as temperature and whatnot, but, again, I don't own the devices so I'm not sure.

Once more devices have been reported I'm hopeful that I can narrow down which devices are useless (online/offline), and which can report useful data (temp, occupancy, etc).

vickyg3 commented 7 years ago

I think a better approach would be to place the type of sensor into the name of the component in hass.

I sent a PR to hass to do something similar: https://github.com/home-assistant/home-assistant/pull/9515

I guess we can abandon this PR now.