more trigger options
This commit is contained in:
1 parent
56baef2662
commit
964ff54dc1
9 files changed
+289
-3
No files matched your search
@@ -0,0 +1,28 @@
|
||||
import { OptionManager } from './OptionManager';
|
||||
import { AutomationTriggerTime } from 'types/automations/triggers';
|
||||
import InputTime from 'components/Inputs/InputTime';
|
||||
|
||||
|
||||
export const TriggerTime: OptionManager<AutomationTriggerTime> = {
|
||||
defaultState: () => ({
|
||||
$smType: 'trigger',
|
||||
"alias": "",
|
||||
"platform": 'time',
|
||||
"at": {},
|
||||
}),
|
||||
isReady: ({ alias }) => {
|
||||
return (alias !== '')
|
||||
},
|
||||
renderOptionList: (state, setState) => {
|
||||
return <>
|
||||
<InputTime
|
||||
label="At"
|
||||
value={state.at}
|
||||
onChange={_at => setState({
|
||||
...state,
|
||||
at: _at,
|
||||
})}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user