Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

Status Translation does not work properly #1157

Closed
thesebastianf opened this issue Mar 9, 2016 · 3 comments
Closed

Status Translation does not work properly #1157

thesebastianf opened this issue Mar 9, 2016 · 3 comments

Comments

@thesebastianf
Copy link

For my zwave items reporting ON OFF there should be a translation to eg. open / close by default
this does not work properly

please see esp. post 2 and 6 in the following. according to chris the dev of the zwave binding the issue is likely within ESH and not the binding
https://community.openhab.org/t/map-transform-for-zwave-items/8349

( https://github.com/openhab/openhab2-addons/blob/master/addons/binding/org.openhab.binding.zwave/ESH-INF/thing/_channels.xml#L206

@thesebastianf thesebastianf changed the title Status Translation do not work properly Status Translation does not work properly Mar 9, 2016
@triller-telekom
Copy link
Contributor

triller-telekom commented May 10, 2017

The status translation is working fine, but the problem here is that the zwave binding was/is reporting ON/Off instead of the expected Open/Closed. This is due to the fact that the zwave channel was/is reporting state updates for type Switch which is On/Off and not type Contact which is Open/Closed.

That discussion needs #583 so bindings get some information about what is linked to them and how so they can provide the status in a proper way.

Since this issue is about the translation, I think we can close it and continue in #583 with the other topic.

@kaikreuzer @SJKA Can you please close this issue?

@sjsf
Copy link
Contributor

sjsf commented May 10, 2017

Well, isn't the question actually whether OnOffType.getStateAs() should support translation to OpenClosedType (and vice versa) or not?

I can only speculate about the reasons, but I'd assume the unclear semantics (i.e. does OPEN mean ON or OFF? Depends on the context...) is the reason why this is not supported. @kaikreuzer right?

@kaikreuzer
Copy link
Contributor

Yes, the unclear semantics were the main reason to have a Contact item in the first place - there simply is no "correct" mapping, whatever is chosen might be misleading in some situations. Therefore, bindings should directly use the Contact type if they want to provide open/closed information.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
@sjsf @kaikreuzer @thesebastianf @triller-telekom and others