diff --git a/smart-hut/src/components/dashboard/AutomationCreationModal.js b/smart-hut/src/components/dashboard/AutomationCreationModal.js index 1e2b302..1cad28d 100644 --- a/smart-hut/src/components/dashboard/AutomationCreationModal.js +++ b/smart-hut/src/components/dashboard/AutomationCreationModal.js @@ -85,7 +85,7 @@ const CreateTrigger = (props) => { const onChange = (e, val) => { props.inputChange(val); setActiveOperand(hasOperand.has(props.devices[val.value].kind)); - setActiveThermostat(props.devices[val.value].kind === 'thermostat'); + setActiveThermostat(props.devices[val.value].kind === 'thermostat' && props.condition); if (operandsRef.current) operandsRef.current.setValue(''); if (valuesRef.current) valuesRef.current.inputRef.current.valueAsNumber = undefined; }; @@ -773,6 +773,7 @@ class AutomationSaveModal extends Component { ); })}