WebThingsIO / gateway

WebThings Gateway - a self-hosted web application for monitoring and controlling a building over the web
http://webthings.io/gateway
Mozilla Public License 2.0
2.62k stars 339 forks source link

Missing implementations for adding / removing actions? #3092

Open MarkusFaatz opened 1 year ago

MarkusFaatz commented 1 year ago

https://github.com/WebThingsIO/gateway/blob/d3c08ba376acf5effdb286fba71869ac62f10d05/src/models/thing.ts#L725

Just read across and found this peace a bit confusing as it does not do what it claims to. It just returns a boolean indicating if an action is included in the actions stored in a property of the thing.

Feel free to just close this issue when I am missing something

benfrancis commented 1 year ago

Thank you for flagging this, that is indeed strange and should be refactored out if it is called anywhere.

In the meantime see Actions.add() to actually add an action.