@michbeck100 I’m having issues with Attributes can only be added in the constructor
. Do you know how to do this?
class RaspBeeSwitch extends env.devices.PowerSwitch
constructor: (config, lastState) ->
super(config.id, config.name)
@config = config
@deviceID = @config.deviceID
@_presence = lastState?.presence?.value or false
@_online = lastState?.online?.value or false
@_state = lastState?.state?.value or off
@addAttribute 'presence',
description: "online status",
type: t.boolean