emhass 0.10.6__py3-none-any.whl → 0.11.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
emhass/static/style.css CHANGED
@@ -1,3 +1,4 @@
1
+ /*! EMHASS Style Sheet */
1
2
  /*! style.css v1.0.0 (modified version) | ISC License | https://github.com/ungoldman/style.css */
2
3
 
3
4
  /* color reference css */
@@ -570,6 +571,8 @@ button,
570
571
  .mystyle,
571
572
  .alert,
572
573
  .info,
574
+ .section-card,
575
+ select,
573
576
  table {
574
577
  border-radius: 7px;
575
578
  /* overflow: visible; */
@@ -578,6 +581,7 @@ table {
578
581
  button,
579
582
  .alert,
580
583
  .info,
584
+ .section-card,
581
585
  select {
582
586
  text-transform: none;
583
587
  border-width: 1px;
@@ -599,6 +603,8 @@ select {
599
603
 
600
604
  h2 {
601
605
  margin-bottom: .3em;
606
+ margin-right: .3em;
607
+ margin-left: .3em;
602
608
  }
603
609
 
604
610
  .table_div h4 {
@@ -747,12 +753,12 @@ tr:hover td:last-child {
747
753
  margin-right: 13px;
748
754
  }
749
755
 
750
- #loader {
756
+ /* #loader {
751
757
  min-width: 3.5em;
752
758
  min-height: 3.5em;
753
759
  width: 3.5em;
754
760
  height: 3.5em;
755
- }
761
+ } */
756
762
 
757
763
  .loading {
758
764
  /* loading animation */
@@ -787,7 +793,7 @@ tr:hover td:last-child {
787
793
 
788
794
  .tick {
789
795
  /* tick symbol */
790
- color: #158b00;
796
+ color: #bfebbc;
791
797
  vertical-align: text-top;
792
798
  font-size: 4.0em;
793
799
  animation-name: fadeInOpacity;
@@ -798,7 +804,7 @@ tr:hover td:last-child {
798
804
 
799
805
  .cross {
800
806
  /* cross symbol */
801
- color: #a71515;
807
+ color: #e3b7b7;
802
808
  vertical-align: text-top;
803
809
  font-size: 4.0em;
804
810
  animation-name: fadeInOpacity;
@@ -941,7 +947,8 @@ select,
941
947
 
942
948
 
943
949
  .input-list input,
944
- .input-box textarea {
950
+ .input-box textarea,
951
+ #config-box {
945
952
  border-collapse: collapse;
946
953
  border-radius: 7px;
947
954
  border-style: solid;
@@ -970,7 +977,229 @@ select,
970
977
  margin: 0;
971
978
  }
972
979
 
973
- /* */
980
+ /* config page */
981
+ #configuration-container {
982
+ border: 1px solid;
983
+ border-width: 1px 0px;
984
+ }
985
+
986
+ #configuration-container,
987
+ .header-footer {
988
+ margin-bottom: 5px;
989
+ padding: 20px 0px;
990
+ border-radius: 7px;
991
+ max-width: 90%;
992
+ margin: auto;
993
+ }
994
+
995
+
996
+ .header-footer {
997
+ background-color: #0000;
998
+ display: flex;
999
+ justify-content: space-between;
1000
+ }
1001
+
1002
+ .header-footer h4,
1003
+ .header-footer div,
1004
+ .header-footer a {
1005
+ line-height: 0;
1006
+ margin: auto 0;
1007
+
1008
+ }
1009
+
1010
+ /* loading icons */
1011
+ .header-footer p {
1012
+ margin: 20px 0;
1013
+ }
1014
+
1015
+
1016
+ .header-footer h4 {
1017
+ color: darkblue;
1018
+ }
1019
+
1020
+ .header-footer .feather {
1021
+ height: 3em !important;
1022
+ stroke-width: 3 !important;
1023
+ }
1024
+
1025
+ #save,
1026
+ #json {
1027
+ min-width: 15%;
1028
+ height: auto;
1029
+ display: block;
1030
+ min-height: fit-content;
1031
+ margin-left: auto;
1032
+ }
1033
+
1034
+ /* configuration list page */
1035
+
1036
+ .section-card {
1037
+ max-width: 99%;
1038
+ margin-left: auto;
1039
+ margin-right: auto;
1040
+ margin-bottom: 1vh;
1041
+ }
1042
+
1043
+ .section-card h4 {
1044
+ margin-top: 5px;
1045
+ background-color: #0000 !important;
1046
+ }
1047
+
1048
+ .section-card-header {
1049
+ background-color: #e1e1e15e;
1050
+ display: flex;
1051
+ align-items: center;
1052
+ padding: 0px 10px;
1053
+ border-bottom: 1px solid rgba(0, 0, 0, 0.355);
1054
+ /* justify-content: center; */
1055
+ }
1056
+
1057
+ .section-body {
1058
+ -webkit-transition: .4s;
1059
+ transition: .4s;
1060
+ }
1061
+
1062
+ .switch,
1063
+ .section-card-header input {
1064
+ position: relative;
1065
+ display: inline-block;
1066
+ width: 52px;
1067
+ height: 27px;
1068
+ margin-left: auto;
1069
+ }
1070
+
1071
+ .switch input {
1072
+ opacity: 0;
1073
+ width: 0;
1074
+ height: 0;
1075
+ }
1076
+
1077
+ .slider {
1078
+ position: absolute;
1079
+ cursor: pointer;
1080
+ top: 0;
1081
+ left: 0;
1082
+ right: 0;
1083
+ bottom: 0;
1084
+ background-color: #ccc;
1085
+ -webkit-transition: .4s;
1086
+ transition: .4s;
1087
+ }
1088
+
1089
+ .slider:before {
1090
+ position: absolute;
1091
+ content: "";
1092
+ height: calc(27px - 7px);
1093
+ width: calc(27px - 7px);
1094
+ left: 4px;
1095
+ bottom: 4px;
1096
+ background-color: white;
1097
+ -webkit-transition: .4s;
1098
+ transition: .4s;
1099
+ }
1100
+
1101
+ input:checked+.slider {
1102
+ background-color: darkblue;
1103
+ }
1104
+
1105
+ input:checked+.slider:before {
1106
+ -webkit-transform: translateX(26px);
1107
+ -ms-transform: translateX(26px);
1108
+ transform: translateX(26px);
1109
+ }
1110
+
1111
+ .slider,
1112
+ .slider:before {
1113
+ border-radius: 7px
1114
+ }
1115
+
1116
+ /* param container and content styling */
1117
+ .param {
1118
+ text-align: left;
1119
+ padding: 5px;
1120
+ border-bottom: 1px solid rgba(0, 0, 0, 0.355);
1121
+ transition: 1s;
1122
+ }
1123
+
1124
+ .param input,
1125
+ .section-card-header input {
1126
+ background-color: #ffffff11;
1127
+ border-radius: 7px;
1128
+ border: solid 1px;
1129
+ color: #181818;
1130
+ min-width: 40%;
1131
+ max-width: 70%;
1132
+ }
1133
+
1134
+
1135
+ .section-card-header input {
1136
+ min-width: calc(27px - 7px);
1137
+ }
1138
+
1139
+ .param p,
1140
+ .param i {
1141
+ font-size: .7em;
1142
+ margin-top: 4px;
1143
+ }
1144
+
1145
+ .param i {
1146
+ font-size: .7em;
1147
+ margin-bottom: 5px;
1148
+ }
1149
+
1150
+ .param p {
1151
+ padding-right: 5px;
1152
+ max-width: 777px;
1153
+ }
1154
+
1155
+ .param h5 {
1156
+ font-size: 1em;
1157
+ }
1158
+
1159
+ .param h5,
1160
+ p {
1161
+ margin: 5px;
1162
+ margin-left: 0px;
1163
+ margin-bottom: 0px;
1164
+ }
1165
+
1166
+ .param button {
1167
+ width: 20px;
1168
+ height: 20px;
1169
+ line-height: 0;
1170
+ padding: 1px;
1171
+ box-shadow: none;
1172
+ margin-bottom: 5px;
1173
+ }
1174
+
1175
+ .param-input {
1176
+ display: block;
1177
+ float: left;
1178
+ min-width: 100%;
1179
+ }
1180
+
1181
+ .param-input input {
1182
+ min-width: 70%;
1183
+ }
1184
+
1185
+ .param-input input[type="time"] {
1186
+ min-width: 35%;
1187
+ }
1188
+
1189
+ /* when requirement param is not met */
1190
+ .requirement-disable {
1191
+ pointer-events: none;
1192
+ filter: opacity(25%);
1193
+ }
1194
+
1195
+ /* configuration box page */
1196
+
1197
+ #config-box {
1198
+ min-width: 100%;
1199
+ min-height: 85vh;
1200
+ }
1201
+
1202
+
974
1203
 
975
1204
 
976
1205
  /* mobile only changes */
@@ -989,6 +1218,9 @@ select,
989
1218
  }
990
1219
  }
991
1220
 
1221
+
1222
+
1223
+
992
1224
  /* Dark Theme Support */
993
1225
  @media (prefers-color-scheme: dark) {
994
1226
  html.adaptive {
@@ -1031,6 +1263,9 @@ select,
1031
1263
  }
1032
1264
 
1033
1265
  h2,
1266
+ h3,
1267
+ h4,
1268
+ .header-footer h4,
1034
1269
  kbd,
1035
1270
  a {
1036
1271
  background-color: #111111;
@@ -1094,7 +1329,8 @@ select,
1094
1329
  }
1095
1330
 
1096
1331
  .input-list input,
1097
- .input-box textarea {
1332
+ .input-box textarea,
1333
+ #config-box {
1098
1334
  background-color: #282928;
1099
1335
  border-color: #e1e1e1;
1100
1336
  color: #e1e1e1
@@ -1110,5 +1346,28 @@ select,
1110
1346
  border-top: 16px solid #ccf3ff;
1111
1347
  }
1112
1348
 
1349
+ input:checked+.slider {
1350
+ background-color: #ccf3ff;
1351
+ }
1113
1352
 
1114
- }
1353
+ .param {
1354
+ border-color: rgba(255, 255, 255, 0.355);
1355
+ }
1356
+
1357
+ .param input,
1358
+ .section-card-header input {
1359
+ color: #e1e1e1;
1360
+ }
1361
+
1362
+ .section-card-header {
1363
+ background-color: #ffffff11;
1364
+ }
1365
+
1366
+
1367
+ #configuration-container {
1368
+ background-color: #ffffff07;
1369
+ border: 0;
1370
+ }
1371
+
1372
+
1373
+ }
@@ -0,0 +1,75 @@
1
+ <!-- Configuration page html -->
2
+ <!DOCTYPE html>
3
+ <html class="adaptive">
4
+
5
+ <head>
6
+ <title>EMHASS: Energy Management Optimization for Home Assistant</title>
7
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
8
+ <link rel="stylesheet" type="text/css" href="static/style.css?version=1">
9
+ <link rel="icon" type="image/x-icon" href="static/img/emhass_logo_short.svg">
10
+ <script src="static/configuration_script.js"></script>
11
+ </head>
12
+
13
+ <body style="margin: auto; align-items:center; text-align:center;">
14
+
15
+ <div>
16
+ <!-- Icons by feather https://github.com/feathericons/feather -->
17
+ <div id="top-links">
18
+ <!-- index page -->
19
+ <a href="index" title="Home" style="margin-right: 12px; cursor: pointer; z-index: 1">
20
+ <svg class="feather">
21
+ <use class="feather" href="static/img/feather-sprite.svg#home" />
22
+ </svg>
23
+ </a>
24
+ <a href="https://emhass.readthedocs.io/en/latest/">
25
+ <svg class="feather" title="EMHASS Docs" style="margin-right: 12px;" ;>
26
+ <use class="feather" href="static/img/feather-sprite.svg#book" />
27
+ </svg>
28
+ </a>
29
+ <a href="https://github.com/davidusb-geek/emhass" target="_blank" rel="noopener noreferrer">
30
+ <svg class="feather" title="EMHASS Git repo" style="margin-right: 0px;">
31
+ <use class="feather" href="static/img/feather-sprite.svg#git-branch" />
32
+ </svg>
33
+ </a>
34
+ </div>
35
+
36
+ <!-- Title -->
37
+ <img src="static/img/emhass_icon.png" alt="">
38
+ <h2>EMHASS: Energy Management Optimization for Home Assistant</h2>
39
+ </div>
40
+ <div class="header-footer">
41
+ <h4>Configuration:</h4>
42
+ <a id="json-toggle" title="List and Box view toggle">
43
+ <svg id="json" class="feather" class="header-footer-button">
44
+ <use class="feather" href="static/img/feather-sprite.svg#code" />
45
+ </svg>
46
+ </a>
47
+ </div>
48
+
49
+ <!-- parameter list/box elements section -->
50
+ <div id=configuration-container>
51
+ </div>
52
+ <!-- configuration buttons (defaults, save, yaml) -->
53
+ <div class="save_button header-footer">
54
+ <button style="margin-right: 5px;" type="button" id="yaml" title="Convert yaml to json" class="">YAML</button>
55
+ <button type="button" id="defaults" title="Restore to default parameter values" class="">Defaults</button>
56
+ <button type="button" id="save" title="Save Config to EMHASS" class="">Save</button>
57
+ <div class="loading-div"> <!-- dynamic tick/cross element -->
58
+ <div id=loader></div>
59
+ </div>
60
+ </div>
61
+ <!-- alert box -->
62
+ <div style="display: none;" id="alert" class="alert">
63
+ <div>
64
+ <span onclick="this.parentElement.parentElement.style.display='none';">&times;</span>
65
+ <p id="alert-text"></p>
66
+ </div>
67
+ </div>
68
+ <footer class="footer">
69
+ <p style="margin-top:10px; text-align:center;">&copy; MIT License | Copyright (c) 2021-2023 David
70
+ HERNANDEZ</p>
71
+ </footer>
72
+ </div>
73
+ </body>
74
+
75
+ </html>
@@ -1,10 +1,11 @@
1
+ <!-- Index page html -->
1
2
  <!DOCTYPE html>
2
3
  <html class="adaptive">
3
4
 
4
5
  <head>
5
6
  <title>EMHASS: Energy Management Optimization for Home Assistant</title>
6
7
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
- <link rel="stylesheet" type="text/css" href="static/style.css?version=1"> <!-- change version on stylesheet changes -->
8
+ <link rel="stylesheet" type="text/css" href="static/style.css?version=1">
8
9
  <link rel="icon" type="image/x-icon" href="static/img/emhass_logo_short.svg">
9
10
  <script src="static/script.js"></script>
10
11
  </head>
@@ -14,19 +15,25 @@
14
15
  <div>
15
16
  <!-- Icons by feather https://github.com/feathericons/feather -->
16
17
  <div id="top-links">
18
+ <!-- configuration page -->
19
+ <a href="configuration" title="Configuration Page" style="margin-right: 12px; cursor: pointer; z-index: 1">
20
+ <svg class="feather">
21
+ <use class="feather" href="static/img/feather-sprite.svg#settings" />
22
+ </svg>
23
+ </a>
17
24
  <!-- advanced or basic page switch -->
18
- <a id="basicOrAdvanced" style="margin-right: 24px; cursor: pointer; z-index: 1">
25
+ <a id="basicOrAdvanced" title="Advanced Toggle" style="margin-right: 24px; cursor: pointer; z-index: 1">
19
26
  <svg class="feather">
20
27
  <use class="feather" href="static/img/feather-sprite.svg#tool" />
21
28
  </svg>
22
29
  </a>
23
30
  <a href="https://emhass.readthedocs.io/en/latest/">
24
- <svg class="feather" style="margin-right: 12px;";>
31
+ <svg class="feather" title="EMHASS Docs" style="margin-right: 12px;" ;>
25
32
  <use class="feather" href="static/img/feather-sprite.svg#book" />
26
33
  </svg>
27
34
  </a>
28
35
  <a href="https://github.com/davidusb-geek/emhass" target="_blank" rel="noopener noreferrer">
29
- <svg class="feather" style="margin-right: 0px;" >
36
+ <svg class="feather" title="EMHASS Git repo" style="margin-right: 0px;">
30
37
  <use class="feather" href="static/img/feather-sprite.svg#git-branch" />
31
38
  </svg>
32
39
  </a>
@@ -39,18 +46,18 @@
39
46
 
40
47
  <div class="center">
41
48
  <div id=TabSelection class="form">
42
- <!-- Basic and Advance pages will be loaded here -->
49
+ <!-- Basic and Advance pages will be dynamically loaded here -->
43
50
  </div>
44
51
  </div>
45
- <!-- alert box element (for json parse issue) -->
52
+ <!-- alert box element -->
46
53
  <div style="display: none;" id="alert" class="alert">
47
54
  <div>
48
55
  <span onclick="this.parentElement.parentElement.style.display='none';">&times;</span>
49
56
  <p id="alert-text"></p>
50
57
  </div>
51
58
  </div>
52
- <!-- -->
53
59
  <br>
60
+
54
61
  <!-- dynamic table/diagram elements section -->
55
62
  </div>
56
63
  <div id="template"> <!-- table/diagram container element -->
@@ -60,7 +67,7 @@
60
67
  </div>
61
68
  {% endfor %}
62
69
  <div>
63
- <!-- -->
70
+
64
71
  <footer class="footer">
65
72
  <p style="margin-top:10px; text-align:center;">&copy; MIT License | Copyright (c) 2021-2023 David
66
73
  HERNANDEZ</p>