update webapp

This commit is contained in:
ari committed 2022-08-27 13:58:41 -04:00
1 parent f95dd75198
commit ce142f9d84
12 files changed
+29 -29

No files matched your search

+1 -1
View File
@@ -73,7 +73,7 @@ export const useMockAPI = (
...auto,
source_file: "automation.yaml",
source_file_type: "list",
configuration_key: "automation",
configuration_key: ["automation"],
},
];
return {
@@ -46,7 +46,7 @@ export const NoTags = make({
mode: "single",
source_file: "automation.yaml",
source_file_type: "list",
configuration_key: "automation",
configuration_key: ["automation"],
},
});
@@ -65,6 +65,6 @@ export const SomeTags = make({
mode: "single",
source_file: "automation.yaml",
source_file_type: "list",
configuration_key: "automation",
configuration_key: ["automation"],
},
});
@@ -55,7 +55,7 @@ Simple.args = {
mode: "single",
source_file: "automation.yaml",
source_file_type: "list",
configuration_key: "automation",
configuration_key: ["automation"],
trigger: [
{
platform: "numeric_state",
@@ -107,7 +107,7 @@ EmptyStart.args = {
description: "Example Metadata",
source_file: "automation.yaml",
source_file_type: "list",
configuration_key: "automation",
configuration_key: ["automation"],
trigger_variables: {
wowo: "!",
},
@@ -139,7 +139,7 @@ BadAutomationInvalidTriggers.args = {
description: "Example Metadata",
source_file: "automation.yaml",
source_file_type: "list",
configuration_key: "automation",
configuration_key: ["automation"],
trigger_variables: {
wowo: "!",
},
@@ -180,7 +180,7 @@ RepeatExample.args = {
mode: "single",
source_file: "automation.yaml",
source_file_type: "list",
configuration_key: "automation",
configuration_key: ["automation"],
trigger: [
{
type: "opened",
@@ -28,7 +28,7 @@ const { make, componentMeta } = makeStory({
state: "on",
source_file: "automation.yaml",
source_file_type: "list",
configuration_key: "automation",
configuration_key: ["automation"],
flags: {
isSelected: false,
isModified: false,
@@ -42,7 +42,7 @@ const { make, componentMeta } = makeStory({
state: "on",
source_file: "automation.yaml",
source_file_type: "list",
configuration_key: "automation",
configuration_key: ["automation"],
flags: {
isSelected: false,
isModified: false,
@@ -92,7 +92,7 @@ export const Nested = make({
state: "on",
source_file: "automation.yaml",
source_file_type: "list",
configuration_key: "automation",
configuration_key: ["automation"],
flags: {
isSelected: true,
isModified: false,
@@ -107,7 +107,7 @@ export const Nested = make({
state: "off",
source_file: "automation.yaml",
source_file_type: "list",
configuration_key: "automation",
configuration_key: ["automation"],
flags: {
isSelected: false,
isModified: false,
@@ -122,7 +122,7 @@ export const Nested = make({
state: "offing",
source_file: "automation.yaml",
source_file_type: "list",
configuration_key: "automation",
configuration_key: ["automation"],
flags: {
isSelected: false,
isModified: false,
@@ -163,7 +163,7 @@ export const Nested = make({
},
source_file: "automation.yaml",
source_file_type: "list",
configuration_key: "automation",
configuration_key: ["automation"],
state: "on",
tags: {
type: "good",
@@ -60,7 +60,7 @@ export const useAutomationDB = (
isNew: true,
source_file: "n/a",
source_file_type: "n/a",
configuration_key: "n/a",
configuration_key: ["n/a"],
},
auto,
]);
@@ -97,7 +97,7 @@ const genMapping = (
let found: AutomationData | null = null;
let source_file = "n/a";
let source_file_type = "n/a";
let configuration_key = "n/a";
let configuration_key = ["n/a"];
if (configData[autoId]) {
found = configData[entityData.attributes.id];
title = found.alias ?? title;
@@ -70,7 +70,7 @@ const story = makeStory({
state: "on",
source_file: "automation.yaml",
source_file_type: "list",
configuration_key: "automation",
configuration_key: ["automation"],
},
]);
setSelAutoId(id);
@@ -99,7 +99,7 @@ const makeAuto = (
tags: {},
source_file: "automation.yaml",
source_file_type: "list",
configuration_key: "automation",
configuration_key: ["automation"],
...data,
};
};
@@ -42,7 +42,7 @@ const automations: AutomationManagerAuto[] = [
isSelected: false,
source_file: "automation.yaml",
source_file_type: "list",
configuration_key: "automation",
configuration_key: ["automation"],
}));
const bigList = bigMockAutoList.map<AutomationManagerAuto>((a) => ({
@@ -55,7 +55,7 @@ const bigList = bigMockAutoList.map<AutomationManagerAuto>((a) => ({
isSelected: false,
source_file: "automation.yaml",
source_file_type: "list",
configuration_key: "automation",
configuration_key: ["automation"],
}));
test("no grouping", () => {
@@ -156,7 +156,7 @@ export const BadAutomation = make({
description: "",
source_file: "automation.yaml",
source_file_type: "list",
configuration_key: "automation",
configuration_key: ["automation"],
trigger: [
{
platform: "sun",
@@ -11,7 +11,7 @@ export type AutomationManagerAuto = AutomationManagerAutoUpdatable & {
isNew?: boolean;
source_file: string;
source_file_type: string;
configuration_key: string;
configuration_key: string[];
};
export type AutomationManagerAutoItem = AutomationManagerAuto & {
flags: AutomationManagerItemFlags;
+1 -1
View File
@@ -12,7 +12,7 @@ export const AutomationData = st.object({
source_file: st.optional(st.string()),
source_file_type: st.optional(st.string()),
configuration_key: st.optional(st.string()),
configuration_key: st.optional(st.array(st.string())),
trigger: st.array(st.object()),
condition: st.array(st.object()),
+1 -1
View File
@@ -13,5 +13,5 @@ export const AutomationMetadata = st.object({
export const AutomationShortumationMetadata = st.object({
source_file: st.string(),
source_file_type: st.string(),
configuration_key: st.string(),
configuration_key: st.array(st.string()),
});
+6 -6
View File
@@ -18,7 +18,7 @@ export const createMockAuto = ({
condition: [],
source_file: "automation.yaml",
source_file_type: "list",
configuration_key: "automation",
configuration_key: ["automation"],
trigger: [
{
platform: "numeric_state",
@@ -87,7 +87,7 @@ export const bigMockAutoList: AutomationData[] = [
mode: "single",
source_file: "automation.yaml",
source_file_type: "list",
configuration_key: "automation",
configuration_key: ["automation"],
trigger: [
{
device_id: "asdasdasdas",
@@ -239,7 +239,7 @@ export const bigMockAutoList: AutomationData[] = [
mode: "single",
source_file: "automation.yaml",
source_file_type: "list",
configuration_key: "automation",
configuration_key: ["automation"],
trigger: [
{
platform: "device",
@@ -282,7 +282,7 @@ export const bigMockAutoList: AutomationData[] = [
mode: "single",
source_file: "automation.yaml",
source_file_type: "list",
configuration_key: "automation",
configuration_key: ["automation"],
trigger: [
{
platform: "state",
@@ -417,7 +417,7 @@ export const bigMockAutoList: AutomationData[] = [
mode: "single",
source_file: "automation.yaml",
source_file_type: "list",
configuration_key: "automation",
configuration_key: ["automation"],
trigger: [
{
platform: "time",
@@ -480,7 +480,7 @@ export const bigMockAutoList: AutomationData[] = [
mode: "single",
source_file: "automation.yaml",
source_file_type: "list",
configuration_key: "automation",
configuration_key: ["automation"],
tags: {},
trigger: [
{