Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wink device offline status #861

Closed
w1ll1am23 opened this issue Jan 9, 2016 · 8 comments
Closed

Wink device offline status #861

w1ll1am23 opened this issue Jan 9, 2016 · 8 comments

Comments

@w1ll1am23
Copy link
Contributor

Opening an issue/ feature request to discuss the need to display Wink device status (on-line / off-line)

Currently in the Wink app for iOS and Android if a device, for example, a light bulb is physically turned off the bulb will be displayed as off-line.

In Home-Assistant if a bulb is off-line, but the last state of the bulb was on-line then that light will still report into HA as being on. It would be nice to know the status of the light to know if it can be turned back on.

This is to discuss how the Wink device status should be displayed in HA. My original idea was to change the device's name to device_name + Off-line if that device was off-line and leave it as device_name if it was on-line. @balloob stated this wouldn't be a good idea, so if anyone has any other suggestion...

@balloob
Copy link
Member

balloob commented Jan 12, 2016

I think that the notion of a device being online/reachable is something that should go into the Entity class so that all platforms can benefit from it. Probably just a property online that defaults to True. Anyone implementing a platform can decide to override it to enable proper detection. When an entity is offline the state will change to offline and no further state attributes will be populated. We should teach the frontend to grey out the offline components.

@w1ll1am23
Copy link
Contributor Author

In the latest version of python-wink 0.4.1 I made a change in the state method to check for the connection = true. If that isn't set, the state is returned as false. This solves the problem for wink switch, bulbs, and the power strip. I agree that it would be nice to have the component greyed out. Should we continue with the python-wink change? If so, once it is pushed to pypi I will include the 0.4.1 in my PR for the power strips.

@balloob
Copy link
Member

balloob commented Jan 13, 2016

Yeah, having Wink have support for showing things as off would be a good start. This change has to be applied to all Wink related platforms.

Let's not put it in your powerstrip PR but a new one. Let's get the powerstrip one merged first.

@w1ll1am23
Copy link
Contributor Author

Currently the changes in python-wink 0.4.1 require no changes in HA. The only changes are for binary switches, and the change is in the python-wink state method. My logic was if a binary switch states its connection is false it is most likely powered off so return a state of false.

@balloob
Copy link
Member

balloob commented Jan 13, 2016

👍 sounds good.

@w1ll1am23
Copy link
Contributor Author

@balloob I am working on adding in the available property to wink. What would you like to do about the front end? Just change the icon color or change the icon entirely? I noticed you mentioned adding a warning icon as well. Not sure I know how to do that, but I can look.

@balloob
Copy link
Member

balloob commented Mar 1, 2016

Right now when a device is not available it will have its state set to unavailable and no state attributes will be published. I haven't given much thought yet how to threat it in the frontend. We have a couple of choices:

  • the entity will render as a display entity and it will print the state unavailable on the right side
  • the entity renderer will adjust to an entity being disabled. For example a disabled toggle. (downside is that the user might not know why)
  • Add it to the state icon badge (exclamation mark or fade out?) / state icon label badge (exclamation mark as icon?)

@w1ll1am23
Copy link
Contributor Author

Closing this issue, #1570 completes the required PRs to display Wink devices as offline.

@home-assistant home-assistant locked and limited conversation to collaborators Mar 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants