From 0c724817296ca86d2f773b33ca453bdce2939f30 Mon Sep 17 00:00:00 2001 From: Ari Date: Mon, 30 May 2022 15:10:33 -0400 Subject: [PATCH] clean up --- webapp/src/components/AutomationList/TagDB.ts | 1 - webapp/src/haService/connection.ts | 7 ------- 2 files changed, 8 deletions(-) diff --git a/webapp/src/components/AutomationList/TagDB.ts b/webapp/src/components/AutomationList/TagDB.ts index d816680..ed9fac3 100644 --- a/webapp/src/components/AutomationList/TagDB.ts +++ b/webapp/src/components/AutomationList/TagDB.ts @@ -3,7 +3,6 @@ import { AutomationData } from "types/automations"; export type TagDB = ReturnType; export const makeTagDB = (automations: AutomationData[]) => { const allTags: Record> = {}; - console.log(automations) automations.forEach(({ tags }) => Object.keys(tags).forEach(tagName => { const tagValue = tags[tagName]; diff --git a/webapp/src/haService/connection.ts b/webapp/src/haService/connection.ts index 5a2105c..d875fb0 100644 --- a/webapp/src/haService/connection.ts +++ b/webapp/src/haService/connection.ts @@ -47,14 +47,11 @@ const translateErrorCodes = (errorCode: number) => { } const createAuth = async () => { - console.log("detecting auth") let auth: Auth if (HASS_TOKEN) { - console.log("trying token") return createLongLivedTokenAuth(HASS_URL, HASS_TOKEN); } try { - console.log("trying to get from mem") auth = await getAuth(); return auth } catch (err) { @@ -63,7 +60,6 @@ const createAuth = async () => { } } try { - console.log("trying to get from url") auth = await getAuth({ hassUrl: HASS_URL }); return auth } catch (err) { @@ -93,15 +89,12 @@ startHAConnection().then(console.log).catch(console.error); export const useHAConnection = (): HAConnection => { const [conn, setConn] = useState(haConnection); const timeID = useRef(undefined); - console.log("connecting to HA") useEffect(() => { - console.log('connection state', conn.status) if (conn.status !== haConnection.status) { setConn(haConnection); } const waiter = () => { if (conn.status !== haConnection.status) { - console.log('setting status', conn.status, haConnection.status) setConn(haConnection); } timeID.current = window.setTimeout(() => {