emhass 0.10.6__py3-none-any.whl → 0.15.5__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 */
@@ -161,7 +162,6 @@ a:active {
161
162
 
162
163
  a:active,
163
164
  a:hover {
164
- outline-width: 0;
165
165
  outline: 0;
166
166
  }
167
167
 
@@ -216,7 +216,7 @@ blockquote> :last-child {
216
216
  margin-bottom: 0;
217
217
  }
218
218
 
219
- padding b,
219
+ b,
220
220
  strong {
221
221
  font-weight: inherit;
222
222
  font-weight: 600;
@@ -337,7 +337,6 @@ hr::after {
337
337
  }
338
338
 
339
339
  img {
340
- border-style: none;
341
340
  border: 0;
342
341
  max-width: 50%;
343
342
  }
@@ -450,6 +449,7 @@ html [type="button"],
450
449
  [type="reset"],
451
450
  [type="submit"] {
452
451
  -webkit-appearance: button;
452
+ appearance: button;
453
453
  }
454
454
 
455
455
  button::-moz-focus-inner,
@@ -502,6 +502,7 @@ textarea {
502
502
 
503
503
  [type="search"] {
504
504
  -webkit-appearance: textfield;
505
+ appearance: textfield;
505
506
  outline-offset: -2px;
506
507
  }
507
508
 
@@ -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 {
@@ -673,7 +679,7 @@ button {
673
679
  .mystyle,
674
680
  .main-svg {
675
681
  font-size: 11pt;
676
- font-family: Arial;
682
+ font-family: Arial, sans-serif;
677
683
  border-collapse: collapse;
678
684
  border-style: hidden;
679
685
  }
@@ -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;
@@ -913,7 +919,7 @@ select,
913
919
  .input-buttons {
914
920
  max-width: 50%;
915
921
  display: flex;
916
- align-items: "center";
922
+ align-items: center;
917
923
  align-self: center;
918
924
  align-items: center;
919
925
  box-sizing: inherit;
@@ -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,227 @@ 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 5px 0 0;
1162
+ }
1163
+
1164
+ .param button {
1165
+ width: 20px;
1166
+ height: 20px;
1167
+ line-height: 0;
1168
+ padding: 1px;
1169
+ box-shadow: none;
1170
+ margin-bottom: 5px;
1171
+ }
1172
+
1173
+ .param-input {
1174
+ display: block;
1175
+ float: left;
1176
+ min-width: 100%;
1177
+ }
1178
+
1179
+ .param-input input {
1180
+ min-width: 70%;
1181
+ }
1182
+
1183
+ .param-input input[type="time"] {
1184
+ min-width: 35%;
1185
+ }
1186
+
1187
+ /* when requirement param is not met */
1188
+ .requirement-disable {
1189
+ pointer-events: none;
1190
+ filter: opacity(25%);
1191
+ }
1192
+
1193
+ /* configuration box page */
1194
+
1195
+ #config-box {
1196
+ min-width: 100%;
1197
+ min-height: 85vh;
1198
+ }
1199
+
1200
+
974
1201
 
975
1202
 
976
1203
  /* mobile only changes */
@@ -989,6 +1216,9 @@ select,
989
1216
  }
990
1217
  }
991
1218
 
1219
+
1220
+
1221
+
992
1222
  /* Dark Theme Support */
993
1223
  @media (prefers-color-scheme: dark) {
994
1224
  html.adaptive {
@@ -1031,6 +1261,9 @@ select,
1031
1261
  }
1032
1262
 
1033
1263
  h2,
1264
+ h3,
1265
+ h4,
1266
+ .header-footer h4,
1034
1267
  kbd,
1035
1268
  a {
1036
1269
  background-color: #111111;
@@ -1094,7 +1327,8 @@ select,
1094
1327
  }
1095
1328
 
1096
1329
  .input-list input,
1097
- .input-box textarea {
1330
+ .input-box textarea,
1331
+ #config-box {
1098
1332
  background-color: #282928;
1099
1333
  border-color: #e1e1e1;
1100
1334
  color: #e1e1e1
@@ -1110,5 +1344,28 @@ select,
1110
1344
  border-top: 16px solid #ccf3ff;
1111
1345
  }
1112
1346
 
1347
+ input:checked+.slider {
1348
+ background-color: #ccf3ff;
1349
+ }
1113
1350
 
1114
- }
1351
+ .param {
1352
+ border-color: rgba(255, 255, 255, 0.355);
1353
+ }
1354
+
1355
+ .param input,
1356
+ .section-card-header input {
1357
+ color: #e1e1e1;
1358
+ }
1359
+
1360
+ .section-card-header {
1361
+ background-color: #ffffff11;
1362
+ }
1363
+
1364
+
1365
+ #configuration-container {
1366
+ background-color: #ffffff07;
1367
+ border: 0;
1368
+ }
1369
+
1370
+
1371
+ }
@@ -0,0 +1,77 @@
1
+ <!-- Configuration page html -->
2
+ <!DOCTYPE html>
3
+ <html lang="en" 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
+ <button type="button" class="close-btn" onclick="this.parentElement.parentElement.style.display='none';" aria-label="Close">
65
+ &times;
66
+ </button>
67
+ <p id="alert-text"></p>
68
+ </div>
69
+ </div>
70
+ <footer class="footer">
71
+ <p style="margin-top:10px; text-align:center;">&copy; MIT License | Copyright (c) 2021-2025 David
72
+ HERNANDEZ</p>
73
+ </footer>
74
+ </div>
75
+ </body>
76
+
77
+ </html>
@@ -1,10 +1,11 @@
1
+ <!-- Index page html -->
1
2
  <!DOCTYPE html>
