removed warnings
This commit is contained in:
parent
b0b281263e
commit
b9be38d467
2 changed files with 4 additions and 7 deletions
|
@ -1,9 +1,7 @@
|
|||
import React, { Component } from "react";
|
||||
import { Button, Header, Modal, Icon, Responsive } from "semantic-ui-react";
|
||||
import { connect } from "react-redux";
|
||||
import { RemoteService } from "../remote";
|
||||
import { appActions } from "../storeActions";
|
||||
//import { update } from "immutability-helper";
|
||||
|
||||
class AutomationModal extends Component {
|
||||
constructor(props) {
|
||||
|
|
|
@ -16,7 +16,6 @@ import {
|
|||
Divider,
|
||||
Checkbox,
|
||||
Menu,
|
||||
Label,
|
||||
} from "semantic-ui-react";
|
||||
|
||||
const operands = [
|
||||
|
@ -157,7 +156,7 @@ const SceneItem = (props) => {
|
|||
};
|
||||
|
||||
const Trigger = ({ deviceName, trigger, onRemove, index }) => {
|
||||
const { device, operand, value } = trigger;
|
||||
const { operand, value } = trigger;
|
||||
let symbol;
|
||||
if (operand) {
|
||||
symbol = operands.filter((opt) => opt.key === operand)[0].text;
|
||||
|
@ -273,7 +272,7 @@ export const CreateAutomation = (props) => {
|
|||
return trigger.device + trigger.value;
|
||||
};
|
||||
|
||||
const checkBeforeSave = () => {
|
||||
/*const checkBeforeSave = () => {
|
||||
if (automationName.length <= 0) {
|
||||
alert("Give a name to the automation");
|
||||
return false;
|
||||
|
@ -287,7 +286,7 @@ export const CreateAutomation = (props) => {
|
|||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
};*/
|
||||
|
||||
const saveAutomation = () => {
|
||||
//if(checkBeforeSave()){
|
||||
|
@ -408,7 +407,7 @@ const Automation = ({ automation, devices, scenes, removeAutomation }) => {
|
|||
const { triggers } = automation;
|
||||
const scenePriorities = automation.scenes;
|
||||
const getOperator = (operand) =>
|
||||
operands.filter((o) => o.key == operand)[0].text;
|
||||
operands.filter((o) => o.key === operand)[0].text;
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
|
|
Loading…
Reference in a new issue