From 9c89a2ea999441bbf8e00ea489aa59fd86493d9c Mon Sep 17 00:00:00 2001 From: britea Date: Sun, 10 May 2020 23:28:20 +0200 Subject: [PATCH] fixed another duplication --- smart-hut/src/components/FilterDevices.js | 82 ------------------- .../dashboard/AutomationCreationModal.js | 2 +- 2 files changed, 1 insertion(+), 83 deletions(-) delete mode 100644 smart-hut/src/components/FilterDevices.js diff --git a/smart-hut/src/components/FilterDevices.js b/smart-hut/src/components/FilterDevices.js deleted file mode 100644 index bc241b1..0000000 --- a/smart-hut/src/components/FilterDevices.js +++ /dev/null @@ -1,82 +0,0 @@ -import { Dropdown } from "semantic-ui-react"; -import React, { Component } from "react"; - -export default class FilterDevices extends Component { - render() { - const tagOptions = [ - { - key: "regularLight", - text: "regularLight", - value: "regularLight", - label: { color: "red", empty: true, circular: true }, - }, - { - key: "dimmableLight", - text: "dimmableLight", - value: "dimmableLight", - label: { color: "blue", empty: true, circular: true }, - }, - { - key: "buttonDimmer", - text: "buttonDimmer", - value: "buttonDimmer", - label: { color: "black", empty: true, circular: true }, - }, - { - key: "knobDimmer", - text: "knobDimmer", - value: "knobDimmer", - label: { color: "purple", empty: true, circular: true }, - }, - { - key: "motionSensor", - text: "motionSensor", - value: "motionSensor", - label: { color: "orange", empty: true, circular: true }, - }, - { - key: "sensor", - text: "sensor", - value: "sensor", - label: { empty: true, circular: true }, - }, - { - key: "smartPlug", - text: "smartPlug", - value: "smartPlug", - label: { color: "pink", empty: true, circular: true }, - }, - { - key: "switch", - text: "switch", - value: "switch", - label: { color: "green", empty: true, circular: true }, - }, - ]; - - return ( - - - - - - {tagOptions.map((option) => ( - - ))} - - - - ); - } -} diff --git a/smart-hut/src/components/dashboard/AutomationCreationModal.js b/smart-hut/src/components/dashboard/AutomationCreationModal.js index e0ef5f6..84f3a76 100644 --- a/smart-hut/src/components/dashboard/AutomationCreationModal.js +++ b/smart-hut/src/components/dashboard/AutomationCreationModal.js @@ -431,7 +431,7 @@ class AutomationSaveModal extends Component { automation.id = this.props.id; automation.triggers = []; automation.scenes = []; - + automation.conditions = []; for (let i = 0; i < this.state.order.length; i++) { automation.scenes.push({ priority: i,