2
- <html class="adaptive">
3
+ <html lang="en" class="adaptive">
3
4
 
4
5
  <head>
5
- <title>EMHASS: Energy Management Optimization for Home Assistant</title>
6
+ <meta charset="UTF-8"> <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,32 +46,34 @@
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
- <span onclick="this.parentElement.parentElement.style.display='none';">&times;</span>
55
+ <button type="button" class="close-btn" onclick="this.parentElement.parentElement.style.display='none';" aria-label="Close">
56
+ &times;
57
+ </button>
49
58
  <p id="alert-text"></p>
50
59
  </div>
51
60
  </div>
52
- <!-- -->
53
61
  <br>
62
+
54
63
  <!-- dynamic table/diagram elements section -->
55
64
  </div>
56
65
  <div id="template"> <!-- table/diagram container element -->
57
66
  {% for plot in injection_dict %} <!-- diagrams/tables elements will be added here -->
58
67
  <div class="table_div">
59
- {{injection_dict[plot]}}
68
+ {{injection_dict[plot] | mark_safe}}
60
69
  </div>
61
70
  {% endfor %}
62
71
  <div>
63
- <!-- -->
72
+
64
73
  <footer class="footer">
65
- <p style="margin-top:10px; text-align:center;">&copy; MIT License | Copyright (c) 2021-2023 David
74
+ <p style="margin-top:10px; text-align:center;">&copy; MIT License | Copyright (c) 2021-2025 David
66
75
  HERNANDEZ</p>
67
76
  </footer>
68
77
  </body>
69
78
 
70
- </html>
79
+ </html>
@@ -1,5 +1,4 @@
1
- {% for plot in injection_dict %} <!-- diagrams/tables elements will be added here -->
2
- <div class="table_div">
3
- {{injection_dict[plot]}}
4
- </div>
5
- {% endfor %}
1
+ {% for plot in injection_dict %}
2
+ <!-- diagrams/tables elements will be added here -->
3
+ <div class="table_div">{{injection_dict[plot] | mark_safe}}</div>
4
+ {% endfor %}