diff --git a/smart-hut/src/components/dashboard/devices/Device.js b/smart-hut/src/components/dashboard/devices/Device.js index fe025ab..1c2604c 100644 --- a/smart-hut/src/components/dashboard/devices/Device.js +++ b/smart-hut/src/components/dashboard/devices/Device.js @@ -32,6 +32,10 @@ class Device extends React.Component { .catch((err) => console.error(`Smart plug reset error`, err)); } + deleteState() { + this.props.deleteState(this.props.id, this.props.type); + } + renderDeviceComponent() { console.log(JSON.stringify(this.props.stateOrDevice)); switch ( @@ -171,6 +175,15 @@ class Device extends React.Component { ? this.props.stateOrDevice.name : ""} + )}