Add home based on entropia template
This commit is contained in:
parent
4588d450fb
commit
8fc81db415
3 changed files with 200 additions and 0 deletions
2
config/home/assets/layers/rooms.svg
Normal file
2
config/home/assets/layers/rooms.svg
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="642px" height="482px" version="1.1" content="<mxfile userAgent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36" version="8.0.4" editor="www.draw.io" type="device"><diagram id="37c35b26-3ed1-cd20-236b-a94d597bd395" name="Page-1">5VZBk5sgGP013hUSY45tdtteOtOZHPbMyhdlguIgiWZ//WIAldVd247Tmc7mEnnA++C9JxjgQ9F+l6TKfwoKPEAhbQP8ECAU4X2i/zrkZpDYAZlk1A4agCN7AQuGFr0wCrU3UAnBFat8MBVlCanyMCKlaPxhJ8H9qhXJYAIcU8Kn6BOjKjdognYD/gNYlrvKUbw3Pc8kPWdSXEpbL0D4dP+Z7oI4LrvROidUNCMIPwb4IIVQ5qloD8A7bZ1sZt63d3q3hvVK+MXupO607QrLM8jaLV9CqX6HL57w2WWrm5MKSvqlU1y3SlFq8GuuCq5bkX6slRTnXsIOMfOBTvQflrTtddD5AlGAkjc9pBmM2Fr18pEHDpPAiWJXn57YPGQ9XV/hl2C6MAptdhNLY4OLwtBnqMVFpmAnjZX7Qx5FZAZqwqMfRpseoLsv8x7tPrtHcbKORxOe9TxKPp1HO7SSSYtE67k0o+HHxyNatrXJmYJjRdKu3ejb0jeW1JW5v06sBTrr9IlxfhBcyDuhu05cAq4gFbTvrj+az4CdgMOtf0ptrLajjODNTEh6cC4QngMfyI2X1bvfpJ0uD6He8YKW/1S6TbwsXZTMSBe9ze/fSLf5n6WL3rzRs9LtV0qdbg5fU+ZMGD5Z8eMr</diagram></mxfile>" style="background-color: rgb(255, 255, 255);"><defs/><g transform="translate(0.5,0.5)"><path d="M 0 0 L 0 0" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 0 480 L 0 480" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 640 480 L 640 480" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><rect x="225" y="40" width="340" height="340" fill="#ffffff" stroke="#000000" pointer-events="none"/><rect x="385" y="40" width="180" height="180" fill="#ffffff" stroke="#000000" pointer-events="none"/><rect x="40" y="40" width="190" height="340" fill="#ffffff" stroke="#000000" pointer-events="none"/></g></svg>
|
||||
|
After Width: | Height: | Size: 1.9 KiB |
1
config/home/assets/raw/entropia.draw.io
Normal file
1
config/home/assets/raw/entropia.draw.io
Normal file
|
|
@ -0,0 +1 @@
|
|||
<mxfile userAgent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36" version="8.0.4" editor="www.draw.io" type="device"><diagram id="37c35b26-3ed1-cd20-236b-a94d597bd395" name="Page-1">5VZBk5sgGP013hUSY45tdtteOtOZHPbMyhdlguIgiWZ//WIAldVd247Tmc7mEnnA++C9JxjgQ9F+l6TKfwoKPEAhbQP8ECAU4X2i/zrkZpDYAZlk1A4agCN7AQuGFr0wCrU3UAnBFat8MBVlCanyMCKlaPxhJ8H9qhXJYAIcU8Kn6BOjKjdognYD/gNYlrvKUbw3Pc8kPWdSXEpbL0D4dP+Z7oI4LrvROidUNCMIPwb4IIVQ5qloD8A7bZ1sZt63d3q3hvVK+MXupO607QrLM8jaLV9CqX6HL57w2WWrm5MKSvqlU1y3SlFq8GuuCq5bkX6slRTnXsIOMfOBTvQflrTtddD5AlGAkjc9pBmM2Fr18pEHDpPAiWJXn57YPGQ9XV/hl2C6MAptdhNLY4OLwtBnqMVFpmAnjZX7Qx5FZAZqwqMfRpseoLsv8x7tPrtHcbKORxOe9TxKPp1HO7SSSYtE67k0o+HHxyNatrXJmYJjRdKu3ejb0jeW1JW5v06sBTrr9IlxfhBcyDuhu05cAq4gFbTvrj+az4CdgMOtf0ptrLajjODNTEh6cC4QngMfyI2X1bvfpJ0uD6He8YKW/1S6TbwsXZTMSBe9ze/fSLf5n6WL3rzRs9LtV0qdbg5fU+ZMGD5Z8eMr</diagram></mxfile>
|
||||
197
config/home/index.js
Normal file
197
config/home/index.js
Normal file
|
|
@ -0,0 +1,197 @@
|
|||
// @flow
|
||||
import type { Config } from "config/flowtypes";
|
||||
import * as types from "config/types";
|
||||
import { mdi } from "config/icon";
|
||||
|
||||
const config: Config = {
|
||||
space: {
|
||||
name: "Home",
|
||||
color: "orange",
|
||||
mqtt: "ws://192.168.0.12:1884"
|
||||
},
|
||||
topics: [
|
||||
{
|
||||
|
||||
/*
|
||||
*zigbee2mqtt/bulb_livingroom
|
||||
*zigbee2mqtt/bulb_hallway
|
||||
*zigbee2mqtt/bulb_bedroom
|
||||
*/
|
||||
|
||||
livingroomBrightness: {
|
||||
state: {
|
||||
name: "zigbee2mqtt/bulb_livingroom",
|
||||
type: types.json("brightness")
|
||||
},
|
||||
command: {
|
||||
name: "zigbee2mqtt/bulb_livingroom/set",
|
||||
type: (value) => JSON.stringify({ brightness: value.toString() })
|
||||
},
|
||||
defaultValue: "0"
|
||||
},
|
||||
livingroomColorTemperature: {
|
||||
state: {
|
||||
name: "zigbee2mqtt/bulb_livingroom",
|
||||
type: types.json("color_temp")
|
||||
},
|
||||
command: {
|
||||
name: "zigbee2mqtt/bulb_livingroom/set",
|
||||
type: (value) => JSON.stringify({ "color_temp": value.toString() })
|
||||
},
|
||||
defaultValue: "250"
|
||||
},
|
||||
livingroomState: {
|
||||
state: {
|
||||
name: "zigbee2mqtt/bulb_livingroom",
|
||||
type: types.json("state", types.option({
|
||||
OFF: "off",
|
||||
ON: "on"
|
||||
}))
|
||||
},
|
||||
command: {
|
||||
name: "zigbee2mqtt/bulb_livingroom/set",
|
||||
type: (value) => JSON.stringify({ state: value.toString() })
|
||||
},
|
||||
defaultValue: "OFF"
|
||||
},
|
||||
bedroomBrightness: {
|
||||
state: {
|
||||
name: "zigbee2mqtt/bulb_bedroom",
|
||||
type: types.json("brightness")
|
||||
},
|
||||
command: {
|
||||
name: "zigbee2mqtt/bulb_bedroom/set",
|
||||
type: (value) => JSON.stringify({ brightness: value.toString() })
|
||||
},
|
||||
defaultValue: "0"
|
||||
},
|
||||
bedroomState: {
|
||||
state: {
|
||||
name: "zigbee2mqtt/bulb_bedroom",
|
||||
type: types.json("state", types.option({
|
||||
OFF: "off",
|
||||
ON: "on"
|
||||
}))
|
||||
},
|
||||
command: {
|
||||
name: "zigbee2mqtt/bulb_bedroom/set",
|
||||
type: (value) => JSON.stringify({ state: value.toString() })
|
||||
},
|
||||
defaultValue: "OFF"
|
||||
},
|
||||
hallwayBrightness: {
|
||||
state: {
|
||||
name: "zigbee2mqtt/bulb_hallway",
|
||||
type: types.json("brightness")
|
||||
},
|
||||
command: {
|
||||
name: "zigbee2mqtt/bulb_hallway/set",
|
||||
type: (value) => JSON.stringify({ brightness: value.toString() })
|
||||
},
|
||||
defaultValue: "0"
|
||||
},
|
||||
hallwayState: {
|
||||
state: {
|
||||
name: "zigbee2mqtt/bulb_hallway",
|
||||
type: types.json("state", types.option({
|
||||
OFF: "off",
|
||||
ON: "on"
|
||||
}))
|
||||
},
|
||||
command: {
|
||||
name: "zigbee2mqtt/bulb_hallway/set",
|
||||
type: (value) => JSON.stringify({ state: value.toString() })
|
||||
},
|
||||
defaultValue: "OFF"
|
||||
}
|
||||
}
|
||||
],
|
||||
controls: {
|
||||
bedroomLight: {
|
||||
name: "Schlafzimmer",
|
||||
position: [300, 400],
|
||||
icon: mdi("ceiling-light"),
|
||||
ui: [
|
||||
{
|
||||
type: "toggle",
|
||||
topic: "bedroomState",
|
||||
text: "Ein/Ausschalten",
|
||||
icon: mdi("power")
|
||||
},
|
||||
{
|
||||
type: "slider",
|
||||
min: 0,
|
||||
max: 255,
|
||||
text: "Helligkeit",
|
||||
icon: mdi("brightness-7"),
|
||||
topic: "bedroomBrightness"
|
||||
}
|
||||
]
|
||||
},
|
||||
hallwayLight: {
|
||||
name: "Flur",
|
||||
position: [500, 200],
|
||||
icon: mdi("ceiling-light"),
|
||||
ui: [
|
||||
{
|
||||
type: "toggle",
|
||||
topic: "hallwayState",
|
||||
text: "Ein/Ausschalten",
|
||||
icon: mdi("power")
|
||||
},
|
||||
{
|
||||
type: "slider",
|
||||
min: 0,
|
||||
max: 255,
|
||||
text: "Helligkeit",
|
||||
icon: mdi("brightness-7"),
|
||||
topic: "hallwayBrightness"
|
||||
}
|
||||
]
|
||||
},
|
||||
livingroomLight: {
|
||||
name: "Wohnzimmer",
|
||||
position: [300, 200],
|
||||
icon: mdi("ceiling-light"),
|
||||
ui: [
|
||||
{
|
||||
type: "toggle",
|
||||
topic: "livingroomState",
|
||||
text: "Ein/Ausschalten",
|
||||
icon: mdi("power")
|
||||
},
|
||||
{
|
||||
type: "slider",
|
||||
min: 0,
|
||||
max: 255,
|
||||
text: "Helligkeit",
|
||||
icon: mdi("brightness-7"),
|
||||
topic: "livingroomBrightness"
|
||||
},
|
||||
{
|
||||
type: "slider",
|
||||
min: 250,
|
||||
max: 454,
|
||||
text: "Farbtemperatur",
|
||||
icon: mdi("weather-sunset-down"),
|
||||
topic: "livingroomColorTemperature"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
layers: [
|
||||
{
|
||||
image: require("./assets/layers/rooms.svg"),
|
||||
baseLayer: true,
|
||||
name: "Entropia",
|
||||
defaultVisibility: "visible",
|
||||
opacity: 0.7,
|
||||
bounds: {
|
||||
topLeft: [0, 0],
|
||||
bottomRight: [720, 680]
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
window.config = config;
|
||||
Loading…
Add table
Add a link
Reference in a new issue