more trigger options

This commit is contained in:
ari committed 2022-04-13 14:08:36 -04:00
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,
})}
/>
</>
}
}