From fbbbfd98cee8d2c9c89291ad61e6eecac890ed41 Mon Sep 17 00:00:00 2001 From: Ranlvor Date: Tue, 28 Aug 2018 21:39:04 +0200 Subject: [PATCH 01/12] Status Notaus -> Strom Fablab (#76) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Weil verwirrung „wenn der Not-AUS an ist, ist der Strom dann an oder aus?“ --- config/rzl/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/rzl/index.js b/config/rzl/index.js index c715c6f..853ede2 100644 --- a/config/rzl/index.js +++ b/config/rzl/index.js @@ -780,7 +780,7 @@ const config: Config = { ] }, nebenraum_power_status: { - name: "Notaus Fablab", + name: "Strom Fablab", position: [613, 537], icon: ({nebenraum_power_status}) => nebenraum_power_status == "on" ? rawMdi("flash") : rawMdi("flash-off"), @@ -790,7 +790,7 @@ const config: Config = { { type: "text", icon: mdi("power"), - text: "Status Notaus", + text: "Strom Fablab", topic: "nebenraum_power_status" } ] From 3e2b0967b774f2edf2d9a556ee6fc8845f1c642b Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Tue, 28 Aug 2018 21:44:08 +0200 Subject: [PATCH 02/12] =?UTF-8?q?Update=20style-loader=20to=20the=20latest?= =?UTF-8?q?=20version=20=F0=9F=9A=80=20(#73)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(package): update style-loader to version 0.23.0 * chore(package): update lockfile https://npm.im/greenkeeper-lockfile --- package.json | 2 +- yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index f3b1d12..347176b 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "flow-typed": "^2.3.0", "html-webpack-plugin": "^3.1.0", "husky": "^0.14.3", - "style-loader": "^0.22.0", + "style-loader": "^0.23.0", "webpack": "^4.3.0", "webpack-cli": "^3.0.0", "webpack-dev-server": "^3.1.1", diff --git a/yarn.lock b/yarn.lock index 1713fe0..3884d57 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5497,9 +5497,9 @@ strip-json-comments@^2.0.1, strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" -style-loader@^0.22.0: - version "0.22.0" - resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.22.0.tgz#2044d96156f454cc37b61f98eb49980239f4b8eb" +style-loader@^0.23.0: + version "0.23.0" + resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.23.0.tgz#8377fefab68416a2e05f1cabd8c3a3acfcce74f1" dependencies: loader-utils "^1.1.0" schema-utils "^0.4.5" From 63c3280c960b166940beb1ba679b22a16853ec07 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Tue, 28 Aug 2018 21:44:26 +0200 Subject: [PATCH 03/12] =?UTF-8?q?Update=20babel-eslint=20to=20the=20latest?= =?UTF-8?q?=20version=20=F0=9F=9A=80=20(#74)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(package): update babel-eslint to version 9.0.0 * chore(package): update lockfile https://npm.im/greenkeeper-lockfile --- package.json | 2 +- yarn.lock | 166 +++++++++++++++++++++++++-------------------------- 2 files changed, 83 insertions(+), 85 deletions(-) diff --git a/package.json b/package.json index 347176b..3770ab2 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "@babel/preset-env": "^7.0.0-rc.1", "@babel/preset-flow": "^7.0.0-rc.1", "@babel/preset-react": "^7.0.0-rc.1", - "babel-eslint": "^8.0.1", + "babel-eslint": "^9.0.0", "babel-loader": "^8.0.0-beta", "clean-webpack-plugin": "^0.1.18", "css-loader": "^1.0.0", diff --git a/yarn.lock b/yarn.lock index 3884d57..f2bf78a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -18,18 +18,18 @@ optionalDependencies: chokidar "^2.0.3" -"@babel/code-frame@7.0.0-beta.44": - version "7.0.0-beta.44" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.44.tgz#2a02643368de80916162be70865c97774f3adbd9" - dependencies: - "@babel/highlight" "7.0.0-beta.44" - "@babel/code-frame@7.0.0-rc.1": version "7.0.0-rc.1" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-rc.1.tgz#5c2154415d6c09959a71845ef519d11157e95d10" dependencies: "@babel/highlight" "7.0.0-rc.1" +"@babel/code-frame@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8" + dependencies: + "@babel/highlight" "^7.0.0" + "@babel/core@^7.0.0-rc.1": version "7.0.0-rc.1" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.0.0-rc.1.tgz#53c84fd562e13325f123d5951184eec97b958204" @@ -49,16 +49,6 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@7.0.0-beta.44": - version "7.0.0-beta.44" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.0.0-beta.44.tgz#c7e67b9b5284afcf69b309b50d7d37f3e5033d42" - dependencies: - "@babel/types" "7.0.0-beta.44" - jsesc "^2.5.1" - lodash "^4.2.0" - source-map "^0.5.0" - trim-right "^1.0.1" - "@babel/generator@7.0.0-rc.1": version "7.0.0-rc.1" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.0.0-rc.1.tgz#739c87d70b31aeed802bd6bc9fd51480065c45e8" @@ -69,6 +59,16 @@ source-map "^0.5.0" trim-right "^1.0.1" +"@babel/generator@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.0.0.tgz#1efd58bffa951dc846449e58ce3a1d7f02d393aa" + dependencies: + "@babel/types" "^7.0.0" + jsesc "^2.5.1" + lodash "^4.17.10" + source-map "^0.5.0" + trim-right "^1.0.1" + "@babel/helper-annotate-as-pure@7.0.0-rc.1": version "7.0.0-rc.1" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0-rc.1.tgz#4a9042a4a35f835d45c649f68f364cc7ed7dcb05" @@ -112,14 +112,6 @@ "@babel/traverse" "7.0.0-rc.1" "@babel/types" "7.0.0-rc.1" -"@babel/helper-function-name@7.0.0-beta.44": - version "7.0.0-beta.44" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.44.tgz#e18552aaae2231100a6e485e03854bc3532d44dd" - dependencies: - "@babel/helper-get-function-arity" "7.0.0-beta.44" - "@babel/template" "7.0.0-beta.44" - "@babel/types" "7.0.0-beta.44" - "@babel/helper-function-name@7.0.0-rc.1": version "7.0.0-rc.1" resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.0.0-rc.1.tgz#20b2cc836a53c669f297c8d309fc553385c5cdde" @@ -128,11 +120,13 @@ "@babel/template" "7.0.0-rc.1" "@babel/types" "7.0.0-rc.1" -"@babel/helper-get-function-arity@7.0.0-beta.44": - version "7.0.0-beta.44" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.44.tgz#d03ca6dd2b9f7b0b1e6b32c56c72836140db3a15" +"@babel/helper-function-name@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.0.0.tgz#a68cc8d04420ccc663dd258f9cc41b8261efa2d4" dependencies: - "@babel/types" "7.0.0-beta.44" + "@babel/helper-get-function-arity" "^7.0.0" + "@babel/template" "^7.0.0" + "@babel/types" "^7.0.0" "@babel/helper-get-function-arity@7.0.0-rc.1": version "7.0.0-rc.1" @@ -140,6 +134,12 @@ dependencies: "@babel/types" "7.0.0-rc.1" +"@babel/helper-get-function-arity@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz#83572d4320e2a4657263734113c42868b64e49c3" + dependencies: + "@babel/types" "^7.0.0" + "@babel/helper-hoist-variables@7.0.0-rc.1": version "7.0.0-rc.1" resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.0.0-rc.1.tgz#6d0ff35d599fc7dd9dadaac444e99b7976238aec" @@ -213,18 +213,18 @@ "@babel/types" "7.0.0-rc.1" lodash "^4.17.10" -"@babel/helper-split-export-declaration@7.0.0-beta.44": - version "7.0.0-beta.44" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-beta.44.tgz#c0b351735e0fbcb3822c8ad8db4e583b05ebd9dc" - dependencies: - "@babel/types" "7.0.0-beta.44" - "@babel/helper-split-export-declaration@7.0.0-rc.1": version "7.0.0-rc.1" resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-rc.1.tgz#b00323834343fd0210f1f46c7a53521ad53efa5e" dependencies: "@babel/types" "7.0.0-rc.1" +"@babel/helper-split-export-declaration@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0.tgz#3aae285c0311c2ab095d997b8c9a94cad547d813" + dependencies: + "@babel/types" "^7.0.0" + "@babel/helper-wrap-function@7.0.0-rc.1": version "7.0.0-rc.1" resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.0.0-rc.1.tgz#168454fe350e9ead8d91cdc581597ea506e951ff" @@ -242,14 +242,6 @@ "@babel/traverse" "7.0.0-rc.1" "@babel/types" "7.0.0-rc.1" -"@babel/highlight@7.0.0-beta.44": - version "7.0.0-beta.44" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-beta.44.tgz#18c94ce543916a80553edcdcf681890b200747d5" - dependencies: - chalk "^2.0.0" - esutils "^2.0.2" - js-tokens "^3.0.0" - "@babel/highlight@7.0.0-rc.1": version "7.0.0-rc.1" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-rc.1.tgz#e0ca4731fa4786f7b9500421d6ff5e5a7753e81e" @@ -258,10 +250,22 @@ esutils "^2.0.2" js-tokens "^3.0.0" +"@babel/highlight@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0.tgz#f710c38c8d458e6dd9a201afb637fcb781ce99e4" + dependencies: + chalk "^2.0.0" + esutils "^2.0.2" + js-tokens "^4.0.0" + "@babel/parser@7.0.0-rc.1": version "7.0.0-rc.1" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.0.0-rc.1.tgz#d009a9bba8175d7b971e30cd03535b278c44082d" +"@babel/parser@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.0.0.tgz#697655183394facffb063437ddf52c0277698775" + "@babel/plugin-proposal-async-generator-functions@7.0.0-rc.1": version "7.0.0-rc.1" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.0.0-rc.1.tgz#70d4ca787485487370a82e380c39c8c233bca639" @@ -638,15 +642,6 @@ core-js "^2.5.7" regenerator-runtime "^0.12.0" -"@babel/template@7.0.0-beta.44": - version "7.0.0-beta.44" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-beta.44.tgz#f8832f4fdcee5d59bf515e595fc5106c529b394f" - dependencies: - "@babel/code-frame" "7.0.0-beta.44" - "@babel/types" "7.0.0-beta.44" - babylon "7.0.0-beta.44" - lodash "^4.2.0" - "@babel/template@7.0.0-rc.1": version "7.0.0-rc.1" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-rc.1.tgz#5f9c0a481c9f22ecdb84697b3c3a34eadeeca23c" @@ -656,20 +651,13 @@ "@babel/types" "7.0.0-rc.1" lodash "^4.17.10" -"@babel/traverse@7.0.0-beta.44": - version "7.0.0-beta.44" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0-beta.44.tgz#a970a2c45477ad18017e2e465a0606feee0d2966" +"@babel/template@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0.tgz#c2bc9870405959c89a9c814376a2ecb247838c80" dependencies: - "@babel/code-frame" "7.0.0-beta.44" - "@babel/generator" "7.0.0-beta.44" - "@babel/helper-function-name" "7.0.0-beta.44" - "@babel/helper-split-export-declaration" "7.0.0-beta.44" - "@babel/types" "7.0.0-beta.44" - babylon "7.0.0-beta.44" - debug "^3.1.0" - globals "^11.1.0" - invariant "^2.2.0" - lodash "^4.2.0" + "@babel/code-frame" "^7.0.0" + "@babel/parser" "^7.0.0" + "@babel/types" "^7.0.0" "@babel/traverse@7.0.0-rc.1": version "7.0.0-rc.1" @@ -685,13 +673,19 @@ globals "^11.1.0" lodash "^4.17.10" -"@babel/types@7.0.0-beta.44": - version "7.0.0-beta.44" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0-beta.44.tgz#6b1b164591f77dec0a0342aca995f2d046b3a757" +"@babel/traverse@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0.tgz#b1fe9b6567fdf3ab542cfad6f3b31f854d799a61" dependencies: - esutils "^2.0.2" - lodash "^4.2.0" - to-fast-properties "^2.0.0" + "@babel/code-frame" "^7.0.0" + "@babel/generator" "^7.0.0" + "@babel/helper-function-name" "^7.0.0" + "@babel/helper-split-export-declaration" "^7.0.0" + "@babel/parser" "^7.0.0" + "@babel/types" "^7.0.0" + debug "^3.1.0" + globals "^11.1.0" + lodash "^4.17.10" "@babel/types@7.0.0-rc.1": version "7.0.0-rc.1" @@ -701,6 +695,14 @@ lodash "^4.17.10" to-fast-properties "^2.0.0" +"@babel/types@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0.tgz#6e191793d3c854d19c6749989e3bc55f0e962118" + dependencies: + esutils "^2.0.2" + lodash "^4.17.10" + to-fast-properties "^2.0.0" + "@material-ui/core@^1.2.1": version "1.4.0" resolved "https://registry.yarnpkg.com/@material-ui/core/-/core-1.4.0.tgz#e535fef84576b096c46e1fb7d6c4c61895155fd3" @@ -1101,14 +1103,14 @@ babel-code-frame@^6.26.0: esutils "^2.0.2" js-tokens "^3.0.2" -babel-eslint@^8.0.1: - version "8.2.6" - resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-8.2.6.tgz#6270d0c73205628067c0f7ae1693a9e797acefd9" +babel-eslint@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-9.0.0.tgz#7d9445f81ed9f60aff38115f838970df9f2b6220" dependencies: - "@babel/code-frame" "7.0.0-beta.44" - "@babel/traverse" "7.0.0-beta.44" - "@babel/types" "7.0.0-beta.44" - babylon "7.0.0-beta.44" + "@babel/code-frame" "^7.0.0" + "@babel/parser" "^7.0.0" + "@babel/traverse" "^7.0.0" + "@babel/types" "^7.0.0" eslint-scope "3.7.1" eslint-visitor-keys "^1.0.0" @@ -1136,10 +1138,6 @@ babel-runtime@^6.26.0: core-js "^2.4.0" regenerator-runtime "^0.11.0" -babylon@7.0.0-beta.44: - version "7.0.0-beta.44" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.44.tgz#89159e15e6e30c5096e22d738d8c0af8a0e8ca1d" - balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" @@ -3181,7 +3179,7 @@ interpret@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614" -invariant@^2.2.0, invariant@^2.2.2: +invariant@^2.2.2: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" dependencies: @@ -3464,7 +3462,7 @@ js-tokens@^3.0.0, js-tokens@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" -"js-tokens@^3.0.0 || ^4.0.0": +"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -3707,7 +3705,7 @@ lodash.debounce@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" -lodash@^4.0.0, lodash@^4.17.10, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0: +lodash@^4.0.0, lodash@^4.17.10, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1, lodash@^4.3.0: version "4.17.10" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" From 2d43f238f7bb44249827e966d58c3ee7f8a09eb3 Mon Sep 17 00:00:00 2001 From: uwap Date: Thu, 30 Aug 2018 12:19:49 +0200 Subject: [PATCH 04/12] Update dependencies --- package.json | 4 +-- yarn.lock | 91 ++++++++++++++++++---------------------------------- 2 files changed, 34 insertions(+), 61 deletions(-) diff --git a/package.json b/package.json index 3770ab2..cee7ba8 100644 --- a/package.json +++ b/package.json @@ -12,8 +12,8 @@ "precommit": "yarn lint" }, "dependencies": { - "@material-ui/core": "^1.2.1", - "@material-ui/lab": "^1.0.0-alpha.5", + "@material-ui/core": "^3.0.1", + "@material-ui/lab": "^1.0.0-alpha.12", "@mdi/font": "^2.0.46", "leaflet": "^1.3.1", "lodash-es": "^4.17.4", diff --git a/yarn.lock b/yarn.lock index f2bf78a..6d1ad0f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -635,11 +635,16 @@ "@babel/plugin-transform-react-jsx-self" "7.0.0-rc.1" "@babel/plugin-transform-react-jsx-source" "7.0.0-rc.1" -"@babel/runtime@^7.0.0-beta.42": - version "7.0.0-beta.54" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.0.0-beta.54.tgz#39ebb42723fe7ca4b3e1b00e967e80138d47cadf" +"@babel/runtime@7.0.0", "@babel/runtime@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.0.0.tgz#adeb78fedfc855aa05bc041640f3f6f98e85424c" + dependencies: + regenerator-runtime "^0.12.0" + +"@babel/runtime@7.0.0-rc.1": + version "7.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.0.0-rc.1.tgz#42f36fc5817911c89ea75da2b874054922967616" dependencies: - core-js "^2.5.7" regenerator-runtime "^0.12.0" "@babel/template@7.0.0-rc.1": @@ -703,11 +708,11 @@ lodash "^4.17.10" to-fast-properties "^2.0.0" -"@material-ui/core@^1.2.1": - version "1.4.0" - resolved "https://registry.yarnpkg.com/@material-ui/core/-/core-1.4.0.tgz#e535fef84576b096c46e1fb7d6c4c61895155fd3" +"@material-ui/core@^3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@material-ui/core/-/core-3.0.1.tgz#e8476394a42d89ae404355ddbc093db4d044b225" dependencies: - "@babel/runtime" "^7.0.0-beta.42" + "@babel/runtime" "7.0.0" "@types/jss" "^9.5.3" "@types/react-transition-group" "^2.0.8" brcast "^3.0.1" @@ -727,18 +732,19 @@ jss-vendor-prefixer "^7.0.0" keycode "^2.1.9" normalize-scroll-left "^0.1.2" - popper.js "^1.0.0" + popper.js "^1.14.1" prop-types "^15.6.0" - react-event-listener "^0.6.0" + react-event-listener "^0.6.2" react-jss "^8.1.0" react-transition-group "^2.2.1" - recompose "^0.27.0" - scroll "^2.0.3" + recompose "^0.29.0" warning "^4.0.1" -"@material-ui/lab@^1.0.0-alpha.5": - version "1.0.0-alpha.6" - resolved "https://registry.yarnpkg.com/@material-ui/lab/-/lab-1.0.0-alpha.6.tgz#ee5c03a8577a9cbc4e41b2bfbdfc15b561822749" +"@material-ui/lab@^1.0.0-alpha.12": + version "1.0.0-alpha.12" + resolved "https://registry.yarnpkg.com/@material-ui/lab/-/lab-1.0.0-alpha.12.tgz#6d0a3a5895aa56ee649844d57927a5b1b3c0afc2" + dependencies: + "@babel/runtime" "7.0.0-rc.1" "@mdi/font@^2.0.46": version "2.5.94" @@ -2046,10 +2052,6 @@ dom-serializer@0: domelementtype "~1.1.1" entities "~1.1.1" -dom-walk@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.1.tgz#672226dc74c8f799ad35307df936aba11acd6018" - domain-browser@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" @@ -2767,13 +2769,6 @@ global-modules-path@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/global-modules-path/-/global-modules-path-2.1.0.tgz#923ec524e8726bb0c1a4ed4b8e21e1ff80c88bbb" -global@~4.3.0: - version "4.3.2" - resolved "https://registry.yarnpkg.com/global/-/global-4.3.2.tgz#e76989268a6c74c38908b1305b10fc0e394e9d0f" - dependencies: - min-document "^2.19.0" - process "~0.5.1" - globals@^11.1.0, globals@^11.7.0: version "11.7.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.7.0.tgz#a583faa43055b1aca771914bf68258e2fc125673" @@ -3892,12 +3887,6 @@ mimic-response@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" -min-document@^2.19.0: - version "2.19.0" - resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" - dependencies: - dom-walk "^0.1.0" - minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" @@ -4496,9 +4485,9 @@ pluralize@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777" -popper.js@^1.0.0: - version "1.14.3" - resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.14.3.tgz#1438f98d046acf7b4d78cd502bf418ac64d4f095" +popper.js@^1.14.1: + version "1.14.4" + resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.14.4.tgz#8eec1d8ff02a5a3a152dd43414a15c7b79fd69b6" portfinder@^1.0.9: version "1.0.13" @@ -4582,10 +4571,6 @@ process@^0.11.10: version "0.11.10" resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" -process@~0.5.1: - version "0.5.2" - resolved "https://registry.yarnpkg.com/process/-/process-0.5.2.tgz#1638d8a8e34c2f440a91db95ab9aeb677fc185cf" - progress@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f" @@ -4682,12 +4667,6 @@ querystringify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.0.0.tgz#fa3ed6e68eb15159457c89b37bc6472833195755" -rafl@~1.2.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/rafl/-/rafl-1.2.2.tgz#fe930f758211020d47e38815f5196a8be4150740" - dependencies: - global "~4.3.0" - randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5: version "2.0.6" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.6.tgz#d302c522948588848a8d300c932b44c24231da80" @@ -4732,11 +4711,11 @@ react-dom@^16.0.0: object-assign "^4.1.1" prop-types "^15.6.0" -react-event-listener@^0.6.0: - version "0.6.1" - resolved "https://registry.yarnpkg.com/react-event-listener/-/react-event-listener-0.6.1.tgz#41c7a80a66b398c27dd511e22712b02f3d4eccca" +react-event-listener@^0.6.2: + version "0.6.3" + resolved "https://registry.yarnpkg.com/react-event-listener/-/react-event-listener-0.6.3.tgz#8eab88129a76e095ed8aa684c29679eded1e843d" dependencies: - "@babel/runtime" "^7.0.0-beta.42" + "@babel/runtime" "7.0.0-rc.1" prop-types "^15.6.0" warning "^4.0.1" @@ -4844,11 +4823,11 @@ readdirp@^2.0.0: readable-stream "^2.0.2" set-immediate-shim "^1.0.1" -recompose@^0.27.0: - version "0.27.1" - resolved "https://registry.yarnpkg.com/recompose/-/recompose-0.27.1.tgz#1a49e931f183634516633bbb4f4edbfd3f38a7ba" +recompose@^0.29.0: + version "0.29.0" + resolved "https://registry.yarnpkg.com/recompose/-/recompose-0.29.0.tgz#f1a4e20d5f24d6ef1440f83924e821de0b1bccef" dependencies: - babel-runtime "^6.26.0" + "@babel/runtime" "^7.0.0" change-emitter "^0.1.2" fbjs "^0.8.1" hoist-non-react-statics "^2.3.1" @@ -5111,12 +5090,6 @@ schema-utils@^0.4.4, schema-utils@^0.4.5: ajv "^6.1.0" ajv-keywords "^3.1.0" -scroll@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/scroll/-/scroll-2.0.3.tgz#0951b785544205fd17753bc3d294738ba16fc2ab" - dependencies: - rafl "~1.2.1" - select-hose@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" From 82f2d0ff50fb534547312358956a3caf88d268ce Mon Sep 17 00:00:00 2001 From: uwap Date: Thu, 30 Aug 2018 13:27:36 +0200 Subject: [PATCH 05/12] Lint config/ --- .eslintrc.js | 3 + config/entropia/index.js | 6 +- config/rzl/index.js | 131 ++++++++++++---------- config/rzl/onkyo.js | 166 ++++++++++++++-------------- config/rzl/utils.js | 231 +++++++++++++++++++++------------------ package.json | 2 +- 6 files changed, 286 insertions(+), 253 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index e03c58d..1fc0053 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -19,6 +19,9 @@ module.exports = { "plugins": [ "react", "flowtype" ], + "globals": { + "require": false + }, "rules": { // possible errors "getter-return": "error", diff --git a/config/entropia/index.js b/config/entropia/index.js index 5f65001..879cbdc 100644 --- a/config/entropia/index.js +++ b/config/entropia/index.js @@ -1,10 +1,10 @@ // @flow import type { Config } from "config/flowtypes"; -import { hex, rgb, rgba, rainbow } from "config/colors"; +import { hex } from "config/colors"; import * as types from "config/types"; import { mdi } from "config/icon"; -const config : Config = { +const config: Config = { space: { name: "Entropia", color: "orange", @@ -18,7 +18,7 @@ const config : Config = { type: types.option({ "A1 ON": "on", "A1 OFF": "off" }) }, defaultValue: "off" - }, + }, hauptraum_table_light_on_hack: { command: { name: "/public/sensoren/TPH/leinwand/control", diff --git a/config/rzl/index.js b/config/rzl/index.js index 853ede2..a09eb8b 100644 --- a/config/rzl/index.js +++ b/config/rzl/index.js @@ -1,9 +1,9 @@ // @flow import type { Config } from "config/flowtypes"; import * as types from "config/types"; -import { hex, rgb, rgba, rainbow } from "config/colors"; +import { hex, rainbow } from "config/colors"; import { mdi, rawMdi, mdiBattery } from "config/icon"; -import { esper_topics, esper_statistics, floalt, tradfri_remote, tasmota } from "./utils"; +import { esper, floalt, tradfri, tasmota } from "./utils"; import * as onkyo from "./onkyo"; @@ -15,7 +15,7 @@ const config: Config = { }, topics: [ { - led_stahltraeger: { + ledStahltraeger: { state: { name: "/service/openhab/out/pca301_ledstrips/state", type: types.option({ ON: "on", OFF: "off" }) @@ -97,23 +97,23 @@ const config: Config = { name: "stat/sonoff4/POWER", type: types.option({ ON: "on", OFF: "off" }) }, - defaultValue: "off", + defaultValue: "off" }, loetarbeitsplatz5: { state: { name: "stat/sonoff5/POWER", type: types.option({ ON: "on", OFF: "off" }) }, - defaultValue: "off", + defaultValue: "off" }, - door_status: { + doorStatus: { state: { name: "/service/status", type: types.option({ "\"open\"": "on", "\"closed\"": "off" }) }, defaultValue: "off" }, - presence_status: { + presenceStatus: { state: { name: "service/status/presence", type: types.jsonArray @@ -167,22 +167,24 @@ const config: Config = { otherwise: "awaiting_interaction" }) }, - defaultValue: "unavailable", + defaultValue: "unavailable" }, printer_3d_progress: { state: { name: "/service/ultimaker/job", - type: msg => JSON.parse(msg.toString()).progress || "0" + type: (msg) => JSON.parse(msg.toString()).progress || "0" }, defaultValue: "0" }, kitchen_light_color: { state: { - name: "/service/openhab/out/kitchen_light_all_color_temperature/state", + name: "/service/openhab/out/kitchen_light_all_color_temperature" + + "/state", type: types.string }, command: { - name: "/service/openhab/in/kitchen_light_all_color_temperature/command", + name: "/service/openhab/in/kitchen_light_all_color_temperature" + + "/command", type: types.string }, defaultValue: "0" @@ -200,16 +202,18 @@ const config: Config = { }, kitchen_sink_light_brightness: { state: { - name: "/service/openhab/out/tradfri_0100_gwb8d7af2b448f_65545_brightness/state", + name: "/service/openhab/out/tradfri_0100_" + + "gwb8d7af2b448f_65545_brightness/state", type: types.string }, command: { - name: "/service/openhab/in/tradfri_0100_gwb8d7af2b448f_65545_brightness/command", + name: "/service/openhab/in/tradfri_0100_" + + "gwb8d7af2b448f_65545_brightness/command", type: types.string }, defaultValue: "0" }, - nebenraum_power_status: { + nebenraumPowerStatus: { state: { name: "/service/nebenraum-power", type: types.option({ ON: "on", OFF: "off" }) @@ -228,17 +232,17 @@ const config: Config = { floalt.topics("65538"), floalt.topics("65539"), floalt.topics("65540"), - tradfri_remote.topics("65536"), - tradfri_remote.topics("65547"), + tradfri.remote.topics("65536"), + tradfri.remote.topics("65547"), //Theken-Floalts floalt.topics("65543"), floalt.topics("65544"), - tradfri_remote.topics("65542"), - tradfri_remote.topics("65546"), + tradfri.remote.topics("65542"), + tradfri.remote.topics("65546"), - esper_topics("afba40", "flyfry"), - esper_topics("afba45", "alarm"), + esper.topics("afba40", "flyfry"), + esper.topics("afba45", "alarm"), onkyo.topics ], @@ -248,14 +252,15 @@ const config: Config = { name: "LED Stahlträger", position: [340, 590], icon: mdi("white-balance-iridescent"), - iconColor: ({led_stahltraeger}) => led_stahltraeger == "on" ? rainbow : hex("#000000"), + iconColor: ({ledStahltraeger}) => + (ledStahltraeger === "on" ? rainbow : hex("#000000")), ui: [ { type: "toggle", text: "Stahlträger LED", - topic: "led_stahltraeger", + topic: "ledStahltraeger", icon: mdi("power") - }, + } ] }, led_olymp: { @@ -290,8 +295,8 @@ const config: Config = { name: "Twinkle", position: [530, 560], icon: ({twinkle}) => - twinkle == "on" ? rawMdi("led-on flip-v") : rawMdi("led-off flip-v"), - iconColor: ({twinkle}) => twinkle == "on" ? rainbow : hex("#000000"), + (twinkle === "on" ? rawMdi("led-on flip-v") : rawMdi("led-off flip-v")), + iconColor: ({twinkle}) => (twinkle === "on" ? rainbow : hex("#000000")), ui: [ { type: "toggle", @@ -305,7 +310,7 @@ const config: Config = { name: "Ventilator", position: [530, 440], icon: mdi("fan"), - iconColor: ({fan}) => fan == "on" ? hex("#00FF00") : hex("#000000"), + iconColor: ({fan}) => (fan === "on" ? hex("#00FF00") : hex("#000000")), ui: [ { type: "toggle", @@ -332,7 +337,8 @@ const config: Config = { name: "Videospiele", position: [100, 100], icon: mdi("gamepad-variant"), - iconColor: ({videogames}) => videogames == "on" ? hex("#00FF00") : hex("#000000"), + iconColor: ({videogames}) => + (videogames === "on" ? hex("#00FF00") : hex("#000000")), ui: [ { type: "toggle", @@ -346,7 +352,8 @@ const config: Config = { name: "Rechner", position: [297, 90], icon: mdi("desktop-classic"), - iconColor: ({olymp_pc}) => olymp_pc == "on" ? hex("#00FF00") : hex("#000000"), + iconColor: ({olymp_pc}) => + (olymp_pc === "on" ? hex("#00FF00") : hex("#000000")), ui: [ { type: "toggle", @@ -380,8 +387,9 @@ const config: Config = { name: "Fliegenbratgerät", position: [450, 570], icon: mdi("fire"), - iconColor: ({flyfry}) => flyfry == "on" ? hex("#6666FF") : hex("#000000"), - ui: esper_statistics("flyfry", [ + iconColor: ({flyfry}) => + (flyfry === "on" ? hex("#6666FF") : hex("#000000")), + ui: esper.statistics("flyfry", [ { type: "toggle", text: "Fliegenbratgerät", @@ -400,23 +408,24 @@ const config: Config = { transient_off: hex("#b3b300"), on: hex("#00ff00"), off: hex("#000000"), - unknown: hex("#888888"), + unknown: hex("#888888") })[projector], ui: [ { type: "toggle", text: "Beamer", topic: "projector", - toggled: val => val == "transient_on" || val == "on", + toggled: (val) => val === "transient_on" || val === "on", icon: mdi("power") } ] }, rundumleuchte: { name: "Rundumleuchte", - position: [310,275], + position: [310, 275], icon: mdi("alarm-light"), - iconColor: ({rundumleuchte}) => rundumleuchte == "on" ? hex("#F0DF10") : hex("#000000"), + iconColor: ({rundumleuchte}) => + (rundumleuchte === "on" ? hex("#F0DF10") : hex("#000000")), ui: [ { type: "toggle", @@ -430,7 +439,8 @@ const config: Config = { name: "Lötarbeitsplatz", position: [205, 455], icon: mdi("eyedropper-variant"), - iconColor: ({loetarbeitsplatz4}) => loetarbeitsplatz4 == "on" ? hex("#FF0000") : hex("#000000"), + iconColor: ({loetarbeitsplatz4}) => + (loetarbeitsplatz4 === "on" ? hex("#FF0000") : hex("#000000")), ui: [ { type: "text", @@ -444,7 +454,8 @@ const config: Config = { name: "Lötarbeitsplatz", position: [205, 405], icon: mdi("eyedropper-variant"), - iconColor: ({loetarbeitsplatz5}) => loetarbeitsplatz5 == "on" ? hex("#FF0000") : hex("#000000"), + iconColor: ({loetarbeitsplatz5}) => + (loetarbeitsplatz5 === "on" ? hex("#FF0000") : hex("#000000")), ui: [ { type: "text", @@ -459,13 +470,14 @@ const config: Config = { position: [340, 250], icon: mdi("alarm-bell"), iconColor: () => hex("#000000"), - ui: esper_statistics("alarm") + ui: esper.statistics("alarm") }, door: { name: "Tür", - position: [455,350], + position: [455, 350], icon: mdi("swap-vertical"), - iconColor: ({door_status}) => door_status == "on" ? hex("#00FF00") : hex("#FF0000"), + iconColor: ({doorStatus}) => + (doorStatus === "on" ? hex("#00FF00") : hex("#FF0000")), ui: [ { type: "link", @@ -476,7 +488,7 @@ const config: Config = { { type: "text", text: "Anwesend", - topic: "presence_status", + topic: "presenceStatus", icon: mdi("account") }, { @@ -512,7 +524,7 @@ const config: Config = { name: "Ultimaker 3", position: [754, 560], icon: mdi("printer-3d"), - iconColor: ({printer_3d_status}) => + iconColor: ({printer_3d_status}) => ({ awaiting_interaction: hex("#b3b300"), printing: hex("#00ff00"), @@ -563,7 +575,7 @@ const config: Config = { type: "toggle", on: "50", off: "0", - toggled: n => parseInt(n) > 0, + toggled: (n) => parseInt(n) > 0, topic: "kitchen_light_brightness", text: "Ein/Ausschalten", icon: mdi("power") @@ -675,7 +687,7 @@ const config: Config = { type: "toggle", on: "50", off: "0", - toggled: n => parseInt(n) > 0, + toggled: (n) => parseInt(n) > 0, topic: "kitchen_sink_light_brightness", text: "Ein/Ausschalten", icon: mdi("power") @@ -742,56 +754,57 @@ const config: Config = { position: [400, 344], icon: mdi("light-switch"), iconColor: (state) => //if any remote is low make icon red - ["65536", "65542", "65546", "65547"].some( - x => state[tradfri_remote.low(x)] == "true") ? hex("#ff0000") : hex("#000000"), + (["65536", "65542", "65546", "65547"] + .some((x) => state[tradfri.remote.low(x)] === "true") + ? hex("#ff0000") : hex("#000000")), ui: [ { type: "progress", - icon: mdiBattery(tradfri_remote.level("65536")), + icon: mdiBattery(tradfri.remote.level("65536")), min: 0, max: 100, text: "Licht Tisch 1", - topic: tradfri_remote.level("65536") + topic: tradfri.remote.level("65536") }, { type: "progress", - icon: mdiBattery(tradfri_remote.level("65547")), + icon: mdiBattery(tradfri.remote.level("65547")), min: 0, max: 100, text: "Licht Tisch 2", - topic: tradfri_remote.level("65547") + topic: tradfri.remote.level("65547") }, { type: "progress", - icon: mdiBattery(tradfri_remote.level("65542")), + icon: mdiBattery(tradfri.remote.level("65542")), min: 0, max: 100, text: "Licht Theke 1", - topic: tradfri_remote.level("65542") + topic: tradfri.remote.level("65542") }, { type: "progress", - icon: mdiBattery(tradfri_remote.level("65546")), + icon: mdiBattery(tradfri.remote.level("65546")), min: 0, max: 100, text: "Licht Theke 2", - topic: tradfri_remote.level("65546") + topic: tradfri.remote.level("65546") } ] }, - nebenraum_power_status: { + nebenraumPowerStatus: { name: "Strom Fablab", position: [613, 537], - icon: ({nebenraum_power_status}) => - nebenraum_power_status == "on" ? rawMdi("flash") : rawMdi("flash-off"), - iconColor: ({nebenraum_power_status}) => - nebenraum_power_status == "on" ? hex("#00ff00") : hex("#000000"), + icon: ({nebenraumPowerStatus}) => + (nebenraumPowerStatus === "on" ? rawMdi("flash") : rawMdi("flash-off")), + iconColor: ({nebenraumPowerStatus}) => + (nebenraumPowerStatus === "on" ? hex("#00ff00") : hex("#000000")), ui: [ { type: "text", icon: mdi("power"), text: "Strom Fablab", - topic: "nebenraum_power_status" + topic: "nebenraumPowerStatus" } ] } diff --git a/config/rzl/onkyo.js b/config/rzl/onkyo.js index 8074cc9..b2aabb8 100644 --- a/config/rzl/onkyo.js +++ b/config/rzl/onkyo.js @@ -78,7 +78,7 @@ export const topics: Topics = { unknown: "SLI00" }) }, - defaultValue: "unknown", + defaultValue: "unknown" }, onkyo_radios: { state: { @@ -118,87 +118,89 @@ export const topics: Topics = { }; export const controls: Controls = { - onkyo: { - name: "Onkyo", - position: [350, 650], - iconColor: ({onkyo_connection, onkyo_power}) => - onkyo_connection != "connected" ? hex("#888888") : (onkyo_power == "on" ? hex("#00FF00") : hex("#000000")), - icon: mdi("audio-video"), - ui: [ - { - type: "toggle", - text: "Power", - icon: mdi("power"), - topic: "onkyo_power", - enableCondition: ({ onkyo_connection }) => onkyo_connection == "connected" + onkyo: { + name: "Onkyo", + position: [350, 650], + iconColor: ({onkyo_connection, onkyo_power}) => + (onkyo_connection !== "connected" ? hex("#888888") : + (onkyo_power === "on" ? hex("#00FF00") : hex("#000000"))), + icon: mdi("audio-video"), + ui: [ + { + type: "toggle", + text: "Power", + icon: mdi("power"), + topic: "onkyo_power", + enableCondition: (state) => state.onkyo_connection === "connected" + }, + { + type: "section", + text: "Lautstärkeregelung" + }, + { + type: "slider", + text: "Volume", + topic: "onkyo_volume", + min: 0, + max: 50, + icon: mdi("volume-high"), + enableCondition: (state) => state.onkyo_connection === "connected" + }, + { + type: "toggle", + text: "Mute", + topic: "onkyo_mute", + icon: mdi("volume-off"), + enableCondition: (state) => state.onkyo_connection === "connected" + }, + { + type: "section", + text: "Eingänge" + }, + { + type: "dropDown", + text: "Eingang", + topic: "onkyo_inputs", + options: { + netzwerk: "Netzwerk", + tisch: "Tisch", + chromecast: "Chromecast", + pult: "Pult", + front: "Front HDMI" }, - { - type: "section", - text: "Lautstärkeregelung" + icon: mdi("usb"), + enableCondition: (state) => state.onkyo_connection === "connected" + }, + { + type: "dropDown", + text: "Netzwerksender", + topic: "onkyo_radios", + options: { + mpd: "MPD", + kohina: "Kohina", + somafm_dronezone: "Drone Zone (SomaFM)", + somafm_thetrip: "The Trip (SomaFM)", + querfunk: "Querfunk", + somafm_defconradio: "Defcon Radio (SomaFM)", + somafm_secretagent: "Secret Agent (SomaFM)", + somafm_lush: "Lush (SomaFM)", + somafm_beatblender: "Beat Blender (Soma FM)", + ponyville: "Ponyville FM" }, - { - type: "slider", - text: "Volume", - topic: "onkyo_volume", - min: 0, - max: 50, - icon: mdi("volume-high"), - enableCondition: ({ onkyo_connection }) => onkyo_connection == "connected" - }, - { - type: "toggle", - text: "Mute", - topic: "onkyo_mute", - icon: mdi("volume-off"), - enableCondition: ({ onkyo_connection }) => onkyo_connection == "connected" - }, - { - type: "section", - text: "Eingänge" - }, - { - type: "dropDown", - text: "Eingang", - topic: "onkyo_inputs", - options: { - netzwerk: "Netzwerk", - tisch: "Tisch", - chromecast: "Chromecast", - pult: "Pult", - front: "Front HDMI" - }, - icon: mdi("usb"), - enableCondition: ({ onkyo_connection }) => onkyo_connection == "connected" - }, - { - type: "dropDown", - text: "Netzwerksender", - topic: "onkyo_radios", - options: { - mpd: "MPD", - kohina: "Kohina", - somafm_dronezone: "Drone Zone (SomaFM)", - somafm_thetrip: "The Trip (SomaFM)", - querfunk: "Querfunk", - somafm_defconradio: "Defcon Radio (SomaFM)", - somafm_secretagent: "Secret Agent (SomaFM)", - somafm_lush: "Lush (SomaFM)", - somafm_beatblender: "Beat Blender (Soma FM)", - ponyville: "Ponyville FM" - }, - icon: mdi("radio"), - enableCondition: (state) => state.onkyo_connection == "connected" && state.onkyo_inputs == "netzwerk" - }, - { - type: "section", - text: "External" - }, - { - type: "link", - link: "http://mpd.rzl/mpd/player/index.php", - text: "Open MPD Interface", - icon: mdi("open-in-new") - } - ] - } + icon: mdi("radio"), + enableCondition: (state) => state.onkyo_connection === "connected" + && state.onkyo_inputs === "netzwerk" + }, + { + type: "section", + text: "External" + }, + { + type: "link", + link: "http://mpd.rzl/mpd/player/index.php", + text: "Open MPD Interface", + icon: mdi("open-in-new") + } + ] + } }; diff --git a/config/rzl/utils.js b/config/rzl/utils.js index 76a1a0e..413b06c 100644 --- a/config/rzl/utils.js +++ b/config/rzl/utils.js @@ -4,45 +4,6 @@ import { mdi } from "config/icon"; import { hex } from "config/colors"; import * as types from "config/types"; -export const esper_topics = (chip_id: string, name: string) => ({ - [ `esper_${name}_version` ]: { - state: { - name: `/service/esper/${chip_id}/info`, - type: types.json("version.esper") - }, - defaultValue: "UNKNOWN" - }, - [ `esper_${name}_ip` ]: { - state: { - name: `/service/esper/${chip_id}/info`, - type: types.json("network.ip") - }, - defaultValue: "UNKNOWN" - }, - [ `esper_${name}_rssi` ]: { - state: { - name: `/service/esper/${chip_id}/info`, - type: types.json("wifi.rssi") - }, - defaultValue: "UNKNOWN" - }, - [ `esper_${name}_uptime` ]: { - state: { - name: `/service/esper/${chip_id}/info`, - type: msg => new Date(JSON.parse(msg.toString()).time.startup * 1000) - .toLocaleString() - }, - defaultValue: "UNKNOWN", - }, - [ `esper_${name}_device` ]: { - state: { - name: `/service/esper/${chip_id}/info`, - type: types.json("device") - }, - defaultValue: "UNKNOWN" - } -}); - export const tasmota = { topics: (id: string, name: string) => ({ [name]: { @@ -62,106 +23,160 @@ export const tasmota = { type: types.string }, defaultValue: "offline" - }, + } }), - icon_color: (name: string, on_color: Color = hex("#00FF00")) => (state: State) => { - if (state[`${name}_online`] === "offline") { - return hex("#888888"); - } else { - if (state[name] === "on") { - return on_color; + icon_color: (name: string, on_color: Color = hex("#00FF00")) => + (state: State) => { + if (state[`${name}_online`] === "offline") { + return hex("#888888"); } else { - return hex("#000000"); + if (state[name] === "on") { + return on_color; + } else { + return hex("#000000"); + } } } - } -} +}; export const floalt = { - color: (light_id: string) => `floalt_${light_id}_color`, - brightness: (light_id: string) => `floalt_${light_id}_brightness`, - topics: (light_id: string) => ({ - [ `floalt_${light_id}_color` ]: { + color: (lightId: string) => `floalt_${lightId}_color`, + brightness: (lightId: string) => `floalt_${lightId}_brightness`, + topics: (lightId: string) => ({ + [`floalt_${lightId}_color`]: { state: { - name: `/service/openhab/out/tradfri_0220_gwb8d7af2b448f_${light_id}_color_temperature/state`, + name: `/service/openhab/out/tradfri_0220_gwb8d7af2b448f_${lightId}` + + "_color_temperature/state", type: types.string }, command: { - name: `/service/openhab/in/tradfri_0220_gwb8d7af2b448f_${light_id}_color_temperature/command`, + name: `/service/openhab/in/tradfri_0220_gwb8d7af2b448f_${lightId}` + + "_color_temperature/command", type: types.string }, defaultValue: "0" }, - [ `floalt_${light_id}_brightness` ]: { + [`floalt_${lightId}_brightness`]: { state: { - name: `/service/openhab/out/tradfri_0220_gwb8d7af2b448f_${light_id}_brightness/state`, + name: `/service/openhab/out/tradfri_0220_gwb8d7af2b448f_${lightId}` + + "_brightness/state", type: types.string }, command: { - name: `/service/openhab/in/tradfri_0220_gwb8d7af2b448f_${light_id}_brightness/command`, + name: `/service/openhab/in/tradfri_0220_gwb8d7af2b448f_${lightId}` + + "_brightness/command", type: types.string }, defaultValue: "0" } }) -} +}; -export const tradfri_remote = { - level: (remote_id: string) => `tradfri_remote_${remote_id}_level`, - low: (remote_id: string) => `tradfri_remote_${remote_id}_low`, - topics: (remote_id: string) => ({ - [ `tradfri_remote_${remote_id}_level` ]: { +const tradfriRemote = { + level: (remoteId: string) => `tradfri_remote_${remoteId}_level`, + low: (remoteId: string) => `tradfri_remote_${remoteId}_low`, + topics: (remoteId: string) => ({ + [`tradfri_remote_${remoteId}_level`]: { state: { - name: `/service/openhab/out/tradfri_0830_gwb8d7af2b448f_${remote_id}_battery_level/state`, + name: `/service/openhab/out/tradfri_0830_gwb8d7af2b448f_${remoteId}` + + "_battery_level/state", type: types.string }, defaultValue: "0" }, - [ `tradfri_remote_${remote_id}_low` ]: { + [`tradfri_remote_${remoteId}_low`]: { state: { - name: `/service/openhab/out/tradfri_0830_gwb8d7af2b448f_${remote_id}_battery_low/state`, + name: `/service/openhab/out/tradfri_0830_gwb8d7af2b448f_${remoteId}` + + "_battery_low/state", type: types.option({ ON: "true", OFF: "false" }) }, - defaultValue: "false", + defaultValue: "false" } }) -} +}; -export const esper_statistics = (name: string, - prev_ui: Array = []): Array => ( - prev_ui.concat([ - { - type: "section", - text: "Funkdose" - }, - { - type: "text", - text: "Device Variant", - icon: mdi("chart-donut"), - topic: `esper_${name}_device` - }, - { - type: "text", - text: "Version", - icon: mdi("source-branch"), - topic: `esper_${name}_version` - }, - { - type: "text", - text: "IP", - icon: mdi("access-point-network"), - topic: `esper_${name}_ip` - }, - { - type: "text", - text: "RSSI", - icon: mdi("wifi"), - topic: `esper_${name}_rssi` - }, - { - type: "text", - text: "Running since…", - icon: mdi("av-timer"), - topic: `esper_${name}_uptime` - } - ]) - ); +export const tradfri = { + remote: tradfriRemote +}; + +const esperStatistics = (name: string, + prev_ui: Array = []): Array => ( + prev_ui.concat([ + { + type: "section", + text: "Funkdose" + }, + { + type: "text", + text: "Device Variant", + icon: mdi("chart-donut"), + topic: `esper_${name}_device` + }, + { + type: "text", + text: "Version", + icon: mdi("source-branch"), + topic: `esper_${name}_version` + }, + { + type: "text", + text: "IP", + icon: mdi("access-point-network"), + topic: `esper_${name}_ip` + }, + { + type: "text", + text: "RSSI", + icon: mdi("wifi"), + topic: `esper_${name}_rssi` + }, + { + type: "text", + text: "Running since…", + icon: mdi("av-timer"), + topic: `esper_${name}_uptime` + } + ]) +); +const esperTopics = (chipId: string, name: string) => ({ + [`esper_${name}_version`]: { + state: { + name: `/service/esper/${chipId}/info`, + type: types.json("version.esper") + }, + defaultValue: "UNKNOWN" + }, + [`esper_${name}_ip`]: { + state: { + name: `/service/esper/${chipId}/info`, + type: types.json("network.ip") + }, + defaultValue: "UNKNOWN" + }, + [`esper_${name}_rssi`]: { + state: { + name: `/service/esper/${chipId}/info`, + type: types.json("wifi.rssi") + }, + defaultValue: "UNKNOWN" + }, + [`esper_${name}_uptime`]: { + state: { + name: `/service/esper/${chipId}/info`, + type: (msg) => new Date(JSON.parse(msg.toString()).time.startup * 1000) + .toLocaleString() + }, + defaultValue: "UNKNOWN" + }, + [`esper_${name}_device`]: { + state: { + name: `/service/esper/${chipId}/info`, + type: types.json("device") + }, + defaultValue: "UNKNOWN" + } +}); + +export const esper = { + topics: esperTopics, + statistics: esperStatistics +}; diff --git a/package.json b/package.json index cee7ba8..0f781e9 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "dev": "webpack --bail --config webpack.config.js --mode development --env", "watch": "webpack-dev-server --open --config webpack.config.js --mode development --env", "travis": "./travis.sh", - "lint": "eslint --ext js --ext jsx src/", + "lint": "eslint --ext js --ext jsx src/ config/", "precommit": "yarn lint" }, "dependencies": { From 1263c56cfc2ac6ed22d955aa9c01d24cfadbfb7c Mon Sep 17 00:00:00 2001 From: uwap Date: Thu, 30 Aug 2018 15:07:47 +0200 Subject: [PATCH 06/12] RZL: Extract olymp.js --- config/rzl/index.js | 127 ++--------------------------------------- config/rzl/olymp.js | 134 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 138 insertions(+), 123 deletions(-) create mode 100644 config/rzl/olymp.js diff --git a/config/rzl/index.js b/config/rzl/index.js index a09eb8b..e6b05af 100644 --- a/config/rzl/index.js +++ b/config/rzl/index.js @@ -6,6 +6,7 @@ import { mdi, rawMdi, mdiBattery } from "config/icon"; import { esper, floalt, tradfri, tasmota } from "./utils"; import * as onkyo from "./onkyo"; +import * as olymp from "./olymp"; const config: Config = { space: { @@ -48,28 +49,6 @@ const config: Config = { }, defaultValue: "off" }, - videogames: { - state: { - name: "/service/openhab/out/pca301_videogames/state", - type: types.option({ ON: "on", OFF: "off" }) - }, - command: { - name: "/service/openhab/in/pca301_videogames/command", - type: types.option({ on: "ON", off: "OFF" }) - }, - defaultValue: "off" - }, - olymp_pc: { - state: { - name: "/service/openhab/out/pca301_olymp_pc/state", - type: types.option({ ON: "on", OFF: "off" }) - }, - command: { - name: "/service/openhab/in/pca301_olymp_pc/command", - type: types.option({ on: "ON", off: "OFF" }) - }, - defaultValue: "off" - }, flyfry: { state: { name: "/service/openhab/out/wifi_flyfry/state", @@ -81,17 +60,6 @@ const config: Config = { }, defaultValue: "off" }, - rundumleuchte: { - state: { - name: "/service/openhab/out/pca301_rundumleuchte/state", - type: types.option({ ON: "on", OFF: "off" }) - }, - command: { - name: "/service/openhab/in/pca301_rundumleuchte/command", - type: types.option({ on: "ON", off: "OFF" }) - }, - defaultValue: "off" - }, loetarbeitsplatz4: { state: { name: "stat/sonoff4/POWER", @@ -222,10 +190,8 @@ const config: Config = { } }, //Tasmota-Dosen - tasmota.topics("2", "olymp_printer"), tasmota.topics("6", "snackbar"), tasmota.topics("7", "infoscreen"), - tasmota.topics("8", "led_olymp"), //Kuechen-Floalts floalt.topics("65537"), @@ -242,12 +208,13 @@ const config: Config = { tradfri.remote.topics("65546"), esper.topics("afba40", "flyfry"), - esper.topics("afba45", "alarm"), - onkyo.topics + onkyo.topics, + olymp.topics ], controls: { ...onkyo.controls, + ...olymp.controls, led_stahltrager: { name: "LED Stahlträger", position: [340, 590], @@ -263,20 +230,6 @@ const config: Config = { } ] }, - led_olymp: { - name: "LED Olymp", - position: [196, 154], - icon: mdi("white-balance-iridescent rotate-45"), - iconColor: tasmota.icon_color("led_olymp", rainbow), - ui: [ - { - type: "toggle", - text: "LED Olymp", - topic: "led_olymp", - icon: mdi("power") - } - ] - }, snackbar: { name: "Snackbar", position: [510, 500], @@ -333,56 +286,6 @@ const config: Config = { } ] }, - videogames: { - name: "Videospiele", - position: [100, 100], - icon: mdi("gamepad-variant"), - iconColor: ({videogames}) => - (videogames === "on" ? hex("#00FF00") : hex("#000000")), - ui: [ - { - type: "toggle", - text: "Videospiele", - topic: "videogames", - icon: mdi("power") - } - ] - }, - olymp_pc: { - name: "Rechner", - position: [297, 90], - icon: mdi("desktop-classic"), - iconColor: ({olymp_pc}) => - (olymp_pc === "on" ? hex("#00FF00") : hex("#000000")), - ui: [ - { - type: "toggle", - text: "Rechner", - topic: "olymp_pc", - icon: mdi("power") - } - ] - }, - olymp_printer: { - name: "Drucker", - position: [335, 90], - icon: mdi("printer"), - iconColor: tasmota.icon_color("olymp_printer"), - ui: [ - { - type: "toggle", - text: "Drucker", - topic: "olymp_printer", - icon: mdi("power") - }, - { - type: "link", - link: "http://annette.rzl/", - text: "Open Annette", - icon: mdi("open-in-new") - } - ] - }, flyfry: { name: "Fliegenbratgerät", position: [450, 570], @@ -420,21 +323,6 @@ const config: Config = { } ] }, - rundumleuchte: { - name: "Rundumleuchte", - position: [310, 275], - icon: mdi("alarm-light"), - iconColor: ({rundumleuchte}) => - (rundumleuchte === "on" ? hex("#F0DF10") : hex("#000000")), - ui: [ - { - type: "toggle", - text: "Rundumleuchte", - topic: "rundumleuchte", - icon: mdi("power") - } - ] - }, loetarbeitsplatz4: { name: "Lötarbeitsplatz", position: [205, 455], @@ -465,13 +353,6 @@ const config: Config = { } ] }, - alarm: { - name: "Alarm", - position: [340, 250], - icon: mdi("alarm-bell"), - iconColor: () => hex("#000000"), - ui: esper.statistics("alarm") - }, door: { name: "Tür", position: [455, 350], diff --git a/config/rzl/olymp.js b/config/rzl/olymp.js new file mode 100644 index 0000000..a4d730a --- /dev/null +++ b/config/rzl/olymp.js @@ -0,0 +1,134 @@ +// @flow +import type { Topics, Controls } from "config/flowtypes"; +import { mdi } from "config/icon"; +import { hex, rainbow } from "config/colors"; +import * as types from "config/types"; +import { tasmota, esper } from "./utils"; + +export const topics: Topics = { + videogames: { + state: { + name: "/service/openhab/out/pca301_videogames/state", + type: types.option({ ON: "on", OFF: "off" }) + }, + command: { + name: "/service/openhab/in/pca301_videogames/command", + type: types.option({ on: "ON", off: "OFF" }) + }, + defaultValue: "off" + }, + olympPC: { + state: { + name: "/service/openhab/out/pca301_olymp_pc/state", + type: types.option({ ON: "on", OFF: "off" }) + }, + command: { + name: "/service/openhab/in/pca301_olymp_pc/command", + type: types.option({ on: "ON", off: "OFF" }) + }, + defaultValue: "off" + }, + rundumleuchte: { + state: { + name: "/service/openhab/out/pca301_rundumleuchte/state", + type: types.option({ ON: "on", OFF: "off" }) + }, + command: { + name: "/service/openhab/in/pca301_rundumleuchte/command", + type: types.option({ on: "ON", off: "OFF" }) + }, + defaultValue: "off" + }, + ...tasmota.topics("2", "printerOlymp"), + ...tasmota.topics("8", "ledOlymp"), + ...esper.topics("afba45", "alarm") +}; + +export const controls: Controls = { + ledOlymp: { + name: "LED Olymp", + position: [196, 154], + icon: mdi("white-balance-iridescent rotate-45"), + iconColor: tasmota.icon_color("ledOlymp", rainbow), + ui: [ + { + type: "toggle", + text: "LED Olymp", + topic: "ledOlymp", + icon: mdi("power") + } + ] + }, + videogames: { + name: "Videospiele", + position: [100, 100], + icon: mdi("gamepad-variant"), + iconColor: ({videogames}) => + (videogames === "on" ? hex("#00FF00") : hex("#000000")), + ui: [ + { + type: "toggle", + text: "Videospiele", + topic: "videogames", + icon: mdi("power") + } + ] + }, + olympPC: { + name: "Rechner", + position: [297, 90], + icon: mdi("desktop-classic"), + iconColor: ({olympPC}) => + (olympPC === "on" ? hex("#00FF00") : hex("#000000")), + ui: [ + { + type: "toggle", + text: "Rechner", + topic: "olympPC", + icon: mdi("power") + } + ] + }, + printerOlymp: { + name: "Drucker", + position: [335, 90], + icon: mdi("printer"), + iconColor: tasmota.icon_color("printerOlymp"), + ui: [ + { + type: "toggle", + text: "Drucker", + topic: "printerOlymp", + icon: mdi("power") + }, + { + type: "link", + link: "http://annette.rzl/", + text: "Open Annette", + icon: mdi("open-in-new") + } + ] + }, + rundumleuchte: { + name: "Rundumleuchte", + position: [310, 275], + icon: mdi("alarm-light"), + iconColor: ({rundumleuchte}) => + (rundumleuchte === "on" ? hex("#F0DF10") : hex("#000000")), + ui: [ + { + type: "toggle", + text: "Rundumleuchte", + topic: "rundumleuchte", + icon: mdi("power") + } + ] + }, + alarm: { + name: "Alarm", + position: [340, 250], + icon: mdi("alarm-bell"), + iconColor: () => hex("#000000"), + ui: esper.statistics("alarm") + } +}; From c8f014c573246cb9d6e5a415f35c5ea8ddb89657 Mon Sep 17 00:00:00 2001 From: uwap Date: Thu, 30 Aug 2018 15:31:38 +0200 Subject: [PATCH 07/12] RZL: Fix eslint warnings for onkyo --- config/rzl/onkyo.js | 76 ++++++++++++++++++++++----------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/config/rzl/onkyo.js b/config/rzl/onkyo.js index b2aabb8..23c4c76 100644 --- a/config/rzl/onkyo.js +++ b/config/rzl/onkyo.js @@ -5,7 +5,7 @@ import { hex } from "config/colors"; import * as types from "config/types"; export const topics: Topics = { - onkyo_connection: { + onkyoConnection: { state: { name: "/service/onkyo/connected", type: types.option({ @@ -16,7 +16,7 @@ export const topics: Topics = { }, defaultValue: "disconnected" }, - onkyo_power: { + onkyoPower: { state: { name: "/service/onkyo/status/system-power", type: types.json("onkyo_raw", types.option({ @@ -30,7 +30,7 @@ export const topics: Topics = { }, defaultValue: "off" }, - onkyo_mute: { + onkyoMute: { state: { name: "/service/onkyo/status/audio-muting", type: types.json("onkyo_raw", types.option({ @@ -44,7 +44,7 @@ export const topics: Topics = { }, defaultValue: "off" }, - onkyo_volume: { + onkyoVolume: { state: { name: "/service/onkyo/status/volume", type: types.json("val") @@ -55,7 +55,7 @@ export const topics: Topics = { }, defaultValue: "0" }, - onkyo_inputs: { + onkyoInputs: { state: { name: "/service/onkyo/status/input-selector", type: types.json("onkyo_raw", types.option({ @@ -80,19 +80,19 @@ export const topics: Topics = { }, defaultValue: "unknown" }, - onkyo_radios: { + onkyoRadios: { state: { name: "/service/onkyo/status/latest-NPR", type: types.option({ NPR01: "mpd", NPR02: "kohina", - NPR03: "somafm_dronezone", - NPR04: "somafm_thetrip", + NPR03: "somafmDronezone", + NPR04: "somafmThetrip", NPR05: "querfunk", - NPR06: "somafm_defconradio", - NPR07: "somafm_secretagent", - NPR08: "somafm_lush", - NPR09: "somafm_beatblender", + NPR06: "somafmDefconradio", + NPR07: "somafmSecretagent", + NPR08: "somafmLush", + NPR09: "somafmBeatblender", NPR0a: "ponyville", otherwise: "unknown" }) @@ -102,13 +102,13 @@ export const topics: Topics = { type: types.option({ mpd: "NPR01", kohina: "NPR02", - somafm_dronezone: "NPR03", - somafm_thetrip: "NPR04", + somafmDronezone: "NPR03", + somafmThetrip: "NPR04", querfunk: "NPR05", - somafm_defconradio: "NPR06", - somafm_secretagent: "NPR07", - somafm_lush: "NPR08", - somafm_beatblender: "NPR09", + somafmDefconradio: "NPR06", + somafmSecretagent: "NPR07", + somafmLush: "NPR08", + somafmBeatblender: "NPR09", ponyville: "NPR0a", otherwise: "NPR00" }) @@ -121,17 +121,17 @@ export const controls: Controls = { onkyo: { name: "Onkyo", position: [350, 650], - iconColor: ({onkyo_connection, onkyo_power}) => - (onkyo_connection !== "connected" ? hex("#888888") : - (onkyo_power === "on" ? hex("#00FF00") : hex("#000000"))), + iconColor: ({onkyoConnection, onkyoPower}) => + (onkyoConnection !== "connected" ? hex("#888888") : + (onkyoPower === "on" ? hex("#00FF00") : hex("#000000"))), icon: mdi("audio-video"), ui: [ { type: "toggle", text: "Power", icon: mdi("power"), - topic: "onkyo_power", - enableCondition: (state) => state.onkyo_connection === "connected" + topic: "onkyoPower", + enableCondition: (state) => state.onkyoConnection === "connected" }, { type: "section", @@ -140,18 +140,18 @@ export const controls: Controls = { { type: "slider", text: "Volume", - topic: "onkyo_volume", + topic: "onkyoVolume", min: 0, max: 50, icon: mdi("volume-high"), - enableCondition: (state) => state.onkyo_connection === "connected" + enableCondition: (state) => state.onkyoConnection === "connected" }, { type: "toggle", text: "Mute", - topic: "onkyo_mute", + topic: "onkyoMute", icon: mdi("volume-off"), - enableCondition: (state) => state.onkyo_connection === "connected" + enableCondition: (state) => state.onkyoConnection === "connected" }, { type: "section", @@ -160,7 +160,7 @@ export const controls: Controls = { { type: "dropDown", text: "Eingang", - topic: "onkyo_inputs", + topic: "onkyoInputs", options: { netzwerk: "Netzwerk", tisch: "Tisch", @@ -169,27 +169,27 @@ export const controls: Controls = { front: "Front HDMI" }, icon: mdi("usb"), - enableCondition: (state) => state.onkyo_connection === "connected" + enableCondition: (state) => state.onkyoConnection === "connected" }, { type: "dropDown", text: "Netzwerksender", - topic: "onkyo_radios", + topic: "onkyoRadios", options: { mpd: "MPD", kohina: "Kohina", - somafm_dronezone: "Drone Zone (SomaFM)", - somafm_thetrip: "The Trip (SomaFM)", + somafmDronezone: "Drone Zone (SomaFM)", + somafmThetrip: "The Trip (SomaFM)", querfunk: "Querfunk", - somafm_defconradio: "Defcon Radio (SomaFM)", - somafm_secretagent: "Secret Agent (SomaFM)", - somafm_lush: "Lush (SomaFM)", - somafm_beatblender: "Beat Blender (Soma FM)", + somafmDefconradio: "Defcon Radio (SomaFM)", + somafmSecretagent: "Secret Agent (SomaFM)", + somafmLush: "Lush (SomaFM)", + somafmBeatblender: "Beat Blender (Soma FM)", ponyville: "Ponyville FM" }, icon: mdi("radio"), - enableCondition: (state) => state.onkyo_connection === "connected" - && state.onkyo_inputs === "netzwerk" + enableCondition: (state) => state.onkyoConnection === "connected" + && state.onkyoInputs === "netzwerk" }, { type: "section", From 8e0a15065927502c4d6a387f48ae5136519bf951 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Fri, 31 Aug 2018 20:24:25 +0200 Subject: [PATCH 08/12] =?UTF-8?q?Update=20flow-bin=20to=20the=20latest=20v?= =?UTF-8?q?ersion=20=F0=9F=9A=80=20(#77)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(package): update flow-bin to version 0.80.0 * chore(package): update lockfile https://npm.im/greenkeeper-lockfile --- package.json | 2 +- yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 0f781e9..745d87a 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "eslint-plugin-react": "^7.6.1", "file-loader": "^1.1.5", "flow": "^0.2.3", - "flow-bin": "^0.79.0", + "flow-bin": "^0.80.0", "flow-typed": "^2.3.0", "html-webpack-plugin": "^3.1.0", "husky": "^0.14.3", diff --git a/yarn.lock b/yarn.lock index 6d1ad0f..b99a21f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2578,9 +2578,9 @@ flat-cache@^1.2.1: graceful-fs "^4.1.2" write "^0.2.1" -flow-bin@^0.79.0: - version "0.79.0" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.79.0.tgz#a7029f2832d45e5b78f7e77a74fee898722fb6ef" +flow-bin@^0.80.0: + version "0.80.0" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.80.0.tgz#04cc1ee626a6f50786f78170c92ebe1745235403" flow-typed@^2.3.0: version "2.5.1" From 2801b9c49197812c6152c8bfc36749c3cbc9add6 Mon Sep 17 00:00:00 2001 From: uwap Date: Sat, 1 Sep 2018 12:18:57 +0200 Subject: [PATCH 09/12] RZL: Extract kitchen.js --- config/rzl/index.js | 290 ++---------------------------------------- config/rzl/kitchen.js | 290 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 298 insertions(+), 282 deletions(-) create mode 100644 config/rzl/kitchen.js diff --git a/config/rzl/index.js b/config/rzl/index.js index e6b05af..99d083d 100644 --- a/config/rzl/index.js +++ b/config/rzl/index.js @@ -2,11 +2,12 @@ import type { Config } from "config/flowtypes"; import * as types from "config/types"; import { hex, rainbow } from "config/colors"; -import { mdi, rawMdi, mdiBattery } from "config/icon"; -import { esper, floalt, tradfri, tasmota } from "./utils"; +import { mdi, rawMdi } from "config/icon"; +import { esper, tasmota } from "./utils"; import * as onkyo from "./onkyo"; import * as olymp from "./olymp"; +import * as kitchen from "./kitchen"; const config: Config = { space: { @@ -88,7 +89,7 @@ const config: Config = { }, defaultValue: "" }, - devices_status: { + devicesStatus: { state: { name: "/service/status/devices", type: types.string @@ -144,43 +145,6 @@ const config: Config = { }, defaultValue: "0" }, - kitchen_light_color: { - state: { - name: "/service/openhab/out/kitchen_light_all_color_temperature" - + "/state", - type: types.string - }, - command: { - name: "/service/openhab/in/kitchen_light_all_color_temperature" - + "/command", - type: types.string - }, - defaultValue: "0" - }, - kitchen_light_brightness: { - state: { - name: "/service/openhab/out/kitchen_light_all_brightness/state", - type: types.string - }, - command: { - name: "/service/openhab/in/kitchen_light_all_brightness/command", - type: types.string - }, - defaultValue: "0" - }, - kitchen_sink_light_brightness: { - state: { - name: "/service/openhab/out/tradfri_0100_" - + "gwb8d7af2b448f_65545_brightness/state", - type: types.string - }, - command: { - name: "/service/openhab/in/tradfri_0100_" - + "gwb8d7af2b448f_65545_brightness/command", - type: types.string - }, - defaultValue: "0" - }, nebenraumPowerStatus: { state: { name: "/service/nebenraum-power", @@ -193,28 +157,16 @@ const config: Config = { tasmota.topics("6", "snackbar"), tasmota.topics("7", "infoscreen"), - //Kuechen-Floalts - floalt.topics("65537"), - floalt.topics("65538"), - floalt.topics("65539"), - floalt.topics("65540"), - tradfri.remote.topics("65536"), - tradfri.remote.topics("65547"), - - //Theken-Floalts - floalt.topics("65543"), - floalt.topics("65544"), - tradfri.remote.topics("65542"), - tradfri.remote.topics("65546"), - esper.topics("afba40", "flyfry"), onkyo.topics, - olymp.topics + olymp.topics, + kitchen.topics ], controls: { ...onkyo.controls, ...olymp.controls, + ...kitchen.controls, led_stahltrager: { name: "LED Stahlträger", position: [340, 590], @@ -375,7 +327,7 @@ const config: Config = { { type: "text", text: "Devices", - topic: "devices_status", + topic: "devicesStatus", icon: mdi("wifi") } @@ -447,232 +399,6 @@ const config: Config = { } ] }, - kitchen_light: { - name: "Deckenlicht Küche", - position: [325, 407], - icon: mdi("ceiling-light"), - ui: [ - { - type: "toggle", - on: "50", - off: "0", - toggled: (n) => parseInt(n) > 0, - topic: "kitchen_light_brightness", - text: "Ein/Ausschalten", - icon: mdi("power") - }, - { - type: "slider", - min: 0, - max: 100, - text: "Helligkeit", - icon: mdi("brightness-7"), - topic: "kitchen_light_brightness" - }, - { - type: "slider", - min: 0, - max: 100, - text: "Farbtemperatur", - icon: mdi("weather-sunset-down"), - topic: "kitchen_light_color" - }, - { - type: "section", - text: "Lampe Eingang" - }, - { - type: "slider", - min: 0, - max: 100, - text: "Helligkeit", - icon: mdi("brightness-7"), - topic: floalt.brightness("65537") - }, - { - type: "slider", - min: 0, - max: 100, - text: "Farbtemperatur", - icon: mdi("weather-sunset-down"), - topic: floalt.color("65537") - }, - { - type: "section", - text: "Lampe Hauptraum" - }, - { - type: "slider", - min: 0, - max: 100, - text: "Helligkeit", - icon: mdi("brightness-7"), - topic: floalt.brightness("65538") - }, - { - type: "slider", - min: 0, - max: 100, - text: "Farbtemperatur", - icon: mdi("weather-sunset-down"), - topic: floalt.color("65538") - }, - { - type: "section", - text: "Lampe Spüle" - }, - { - type: "slider", - min: 0, - max: 100, - text: "Helligkeit", - icon: mdi("brightness-7"), - topic: floalt.brightness("65539") - }, - { - type: "slider", - min: 0, - max: 100, - text: "Farbtemperatur", - icon: mdi("weather-sunset-down"), - topic: floalt.color("65539") - }, - { - type: "section", - text: "Lampe Herd" - }, - { - type: "slider", - min: 0, - max: 100, - text: "Helligkeit", - icon: mdi("brightness-7"), - topic: floalt.brightness("65540") - }, - { - type: "slider", - min: 0, - max: 100, - text: "Farbtemperatur", - icon: mdi("weather-sunset-down"), - topic: floalt.color("65540") - } - ] - }, - kitchen_sink_light: { - name: "Licht Spüle", - position: [300, 345], - icon: mdi("wall-sconce-flat"), - ui: [ - { - type: "toggle", - on: "50", - off: "0", - toggled: (n) => parseInt(n) > 0, - topic: "kitchen_sink_light_brightness", - text: "Ein/Ausschalten", - icon: mdi("power") - }, - { - type: "slider", - min: 0, - max: 100, - text: "Helligkeit", - icon: mdi("brightness-7"), - topic: "kitchen_sink_light_brightness" - } - ] - }, - kitchen_counter_light: { - name: "Deckenlicht Theke", - position: [400, 440], - icon: mdi("ceiling-light"), - ui: [ - { - type: "section", - text: "Lampe Eingang" - }, - { - type: "slider", - min: 0, - max: 100, - text: "Helligkeit", - icon: mdi("brightness-7"), - topic: floalt.brightness("65544") - }, - { - type: "slider", - min: 0, - max: 100, - text: "Farbtemperatur", - icon: mdi("weather-sunset-down"), - topic: floalt.color("65544") - }, - { - type: "section", - text: "Lampe Hauptraum" - }, - { - type: "slider", - min: 0, - max: 100, - text: "Helligkeit", - icon: mdi("brightness-7"), - topic: floalt.brightness("65543") - }, - { - type: "slider", - min: 0, - max: 100, - text: "Farbtemperatur", - icon: mdi("weather-sunset-down"), - topic: floalt.color("65543") - } - ] - }, - remotes: { - name: "Fernbedinungen", - position: [400, 344], - icon: mdi("light-switch"), - iconColor: (state) => //if any remote is low make icon red - (["65536", "65542", "65546", "65547"] - .some((x) => state[tradfri.remote.low(x)] === "true") - ? hex("#ff0000") : hex("#000000")), - ui: [ - { - type: "progress", - icon: mdiBattery(tradfri.remote.level("65536")), - min: 0, - max: 100, - text: "Licht Tisch 1", - topic: tradfri.remote.level("65536") - }, - { - type: "progress", - icon: mdiBattery(tradfri.remote.level("65547")), - min: 0, - max: 100, - text: "Licht Tisch 2", - topic: tradfri.remote.level("65547") - }, - { - type: "progress", - icon: mdiBattery(tradfri.remote.level("65542")), - min: 0, - max: 100, - text: "Licht Theke 1", - topic: tradfri.remote.level("65542") - }, - { - type: "progress", - icon: mdiBattery(tradfri.remote.level("65546")), - min: 0, - max: 100, - text: "Licht Theke 2", - topic: tradfri.remote.level("65546") - } - ] - }, nebenraumPowerStatus: { name: "Strom Fablab", position: [613, 537], diff --git a/config/rzl/kitchen.js b/config/rzl/kitchen.js new file mode 100644 index 0000000..0950dec --- /dev/null +++ b/config/rzl/kitchen.js @@ -0,0 +1,290 @@ +// @flow +import type { Topics, Controls } from "config/flowtypes"; +import { mdi, mdiBattery } from "config/icon"; +import { hex } from "config/colors"; +import * as types from "config/types"; +import { floalt, tradfri } from "./utils"; + +export const topics: Topics = { + //Kuechen-Floalts + ...floalt.topics("65537"), + ...floalt.topics("65538"), + ...floalt.topics("65539"), + ...floalt.topics("65540"), + ...tradfri.remote.topics("65536"), + ...tradfri.remote.topics("65547"), + + //Theken-Floalts + ...floalt.topics("65543"), + ...floalt.topics("65544"), + ...tradfri.remote.topics("65542"), + ...tradfri.remote.topics("65546"), + + kitchenLightColor: { + state: { + name: "/service/openhab/out/kitchenLight_allColor_temperature" + + "/state", + type: types.string + }, + command: { + name: "/service/openhab/in/kitchenLight_allColor_temperature" + + "/command", + type: types.string + }, + defaultValue: "0" + }, + kitchenLightBrightness: { + state: { + name: "/service/openhab/out/kitchenLight_allBrightness/state", + type: types.string + }, + command: { + name: "/service/openhab/in/kitchenLight_allBrightness/command", + type: types.string + }, + defaultValue: "0" + }, + kitchenSinkLightBrightness: { + state: { + name: "/service/openhab/out/tradfri_0100_" + + "gwb8d7af2b448f_65545Brightness/state", + type: types.string + }, + command: { + name: "/service/openhab/in/tradfri_0100_" + + "gwb8d7af2b448f_65545Brightness/command", + type: types.string + }, + defaultValue: "0" + } +}; + +export const controls: Controls = { + kitchenLight: { + name: "Deckenlicht Küche", + position: [325, 407], + icon: mdi("ceiling-light"), + ui: [ + { + type: "toggle", + on: "50", + off: "0", + toggled: (n) => parseInt(n, 10) > 0, + topic: "kitchenLightBrightness", + text: "Ein/Ausschalten", + icon: mdi("power") + }, + { + type: "slider", + min: 0, + max: 100, + text: "Helligkeit", + icon: mdi("brightness-7"), + topic: "kitchenLightBrightness" + }, + { + type: "slider", + min: 0, + max: 100, + text: "Farbtemperatur", + icon: mdi("weather-sunset-down"), + topic: "kitchenLightColor" + }, + { + type: "section", + text: "Lampe Eingang" + }, + { + type: "slider", + min: 0, + max: 100, + text: "Helligkeit", + icon: mdi("brightness-7"), + topic: floalt.brightness("65537") + }, + { + type: "slider", + min: 0, + max: 100, + text: "Farbtemperatur", + icon: mdi("weather-sunset-down"), + topic: floalt.color("65537") + }, + { + type: "section", + text: "Lampe Hauptraum" + }, + { + type: "slider", + min: 0, + max: 100, + text: "Helligkeit", + icon: mdi("brightness-7"), + topic: floalt.brightness("65538") + }, + { + type: "slider", + min: 0, + max: 100, + text: "Farbtemperatur", + icon: mdi("weather-sunset-down"), + topic: floalt.color("65538") + }, + { + type: "section", + text: "Lampe Spüle" + }, + { + type: "slider", + min: 0, + max: 100, + text: "Helligkeit", + icon: mdi("brightness-7"), + topic: floalt.brightness("65539") + }, + { + type: "slider", + min: 0, + max: 100, + text: "Farbtemperatur", + icon: mdi("weather-sunset-down"), + topic: floalt.color("65539") + }, + { + type: "section", + text: "Lampe Herd" + }, + { + type: "slider", + min: 0, + max: 100, + text: "Helligkeit", + icon: mdi("brightness-7"), + topic: floalt.brightness("65540") + }, + { + type: "slider", + min: 0, + max: 100, + text: "Farbtemperatur", + icon: mdi("weather-sunset-down"), + topic: floalt.color("65540") + } + ] + }, + kitchenSinkLight: { + name: "Licht Spüle", + position: [300, 345], + icon: mdi("wall-sconce-flat"), + ui: [ + { + type: "toggle", + on: "50", + off: "0", + toggled: (n) => parseInt(n, 10) > 0, + topic: "kitchenSinkLightBrightness", + text: "Ein/Ausschalten", + icon: mdi("power") + }, + { + type: "slider", + min: 0, + max: 100, + text: "Helligkeit", + icon: mdi("brightness-7"), + topic: "kitchenSinkLightBrightness" + } + ] + }, + kitchenCounterLight: { + name: "Deckenlicht Theke", + position: [400, 440], + icon: mdi("ceiling-light"), + ui: [ + { + type: "section", + text: "Lampe Eingang" + }, + { + type: "slider", + min: 0, + max: 100, + text: "Helligkeit", + icon: mdi("brightness-7"), + topic: floalt.brightness("65544") + }, + { + type: "slider", + min: 0, + max: 100, + text: "Farbtemperatur", + icon: mdi("weather-sunset-down"), + topic: floalt.color("65544") + }, + { + type: "section", + text: "Lampe Hauptraum" + }, + { + type: "slider", + min: 0, + max: 100, + text: "Helligkeit", + icon: mdi("brightness-7"), + topic: floalt.brightness("65543") + }, + { + type: "slider", + min: 0, + max: 100, + text: "Farbtemperatur", + icon: mdi("weather-sunset-down"), + topic: floalt.color("65543") + } + ] + }, + remotes: { + name: "Fernbedinungen", + position: [400, 344], + icon: mdi("light-switch"), + iconColor: (state) => //if any remote is low make icon red + (["65536", "65542", "65546", "65547"] + .some((x) => state[tradfri.remote.low(x)] === "true") + ? hex("#ff0000") : hex("#000000")), + ui: [ + { + type: "progress", + icon: mdiBattery(tradfri.remote.level("65536")), + min: 0, + max: 100, + text: "Licht Tisch 1", + topic: tradfri.remote.level("65536") + }, + { + type: "progress", + icon: mdiBattery(tradfri.remote.level("65547")), + min: 0, + max: 100, + text: "Licht Tisch 2", + topic: tradfri.remote.level("65547") + }, + { + type: "progress", + icon: mdiBattery(tradfri.remote.level("65542")), + min: 0, + max: 100, + text: "Licht Theke 1", + topic: tradfri.remote.level("65542") + }, + { + type: "progress", + icon: mdiBattery(tradfri.remote.level("65546")), + min: 0, + max: 100, + text: "Licht Theke 2", + topic: tradfri.remote.level("65546") + } + ] + } + +}; From fe2383f1385e6c2eef1de5408004ffea1be0b8df Mon Sep 17 00:00:00 2001 From: uwap Date: Sat, 1 Sep 2018 12:54:47 +0200 Subject: [PATCH 10/12] RZL: Fix eslint warnings in utils.js --- config/rzl/index.js | 4 ++-- config/rzl/olymp.js | 4 ++-- config/rzl/utils.js | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/config/rzl/index.js b/config/rzl/index.js index 99d083d..69af447 100644 --- a/config/rzl/index.js +++ b/config/rzl/index.js @@ -186,7 +186,7 @@ const config: Config = { name: "Snackbar", position: [510, 500], icon: mdi("fridge"), - iconColor: tasmota.icon_color("snackbar", hex("#E20074")), + iconColor: tasmota.iconColor("snackbar", hex("#E20074")), ui: [ { type: "toggle", @@ -337,7 +337,7 @@ const config: Config = { name: "Infoscreen", position: [255, 495], icon: mdi("television-guide flip-v"), - iconColor: tasmota.icon_color("infoscreen", hex("#4444FF")), + iconColor: tasmota.iconColor("infoscreen", hex("#4444FF")), ui: [ { type: "toggle", diff --git a/config/rzl/olymp.js b/config/rzl/olymp.js index a4d730a..0ed8822 100644 --- a/config/rzl/olymp.js +++ b/config/rzl/olymp.js @@ -49,7 +49,7 @@ export const controls: Controls = { name: "LED Olymp", position: [196, 154], icon: mdi("white-balance-iridescent rotate-45"), - iconColor: tasmota.icon_color("ledOlymp", rainbow), + iconColor: tasmota.iconColor("ledOlymp", rainbow), ui: [ { type: "toggle", @@ -93,7 +93,7 @@ export const controls: Controls = { name: "Drucker", position: [335, 90], icon: mdi("printer"), - iconColor: tasmota.icon_color("printerOlymp"), + iconColor: tasmota.iconColor("printerOlymp"), ui: [ { type: "toggle", diff --git a/config/rzl/utils.js b/config/rzl/utils.js index 413b06c..2fbe615 100644 --- a/config/rzl/utils.js +++ b/config/rzl/utils.js @@ -25,13 +25,13 @@ export const tasmota = { defaultValue: "offline" } }), - icon_color: (name: string, on_color: Color = hex("#00FF00")) => + iconColor: (name: string, onColor: Color = hex("#00FF00")) => (state: State) => { if (state[`${name}_online`] === "offline") { return hex("#888888"); } else { if (state[name] === "on") { - return on_color; + return onColor; } else { return hex("#000000"); } @@ -99,8 +99,8 @@ export const tradfri = { }; const esperStatistics = (name: string, - prev_ui: Array = []): Array => ( - prev_ui.concat([ + prevUI: Array = []): Array => ( + prevUI.concat([ { type: "section", text: "Funkdose" From 7a04979907763992c4898758c06a5347bf95b90e Mon Sep 17 00:00:00 2001 From: uwap Date: Sat, 1 Sep 2018 13:28:51 +0200 Subject: [PATCH 11/12] Use eslint-plugin-fp on warn level for a major future refactoring --- .eslintrc.js | 25 +++++++++++++++++++++++-- package.json | 1 + yarn.lock | 36 +++++++++++++++++++++++++++++++++++- 3 files changed, 59 insertions(+), 3 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 1fc0053..78a98d6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -17,7 +17,7 @@ module.exports = { "sourceType": "module" }, "plugins": [ - "react", "flowtype" + "react", "flowtype", "fp" ], "globals": { "require": false @@ -140,6 +140,27 @@ module.exports = { // flow "flowtype/no-dupe-keys": "error", "flowtype/no-weak-types": "warn", - "flowtype/require-variable-type": "off" // wait for https://github.com/gajus/eslint-plugin-flowtype/issues/198 to be resolved + "flowtype/require-variable-type": "off", // wait for https://github.com/gajus/eslint-plugin-flowtype/issues/198 to be resolved + + // fp + // TODO: Import fp/recommended after resolving the warnings + "fp/no-arguments": "warn", + "fp/no-class": "warn", + "fp/no-delete": "warn", + "fp/no-events": "warn", + "fp/no-get-set": "warn", + "fp/no-let": "warn", + "fp/no-loops": "warn", + "fp/no-mutating-assign": "warn", + "fp/no-mutating-methods": "warn", + "fp/no-mutation": "warn", + "fp/no-nil": "warn", + "fp/no-proxy": "warn", + "fp/no-rest-parameters": "warn", + "fp/no-this": "warn", + "fp/no-throw": "warn", + "fp/no-unused-expression": "warn", + "fp/no-valueof-field": "warn", + "no-var": "warn" } }; diff --git a/package.json b/package.json index 745d87a..e2c4f82 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "css-loader": "^1.0.0", "eslint": "^5.0.1", "eslint-plugin-flowtype": "^2.42.0", + "eslint-plugin-fp": "^2.3.0", "eslint-plugin-react": "^7.6.1", "file-loader": "^1.1.5", "flow": "^0.2.3", diff --git a/yarn.lock b/yarn.lock index b99a21f..17cfcb4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1747,6 +1747,12 @@ create-ecdh@^4.0.0: bn.js "^4.1.0" elliptic "^6.0.0" +create-eslint-index@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/create-eslint-index/-/create-eslint-index-1.0.0.tgz#d954372d86d5792fcd67e9f2b791b1ab162411bb" + dependencies: + lodash.get "^4.3.0" + create-hash@^1.1.0, create-hash@^1.1.2: version "1.2.0" resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" @@ -2225,12 +2231,28 @@ escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" +eslint-ast-utils@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/eslint-ast-utils/-/eslint-ast-utils-1.1.0.tgz#3d58ba557801cfb1c941d68131ee9f8c34bd1586" + dependencies: + lodash.get "^4.4.2" + lodash.zip "^4.2.0" + eslint-plugin-flowtype@^2.42.0: version "2.50.0" resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.50.0.tgz#953e262fa9b5d0fa76e178604892cf60dfb916da" dependencies: lodash "^4.17.10" +eslint-plugin-fp@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-fp/-/eslint-plugin-fp-2.3.0.tgz#376d2a108710e981980bdc3875e3b9920da0489c" + dependencies: + create-eslint-index "^1.0.0" + eslint-ast-utils "^1.0.0" + lodash "^4.13.1" + req-all "^0.1.0" + eslint-plugin-react@^7.6.1: version "7.10.0" resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.10.0.tgz#af5c1fef31c4704db02098f9be18202993828b50" @@ -3700,7 +3722,15 @@ lodash.debounce@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" -lodash@^4.0.0, lodash@^4.17.10, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1, lodash@^4.3.0: +lodash.get@^4.3.0, lodash.get@^4.4.2: + version "4.4.2" + resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" + +lodash.zip@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.zip/-/lodash.zip-4.2.0.tgz#ec6662e4896408ed4ab6c542a3990b72cc080020" + +lodash@^4.0.0, lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1, lodash@^4.3.0: version "4.17.10" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" @@ -4970,6 +5000,10 @@ repeating@^2.0.0: dependencies: is-finite "^1.0.0" +req-all@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/req-all/-/req-all-0.1.0.tgz#130051e2ace58a02eacbfc9d448577a736a9273a" + require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" From e3c11c19cd3941d3de91b1fe1eb35d9fa1423000 Mon Sep 17 00:00:00 2001 From: uwap Date: Sat, 1 Sep 2018 14:04:38 +0200 Subject: [PATCH 12/12] Fix onkyo radio selection --- config/rzl/onkyo.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/rzl/onkyo.js b/config/rzl/onkyo.js index 23c4c76..edc8733 100644 --- a/config/rzl/onkyo.js +++ b/config/rzl/onkyo.js @@ -185,7 +185,8 @@ export const controls: Controls = { somafmSecretagent: "Secret Agent (SomaFM)", somafmLush: "Lush (SomaFM)", somafmBeatblender: "Beat Blender (Soma FM)", - ponyville: "Ponyville FM" + ponyville: "Ponyville FM", + unknown: "Unknown" }, icon: mdi("radio"), enableCondition: (state) => state.onkyoConnection === "connected"