Home Information - Your home, your data, organized.
Python
Added a few more entity icons.
Anthony Cassandra12349c934fa4
diff --git a/src/hi/apps/entity/templates/entity/svg/type.attic_stairs.svg b/src/hi/apps/entity/templates/entity/svg/type.attic_stairs.svgnew file mode 100644index 00000000..2a1884d0--- /dev/null+++ b/src/hi/apps/entity/templates/entity/svg/type.attic_stairs.svg@@ -0,0 +1,23 @@+<rect class="hi-entity-bg" x="0" y="0" width="47" height="64" fill="none"/>+ <path id="stairs"+ fill="#401f06" stroke="#401f06" stroke-width="3"+ d="M 25.50,10.96+ C 25.50,10.96 2.91,61.44 2.91,61.44M 33.70,18.81+ C 33.70,18.81 22.00,18.72 22.00,18.72M 30.19,26.39+ C 30.19,26.39 18.63,26.34 18.63,26.34M 26.55,34.51+ C 26.55,34.51 14.94,34.37 14.94,34.37M 23.04,42.27+ C 23.04,42.27 11.70,41.95 11.70,41.95M 19.63,49.94+ C 19.63,49.94 8.15,49.62 8.15,49.62M 16.26,57.43+ C 16.26,57.43 4.87,57.34 4.87,57.34" />+ <path id="frame"+ fill="#401f06" stroke="white" stroke-width="2"+ d="M 2.73,3.01+ C 2.73,3.01 44.81,3.01 44.81,3.01+ 44.81,3.01 44.63,10.59 44.63,10.59+ 44.63,10.59 2.55,10.68 2.55,10.68+ 2.55,10.68 2.73,3.01 2.73,3.01 Z+ M 37.44,10.64+ C 37.44,10.64 44.63,10.54 44.63,10.54+ 44.63,10.54 21.95,61.26 21.95,61.26+ 21.95,61.26 14.57,61.26 14.57,61.26+ 14.57,61.26 37.44,10.64 37.44,10.64 Z" />diff --git a/src/hi/apps/entity/templates/entity/svg/type.on_off_switch.svg b/src/hi/apps/entity/templates/entity/svg/type.on_off_switch.svgnew file mode 100644index 00000000..49636163--- /dev/null+++ b/src/hi/apps/entity/templates/entity/svg/type.on_off_switch.svg@@ -0,0 +1,105 @@+<rect class="hi-entity-bg" x="0" y="0" width="44" height="64" fill="none"/>+ <path class="hi-entity-on-off-switch-plate"+ fill="#fcfcfc" stroke="#020203" stroke-width="2"+ d="M 5.15,1.31+ C 5.15,1.31 9.12,1.31 9.12,1.31+ 9.12,1.31 16.55,1.31 16.55,1.31+ 16.55,1.31 38.25,1.31 38.25,1.31+ 40.98,1.33 42.81,3.64 42.81,6.27+ 42.81,6.27 42.81,49.77 42.81,49.77+ 42.81,49.77 42.81,57.83 42.81,57.83+ 42.81,60.62 40.90,62.80 38.05,62.81+ 38.05,62.81 5.85,62.81 5.85,62.81+ 3.06,62.79 1.19,60.53 1.19,57.83+ 1.19,57.83 1.19,14.93 1.19,14.93+ 1.19,14.93 1.19,8.66 1.19,8.66+ 1.19,6.37 0.86,4.35 2.68,2.59+ 2.98,2.30 3.30,2.05 3.67,1.84+ 4.13,1.58 4.64,1.45 5.15,1.31 Z" />+ <path class="hi-entity-on-off-switch-switch-bg"+ fill="#fcfcfc" stroke="black" stroke-width="0"+ d="M 16.65,16.49+ C 16.65,16.49 20.02,16.42 20.02,16.42+ 20.02,16.42 26.56,16.42 26.56,16.42+ 26.83,16.42 27.20,16.41 27.45,16.51+ 28.34,16.88 27.95,18.37 27.95,19.11+ 27.95,19.11 27.95,30.95 27.95,30.95+ 27.95,32.09 28.39,32.43 29.00,33.34+ 29.00,33.34 31.61,37.23 31.61,37.23+ 31.96,37.76 32.97,39.00 32.87,39.61+ 32.81,40.02 31.95,41.19 31.68,41.60+ 31.68,41.60 28.74,45.98 28.74,45.98+ 27.75,47.47 27.86,47.58 26.76,47.58+ 26.76,47.58 17.24,47.58 17.24,47.58+ 16.01,47.57 15.96,47.14 15.96,45.98+ 15.96,45.98 15.96,23.59 15.96,23.59+ 15.96,23.59 15.96,17.82 15.96,17.82+ 15.96,17.16 16.01,16.77 16.65,16.49 Z" />+ <path class="hi-entity-on-off-switch-switch-lines"+ fill="black" stroke="black" stroke-width="0"+ d="M 16.45,16.09+ C 16.45,16.09 20.02,16.02 20.02,16.02+ 20.02,16.02 26.76,16.02 26.76,16.02+ 26.99,16.03 27.32,16.02 27.55,16.08+ 28.84,16.45 28.35,18.25 28.34,19.21+ 28.34,19.21 28.34,30.76 28.34,30.76+ 28.34,31.90 28.85,32.32 29.47,33.24+ 29.47,33.24 32.14,37.23 32.14,37.23+ 32.53,37.81 33.43,38.92 33.34,39.61+ 33.27,40.15 32.41,41.30 32.08,41.80+ 32.08,41.80 29.33,45.88 29.33,45.88+ 29.04,46.32 28.30,47.55 27.94,47.80+ 27.43,48.16 26.75,47.98 26.16,47.98+ 26.16,47.98 19.13,47.98 19.13,47.98+ 19.13,47.98 17.74,47.98 17.74,47.98+ 17.26,47.98 16.70,48.12 16.26,47.91+ 15.58,47.59 15.56,46.83 15.56,46.18+ 15.56,46.18 15.56,23.39 15.56,23.39+ 15.56,23.39 15.56,17.62 15.56,17.62+ 15.57,16.85 15.70,16.41 16.45,16.09 Z+ M 26.06,18.41+ C 26.06,18.41 17.94,18.41 17.94,18.41+ 17.94,18.41 17.94,30.86 17.94,30.86+ 17.94,30.86 26.06,30.86 26.06,30.86+ 26.06,30.86 26.06,18.41 26.06,18.41 Z+ M 30.03,38.32+ C 30.03,38.32 27.58,34.64 27.58,34.64+ 26.69,33.30 26.81,33.25 25.86,33.24+ 25.86,33.24 19.03,33.24 19.03,33.24+ 19.03,33.24 21.44,36.93 21.44,36.93+ 22.14,37.97 22.10,38.32 23.19,38.32+ 23.19,38.32 30.03,38.32 30.03,38.32 Z+ M 18.04,35.93+ C 18.04,35.93 17.94,37.82 17.94,37.82+ 17.94,37.82 17.94,41.31 17.94,41.31+ 17.94,41.31 18.04,43.00 18.04,43.00+ 18.04,43.00 19.75,40.41 19.75,40.41+ 19.95,40.11 20.31,39.69 20.22,39.32+ 20.16,39.10 19.71,38.45 19.56,38.22+ 19.56,38.22 18.04,35.93 18.04,35.93 Z+ M 30.03,40.61+ C 30.03,40.61 23.19,40.61 23.19,40.61+ 22.18,40.61 22.32,40.73 21.56,41.80+ 21.05,42.53 19.39,44.90 19.13,45.59+ 19.13,45.59 25.96,45.59 25.96,45.59+ 26.88,45.58 26.74,45.56 27.65,44.19+ 27.65,44.19 30.03,40.61 30.03,40.61 Z" />+ <path class="hi-entity-on-off-switch-letters"+ fill="black" stroke="black" stroke-width="0"+ d="M 21.70,5.83+ C 22.79,5.66 23.18,6.40 23.19,7.37+ 23.19,7.37 23.19,11.55 23.19,11.55+ 23.18,12.17 23.08,12.76 22.40,12.97+ 21.32,13.32 20.82,12.50 20.81,11.55+ 20.81,11.55 20.81,7.37 20.81,7.37+ 20.82,6.62 20.96,6.12 21.70,5.83 Z+ M 21.60,50.71+ C 25.46,50.24 27.29,55.24 24.28,57.58+ 23.71,58.02 23.00,58.21 22.30,58.30+ 21.91,58.34 21.69,58.30 21.31,58.23+ 18.93,57.81 17.60,55.29 18.48,53.05+ 19.05,51.60 20.14,50.95 21.60,50.71 Z+ M 21.60,53.09+ C 19.76,53.69 20.47,56.34 22.40,55.90+ 23.47,55.65 23.79,54.27 23.05,53.48+ 22.63,53.04 22.17,53.01 21.60,53.09 Z" />diff --git a/src/hi/apps/entity/templates/entity/svg/type.shed.svg b/src/hi/apps/entity/templates/entity/svg/type.shed.svgnew file mode 100644index 00000000..6b42900f--- /dev/null+++ b/src/hi/apps/entity/templates/entity/svg/type.shed.svg@@ -0,0 +1,33 @@+<rect class="hi-entity-bg" x="0" y="0" width="64" height="64" fill="none"/>+ <path class="hi-entity-shed-frame"+ fill="#a17d4d" stroke="#d0d0d0" stroke-width="2"+ d="M 6.40,18.60+ C 6.40,18.60 32.32,5.88 32.32,5.88+ 32.32,5.88 58.16,18.68 58.16,18.68+ 58.16,18.68 58.24,55.56 58.24,55.56+ 58.24,55.56 6.24,55.68 6.24,55.68+ 6.24,55.68 6.40,18.60 6.40,18.60 Z" />+ <path class="hi-entity-shed-doors"+ fill="#a17d4d" stroke="#d0d0d0" stroke-width="2"+ d="M 13.20,21.00+ C 13.20,21.00 32.04,20.84 32.04,20.84+ 32.04,20.84 32.00,55.40 32.00,55.40+ 32.00,55.40 13.16,55.44 13.16,55.44+ 13.16,55.44 13.20,21.00 13.20,21.00 Z+ M 32.56,20.80+ C 32.56,20.80 51.32,20.88 51.32,20.88+ 51.32,20.88 51.56,55.52 51.56,55.52+ 51.56,55.52 32.64,55.48 32.64,55.48+ 32.64,55.48 32.56,20.80 32.56,20.80 Z" />+ <path class="hi-entity-shed-windows"+ fill="#87CEEB" stroke="black" stroke-width="2"+ d="M 17.80,25.64+ C 17.80,25.64 27.52,25.56 27.52,25.56+ 27.52,25.56 27.60,30.16 27.60,30.16+ 27.60,30.16 17.76,30.20 17.76,30.20+ 17.76,30.20 17.80,25.64 17.80,25.64 Z+ M 37.12,25.56+ C 37.12,25.56 46.60,25.52 46.60,25.52+ 46.60,25.52 46.68,30.08 46.68,30.08+ 46.68,30.08 37.12,30.08 37.12,30.08+ 37.12,30.08 37.12,25.56 37.12,25.56 Z" />diff --git a/src/hi/apps/entity/templates/entity/svg/type.skylight.svg b/src/hi/apps/entity/templates/entity/svg/type.skylight.svgnew file mode 100644index 00000000..c5760890--- /dev/null+++ b/src/hi/apps/entity/templates/entity/svg/type.skylight.svg@@ -0,0 +1,89 @@+<rect class="hi-entity-bg" x="0" y="0" width="57" height="64" fill="none"/>+ <path class="hi-entity-skylight-frame"+ fill="#401f06" stroke="black" stroke-width="1"+ d="M 5.86,0.58+ C 5.86,0.58 10.73,0.50 10.73,0.50+ 10.73,0.50 20.08,0.50 20.08,0.50+ 20.08,0.50 49.77,0.50 49.77,0.50+ 50.14,0.50 50.54,0.48 50.89,0.63+ 52.02,1.10 51.83,2.98 51.90,4.01+ 51.90,4.01 52.37,10.52 52.37,10.52+ 52.37,10.52 52.56,13.78 52.56,13.78+ 52.56,13.78 52.65,15.28 52.65,15.28+ 52.65,15.28 52.90,19.04 52.90,19.04+ 52.90,19.04 53.52,28.43 53.52,28.43+ 53.52,28.43 54.64,45.34 54.64,45.34+ 54.64,45.34 55.02,50.97 55.02,50.97+ 55.02,50.97 55.12,51.98 55.12,51.98+ 55.12,51.98 55.51,58.49 55.51,58.49+ 55.51,58.49 55.75,61.50 55.75,61.50+ 55.79,63.14 55.23,63.62 53.63,63.62+ 53.63,63.62 13.10,63.62 13.10,63.62+ 13.10,63.62 2.99,63.62 2.99,63.62+ 1.39,63.62 0.84,63.14 0.87,61.50+ 0.87,61.50 0.99,60.37 0.99,60.37+ 0.99,60.37 1.24,56.61 1.24,56.61+ 1.24,56.61 1.86,47.22 1.86,47.22+ 1.86,47.22 3.98,15.28 3.98,15.28+ 3.98,15.28 4.48,7.77 4.48,7.77+ 4.48,7.77 4.70,4.26 4.70,4.26+ 4.85,2.99 4.45,1.19 5.86,0.58 Z" />+ <path class="hi-entity-skylight-glass"+ fill="#87CEEB" stroke="black" stroke-width="1"+ d="M 11.72,6.61+ C 12.45,6.43 14.37,6.51 15.22,6.51+ 15.22,6.51 22.08,6.51 22.08,6.51+ 22.08,6.51 43.90,6.51 43.90,6.51+ 44.34,6.51 44.77,6.48 45.15,6.73+ 45.99,7.29 45.87,8.39 45.90,9.27+ 45.90,9.27 46.02,11.15 46.02,11.15+ 46.02,11.15 46.27,14.40 46.27,14.40+ 46.27,14.40 46.27,15.53 46.27,15.53+ 46.27,15.53 46.64,20.41 46.64,20.41+ 46.64,20.41 46.78,23.55 46.78,23.55+ 46.78,23.55 47.63,36.45 47.63,36.45+ 47.63,36.45 47.78,39.58 47.78,39.58+ 47.78,39.58 48.02,42.46 48.02,42.46+ 48.02,42.46 48.02,43.59 48.02,43.59+ 48.02,43.59 48.27,46.72 48.27,46.72+ 48.27,46.72 48.52,51.23 48.52,51.23+ 48.52,51.23 48.77,54.86 48.77,54.86+ 48.77,55.39 48.84,56.41 48.60,56.86+ 48.20,57.62 47.64,57.61 46.90,57.61+ 46.90,57.61 16.96,57.61 16.96,57.61+ 16.96,57.61 9.48,57.61 9.48,57.61+ 7.64,57.59 7.84,56.23 7.86,54.86+ 7.86,54.86 7.98,53.48 7.98,53.48+ 7.98,53.48 8.35,47.59 8.35,47.59+ 8.35,47.59 8.49,44.46 8.49,44.46+ 8.49,44.46 9.09,35.57 9.09,35.57+ 9.09,35.57 9.24,32.44 9.24,32.44+ 9.24,32.44 9.85,23.55 9.85,23.55+ 9.85,23.55 9.85,22.42 9.85,22.42+ 9.85,22.42 10.09,19.54 10.09,19.54+ 10.09,19.54 10.17,17.91 10.17,17.91+ 10.17,17.91 10.24,16.41 10.24,16.41+ 10.24,16.41 10.71,9.64 10.71,9.64+ 10.82,8.46 10.46,7.29 11.72,6.61 Z" />+ <path class="hi-entity-skylight-highlight"+ fill="#4a7181" stroke="#4a7181" stroke-width="0"+ d="M 29.68,12.62+ C 31.84,12.09 32.11,14.06 31.59,14.90+ 31.35,15.28 29.97,16.63 29.56,17.03+ 29.56,17.03 25.57,21.04 25.57,21.04+ 25.05,21.56 23.51,23.24 22.95,23.45+ 21.40,24.05 20.19,22.34 21.13,21.04+ 21.13,21.04 22.95,19.16 22.95,19.16+ 22.95,19.16 26.57,15.53 26.57,15.53+ 27.30,14.79 28.87,13.04 29.68,12.62 Z+ M 37.67,12.62+ C 39.82,12.09 40.09,14.06 39.57,14.90+ 39.57,14.90 36.67,17.91 36.67,17.91+ 36.67,17.91 30.56,24.05 30.56,24.05+ 30.56,24.05 28.31,26.30 28.31,26.30+ 27.96,26.66 27.40,27.29 26.94,27.46+ 25.39,28.06 24.18,26.35 25.12,25.05+ 25.12,25.05 27.94,22.17 27.94,22.17+ 27.94,22.17 33.30,16.78 33.30,16.78+ 33.30,16.78 35.92,14.15 35.92,14.15+ 36.47,13.61 36.98,12.98 37.67,12.62 Z" />diff --git a/src/hi/hi_styles.py b/src/hi/hi_styles.pyindex 3ba69066..d80afd6b 100644--- a/src/hi/hi_styles.py+++ b/src/hi/hi_styles.py@@ -193,6 +193,14 @@ class EntityStyle:fill_color = None,fill_opacity = 0.0,)+ SpeakerWire = SvgStatusStyle(+ status_value = '',+ stroke_color = '#04a004',+ stroke_width = 2,+ stroke_dasharray = [ 8, 2, 2, 2, 2, 2 ],+ fill_color = None,+ fill_opacity = 0.0,+ )TelecomWire = SvgStatusStyle(status_value = '',stroke_color = '#FFA500',@@ -229,6 +237,7 @@ class EntityStyle:EntityTypesWithIcons = {# Default icon used if not in this mapEntityType.ACCESS_POINT,+ EntityType.ATTIC_STAIRS,EntityType.AUTOMOBILE,EntityType.AV_RECEIVER,EntityType.BAROMETER,@@ -261,6 +270,7 @@ class EntityStyle:EntityType.MOTION_SENSOR,EntityType.MOTOR,EntityType.NETWORK_SWITCH,+ EntityType.ON_OFF_SWITCH,EntityType.OPEN_CLOSE_SENSOR,EntityType.OVEN,EntityType.PLANT,@@ -271,8 +281,10 @@ class EntityStyle:EntityType.REFRIGERATOR,EntityType.SERVER,EntityType.SERVICE,+ EntityType.SHED,EntityType.SHOWER,EntityType.SINK,+ EntityType.SKYLIGHT,EntityType.SPEAKER,EntityType.SPRINKLER_HEAD,EntityType.SPRINKLER_VALVE,@@ -292,6 +304,7 @@ class EntityStyle:}EntityTypeToIconViewbox = {# Default viewbox used if not in this map+ EntityType.ATTIC_STAIRS: SvgViewBox( x = 0, y = 0, width = 47, height = 64 ),EntityType.AUTOMOBILE: SvgViewBox( x = 0, y = 0, width = 200, height = 300 ),EntityType.BAROMETER: SvgViewBox( x = 0, y = 0, width = 44, height = 64 ),EntityType.CAMERA: SvgViewBox( x = 0, y = 0, width = 64, height = 43 ),@@ -305,12 +318,14 @@ class EntityStyle:EntityType.MOTION_SENSOR: SvgViewBox( x = 0, y = 0, width = 42, height = 64 ),EntityType.MOTOR: SvgViewBox( x = 0, y = 0, width = 64, height = 46 ),EntityType.NETWORK_SWITCH: SvgViewBox( x = 0, y = 0, width = 64, height = 32 ),+ EntityType.ON_OFF_SWITCH: SvgViewBox( x = 0, y = 0, width = 44, height = 64 ),EntityType.OPEN_CLOSE_SENSOR: SvgViewBox( x = 0, y = 0, width = 64, height = 50 ),EntityType.PUMP: SvgViewBox( x = 0, y = 0, width = 64, height = 45 ),EntityType.REFRIGERATOR: SvgViewBox( x = 0, y = 0, width = 48, height = 64 ),EntityType.SERVER: SvgViewBox( x = 0, y = 0, width = 45, height = 64 ),EntityType.SINK: SvgViewBox( x = 0, y = 0, width = 64, height = 50 ),EntityType.SPRINKLER_HEAD: SvgViewBox( x = 0, y = 0, width = 64, height = 44 ),+ EntityType.SKYLIGHT: SvgViewBox( x = 0, y = 0, width = 57, height = 64 ),EntityType.TELEVISION: SvgViewBox( x = 0, y = 0, width = 64, height = 48 ),EntityType.THERMOMETER: SvgViewBox( x = 0, y = 0, width = 27, height = 64 ),EntityType.THERMOSTAT: SvgViewBox( x = 0, y = 0, width = 64, height = 44 ),@@ -333,6 +348,7 @@ class EntityStyle:EntityType.ELECTRIC_WIRE,EntityType.PIPE,EntityType.SEWER_LINE,+ EntityType.SPEAKER_WIRE,EntityType.SPRINKLER_WIRE,EntityType.TELECOM_WIRE,EntityType.WATER_LINE,@@ -347,6 +363,7 @@ class EntityStyle:EntityType.GREENHOUSE: Greenhouse,EntityType.PIPE: Pipe,EntityType.SEWER_LINE: SewerLine,+ EntityType.SPEAKER_WIRE: SpeakerWire,EntityType.SPRINKLER_WIRE: ControlWire,EntityType.TELECOM_WIRE: TelecomWire,EntityType.WALL: Wall,