trigger automation in metadata
This commit is contained in:
1 parent
ab7f50d4aa
commit
f1b99cad1c
11 files changed
+36
-10
No files matched your search
@@ -14,6 +14,7 @@ export type AutomationManagerProps = {
|
||||
onAutomationStateChange: (eid: string, on: boolean) => void;
|
||||
refreshAutomations: () => void;
|
||||
forceDeleteAutomation: (eid: string) => void;
|
||||
triggerAutomation: (eid: string) => void;
|
||||
haEntities: HAEntitiesState;
|
||||
api: ApiService;
|
||||
};
|
||||
@@ -24,6 +25,7 @@ export const AutomationManager: FC<AutomationManagerProps> = ({
|
||||
onAutomationStateChange,
|
||||
refreshAutomations,
|
||||
forceDeleteAutomation,
|
||||
triggerAutomation,
|
||||
}) => {
|
||||
const snackbr = useSnackbar();
|
||||
const [isSaving, setIsSaving] = useState(false);
|
||||
@@ -79,6 +81,7 @@ export const AutomationManager: FC<AutomationManagerProps> = ({
|
||||
<AutomationManagerLoaded
|
||||
configAutomations={configAutomations.data}
|
||||
hassEntities={hassEntities}
|
||||
onAutomationRun={triggerAutomation}
|
||||
onAutomationStateChange={onAutomationStateChange}
|
||||
onAutomationAdd={async (auto) => {
|
||||
await api.updateAutomation({
|
||||
|
||||
Reference in new issue
Block a user