mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-08-26 07:49:40 +00:00
push devices automation functions
This commit is contained in:
@ -0,0 +1,11 @@
|
|||||||
|
<svg width="12" height="22" viewBox="0 0 12 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M7.37276 13.5952V2.88054C7.37276 1.42768 6.19513 0.250061 4.74244 0.250061C3.28959 0.250061 2.11197 1.42768 2.11197 2.88054V13.5952C0.935008 14.4232 0.166016 15.7919 0.166016 17.3403C0.166016 19.8678 2.21495 21.9167 4.74244 21.9167C7.26994 21.9167 9.31887 19.8678 9.31887 17.3403C9.31887 15.7919 8.54972 14.4232 7.37276 13.5952Z" fill="#D8D8D8"/>
|
||||||
|
<path d="M4.74264 20.4178C2.99984 20.4178 1.58203 18.9998 1.58203 17.2572C1.58203 15.9338 2.40442 14.7555 3.63841 14.2958V2.88041C3.63841 2.27143 4.13366 1.77618 4.74264 1.77618C5.35145 1.77618 5.84686 2.27143 5.84686 2.88041V14.2958C7.08069 14.7553 7.90324 15.9336 7.90324 17.257C7.90324 18.9998 6.48543 20.4178 4.74264 20.4178Z" fill="#F3E8D7"/>
|
||||||
|
<path d="M3.63841 12.8968V14.2961C2.40458 14.7558 1.58203 15.9341 1.58203 17.2575C1.58203 19.0001 3.00001 20.4181 4.7428 20.4181C6.48543 20.4181 7.9034 19.0001 7.9034 17.2575C7.9034 15.9341 7.08085 14.7558 5.84703 14.2961V12.8968H3.63841Z" fill="#023DFE" fill-opacity="0.6"/>
|
||||||
|
<path d="M5.84746 14.2961V12.8968H3.63901V14.2961C3.63901 14.2961 5.16558 15.0044 5.16558 17.2575C5.16558 18.51 4.43312 19.5947 3.37402 20.1058C3.78844 20.3059 4.25294 20.4181 4.74323 20.4181C6.48586 20.4181 7.90384 19.0001 7.90384 17.2575C7.90384 15.9339 7.08129 14.7558 5.84746 14.2961Z" fill="#2F66D3"/>
|
||||||
|
<path d="M11.0168 7.87672H9.11994C8.93926 7.87672 8.79297 7.73026 8.79297 7.54975C8.79297 7.36924 8.93926 7.22278 9.11994 7.22278H11.0168C11.1973 7.22278 11.3436 7.36924 11.3436 7.54975C11.3438 7.73026 11.1973 7.87672 11.0168 7.87672Z" fill="#0D6E9A"/>
|
||||||
|
<path d="M9.98117 5.22682H9.11994C8.93926 5.22682 8.79297 5.08036 8.79297 4.89985C8.79297 4.71933 8.93926 4.57288 9.11994 4.57288H9.98117C10.1617 4.57288 10.3081 4.71933 10.3081 4.89985C10.3081 5.08036 10.1617 5.22682 9.98117 5.22682Z" fill="#0D6E9A"/>
|
||||||
|
<path d="M10.2863 2.57655H9.11994C8.93926 2.57655 8.79297 2.43009 8.79297 2.24958C8.79297 2.06907 8.93926 1.92261 9.11994 1.92261H10.2863C10.467 1.92261 10.6133 2.06907 10.6133 2.24958C10.6133 2.43009 10.467 2.57655 10.2863 2.57655Z" fill="#0D6E9A"/>
|
||||||
|
<path d="M10.2863 13.1768H9.11994C8.93926 13.1768 8.79297 13.0303 8.79297 12.8498C8.79297 12.6691 8.93926 12.5228 9.11994 12.5228H10.2863C10.467 12.5228 10.6133 12.6691 10.6133 12.8498C10.6133 13.0303 10.467 13.1768 10.2863 13.1768Z" fill="#0D6E9A"/>
|
||||||
|
<path d="M9.98117 10.5266H9.11994C8.93926 10.5266 8.79297 10.3802 8.79297 10.1997C8.79297 10.0191 8.93926 9.87268 9.11994 9.87268H9.98117C10.1617 9.87268 10.3081 10.0191 10.3081 10.1997C10.3081 10.3802 10.1617 10.5266 9.98117 10.5266Z" fill="#0D6E9A"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.6 KiB |
14
assets/icons/functions_icons/automation_functions/motion.svg
Normal file
14
assets/icons/functions_icons/automation_functions/motion.svg
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M16.6376 6.30312C16.0754 5.97851 15.3565 6.17117 15.0319 6.73336L13.9543 8.5998C13.8964 8.70015 13.7427 8.63652 13.7727 8.5246L14.64 5.28773C14.808 4.66066 14.4359 4.01613 13.8089 3.84813C13.1818 3.68012 12.5373 4.05223 12.3693 4.6793L11.2191 8.97183C11.1891 9.08378 11.0242 9.06206 11.0242 8.94616V3.96016C11.0242 3.31969 10.5221 2.77828 9.8818 2.76071C9.21755 2.7425 8.67333 3.27555 8.67333 3.9357V8.93913C8.67333 9.05503 8.50848 9.07671 8.47849 8.9648L7.33653 4.70293C7.17075 4.08426 6.5456 3.69129 5.92263 3.84004C5.2763 3.99438 4.88857 4.65012 5.05943 5.28777L6.98306 12.4668C6.99306 12.5041 6.98341 12.5455 6.95407 12.5706C6.91439 12.6046 6.85689 12.6013 6.82142 12.5658L5.36021 11.1046C4.62787 10.3723 3.44045 10.3723 2.7081 11.1046C2.30303 11.5097 2.30303 12.1665 2.7081 12.5715L6.09368 15.9571C6.09368 15.9571 6.76001 16.574 7.39622 17.163C7.69571 17.4403 7.86591 17.8298 7.86591 18.2379V19.6558C7.86591 19.8459 8.02005 20.0001 8.2102 20.0001H13.8934C14.0836 20.0001 14.2377 19.8459 14.2377 19.6558V18.2049C14.2377 17.8588 14.3605 17.5233 14.5873 17.2619C15.2967 16.4442 15.7259 15.377 15.7259 14.2096V10.5709C15.7259 10.3495 15.7842 10.1319 15.8949 9.94019L17.0677 7.90882C17.3924 7.3466 17.1998 6.62769 16.6376 6.30312Z" fill="#EB9C8D"/>
|
||||||
|
<path d="M16.6369 6.30318C16.4275 6.18232 16.1964 6.13318 15.9721 6.1481C16.0778 6.45798 16.0544 6.81013 15.8778 7.11599L15.0957 8.47056C14.729 9.10568 14.536 9.82614 14.536 10.5595V13.4168C14.536 14.5124 14.1579 15.5197 13.5251 16.3154C13.2211 16.6975 13.0478 17.1669 13.0478 17.6552V18.1918C13.0478 18.7526 12.5931 19.2073 12.0323 19.2073H7.86523V19.6559C7.86523 19.846 8.01937 20.0002 8.20953 20.0002H13.8928C14.083 20.0002 14.2371 19.846 14.2371 19.6559V18.205C14.2371 17.8589 14.3599 17.5234 14.5867 17.2619C15.296 16.4443 15.7253 15.3771 15.7253 14.2097V10.5709C15.7253 10.3495 15.7836 10.132 15.8943 9.94028L17.0671 7.90892C17.3917 7.34666 17.199 6.62779 16.6369 6.30318Z" fill="#D78878"/>
|
||||||
|
<path d="M18.1332 8.82153C18.0828 8.82153 18.0316 8.80867 17.9848 8.78164C17.8426 8.69953 17.7939 8.51774 17.876 8.37551C18.4575 7.36813 18.1112 6.0754 17.1038 5.4938C16.9616 5.41169 16.9129 5.22985 16.995 5.08767C17.077 4.94544 17.2588 4.89677 17.4011 4.97884C18.6924 5.72434 19.1364 7.38149 18.3909 8.67285C18.3359 8.76824 18.2359 8.82153 18.1332 8.82153Z" fill="#E94444"/>
|
||||||
|
<path d="M15.9106 5.21552C15.7502 5.21552 15.618 5.08775 15.6135 4.92642C15.5879 4.00006 14.9452 3.18568 14.0505 2.94592C13.8919 2.90342 13.7978 2.74037 13.8403 2.58178C13.8827 2.42319 14.0458 2.32901 14.2044 2.37155C15.3512 2.67881 16.1751 3.72268 16.2079 4.90998C16.2124 5.07408 16.0831 5.21088 15.9189 5.21541C15.9162 5.21549 15.9134 5.21552 15.9106 5.21552Z" fill="#FFC344"/>
|
||||||
|
<path d="M7.61372 3.338C7.57681 3.338 7.53927 3.33109 7.5029 3.31648C7.35056 3.25523 7.27669 3.08207 7.33794 2.92968C7.75267 1.89808 8.73798 1.23145 9.84809 1.23145C10.0123 1.23145 10.1454 1.36453 10.1454 1.52875C10.1454 1.69297 10.0123 1.82605 9.84809 1.82605C8.98208 1.82605 8.21337 2.34629 7.88966 3.15148C7.84306 3.2675 7.73153 3.338 7.61372 3.338Z" fill="#E94444"/>
|
||||||
|
<path d="M3.86829 5.90389C3.737 5.90389 3.61688 5.81627 3.58129 5.68346C3.39462 4.98674 3.4909 4.25818 3.85243 3.63205C4.21395 3.00592 4.79672 2.55823 5.49344 2.37155C5.65195 2.32901 5.81508 2.42315 5.85758 2.58178C5.90008 2.74038 5.80594 2.90346 5.64731 2.94592C5.10403 3.09147 4.6495 3.44076 4.36739 3.92936C4.08528 4.41795 4.01008 4.98623 4.15567 5.52951C4.19817 5.6881 4.10403 5.85119 3.9454 5.89365C3.91969 5.9006 3.89379 5.90389 3.86829 5.90389Z" fill="#FFC344"/>
|
||||||
|
<path d="M0.297178 10.5924C0.253076 10.5924 0.20835 10.5826 0.166123 10.5618C0.0187797 10.4893 -0.0418842 10.3111 0.0306156 10.1638C0.214131 9.79076 0.458115 9.45069 0.755731 9.15303C0.928739 8.98002 1.11589 8.81991 1.31206 8.67709C1.44487 8.58041 1.63081 8.60975 1.72741 8.74248C1.82405 8.87522 1.79475 9.06123 1.66202 9.15784C1.49081 9.28245 1.32737 9.42233 1.1762 9.57346C0.924715 9.82494 0.718778 10.1119 0.56413 10.4263C0.512451 10.5314 0.406904 10.5924 0.297178 10.5924Z" fill="#E94444"/>
|
||||||
|
<path d="M1.1723 12.1352C1.00809 12.1352 0.875 12.0021 0.875 11.8378C0.875 11.1525 1.14191 10.508 1.62656 10.0234C2.26953 9.38043 3.12437 9.02637 4.03359 9.02637C4.19781 9.02637 4.33089 9.15945 4.33089 9.32367C4.33089 9.48789 4.19777 9.62098 4.03359 9.62098C3.28316 9.62098 2.57765 9.91324 2.04703 10.4439C1.67469 10.8162 1.46965 11.3112 1.46965 11.8378C1.46965 12.0021 1.33652 12.1352 1.1723 12.1352Z" fill="#E94444"/>
|
||||||
|
<path d="M7.81813 1.21039C7.72243 1.21039 7.62848 1.16429 7.5711 1.07887C7.4795 0.942576 7.51571 0.75785 7.652 0.666249C8.30051 0.23039 9.06001 0 9.84832 0C10.0125 0 10.1456 0.133086 10.1456 0.297304C10.1456 0.461523 10.0125 0.594608 9.84832 0.594608C9.1786 0.594608 8.53383 0.790038 7.98372 1.15976C7.93282 1.19402 7.87513 1.21039 7.81813 1.21039Z" fill="#E94444"/>
|
||||||
|
<path d="M19.2004 9.43762C19.15 9.43762 19.0989 9.42477 19.052 9.39774C18.9098 9.31563 18.8611 9.13379 18.9432 8.9916C19.4691 8.08067 19.5323 6.95817 19.1122 5.98891C19.0469 5.83825 19.1161 5.66317 19.2668 5.59786C19.4174 5.53251 19.5925 5.60177 19.6578 5.75243C20.1524 6.89364 20.0778 8.21567 19.4582 9.28891C19.4031 9.3843 19.3032 9.43762 19.2004 9.43762Z" fill="#E94444"/>
|
||||||
|
<path d="M8.44359 13.3371C9.39062 13.0616 10.4202 13.3041 11.1531 14.0207C11.6853 14.541 11.9825 15.2331 11.9898 15.9693C11.9927 16.2502 11.9536 16.5278 11.8738 16.7942C11.8267 16.9516 11.916 17.1173 12.0733 17.1644C12.1017 17.1729 12.1305 17.177 12.1587 17.177C12.2867 17.177 12.4048 17.0937 12.4434 16.9649C12.5405 16.6412 12.5879 16.3041 12.5845 15.9633C12.5755 15.068 12.2148 14.2271 11.5688 13.5956C10.6698 12.7165 9.41304 12.4358 8.27746 12.7662C8.0789 12.8239 7.86027 12.7646 7.70687 12.6112L6.76953 11.6738L6.98328 12.4715C6.99469 12.5141 6.97609 12.559 6.93789 12.5811C6.89988 12.603 6.85195 12.5968 6.82078 12.5661L7.28641 13.0316C7.5932 13.3384 8.03656 13.4556 8.44359 13.3371Z" fill="#D78878"/>
|
||||||
|
<path d="M13.7719 8.52433L14.1717 7.03223L12.7684 9.46281C12.6863 9.60499 12.735 9.78683 12.8772 9.86894C12.9241 9.89597 12.9752 9.90882 13.0256 9.90882C13.1284 9.90882 13.2283 9.8555 13.2834 9.76011L13.9534 8.59957C13.8954 8.69988 13.7419 8.63625 13.7719 8.52433Z" fill="#D78878"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 6.2 KiB |
@ -0,0 +1,18 @@
|
|||||||
|
<svg width="20" height="19" viewBox="0 0 20 19" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M10 1.39551L0.43631 14.5042C-0.648319 15.9909 0.413536 18.08 2.25384 18.08H17.7462C19.5865 18.08 20.6483 15.9909 19.5637 14.5042L10 1.39551Z" fill="#F1FAFF"/>
|
||||||
|
<path d="M19.5625 14.5031L9.99968 1.39551L8.36328 3.63848L16.2897 14.503C17.3747 15.9902 16.3125 18.08 14.4716 18.08H17.7445C19.5853 18.08 20.6475 15.9902 19.5625 14.5031Z" fill="#C7EEFB"/>
|
||||||
|
<path d="M11.9176 5.4031H8.09515C7.05127 5.4031 6.20508 4.55687 6.20508 3.51302V1.76807C6.20508 1.66022 6.29254 1.57275 6.40039 1.57275H13.6124C13.7203 1.57275 13.8077 1.66022 13.8077 1.76807V3.51302C13.8077 4.55687 12.9615 5.4031 11.9176 5.4031Z" fill="#E0DDE2"/>
|
||||||
|
<path d="M13.6131 1.57275H12.5435V2.24335C12.5435 3.28962 11.6953 4.1378 10.6491 4.1378H6.83536C6.64466 4.1378 6.46071 4.10932 6.28711 4.05694C6.52227 4.83582 7.2451 5.40314 8.1007 5.40314H11.9144C12.9607 5.40314 13.8088 4.55496 13.8088 3.50869V1.7685C13.8088 1.66041 13.7212 1.57275 13.6131 1.57275Z" fill="#C8C1C9"/>
|
||||||
|
<path d="M15.0484 2.26481H4.96485C4.85699 2.26481 4.76953 2.17734 4.76953 2.06949V0.195316C4.76953 0.0874625 4.85699 0 4.96485 0H15.0484C15.1562 0 15.2437 0.0874625 15.2437 0.195316V2.06949C15.2437 2.17738 15.1562 2.26481 15.0484 2.26481Z" fill="#E0DDE2"/>
|
||||||
|
<path d="M15.0479 0H13.9042V0.729545C13.9042 0.837672 13.8165 0.925329 13.7084 0.925329H4.76953V2.06906C4.76953 2.17719 4.85719 2.26485 4.96532 2.26485H15.0479C15.156 2.26485 15.2437 2.17719 15.2437 2.06906V0.195785C15.2437 0.0876579 15.156 0 15.0479 0Z" fill="#C8C1C9"/>
|
||||||
|
<path d="M10.0073 4.26404C10.2842 4.26404 10.5087 4.03955 10.5087 3.76264C10.5087 3.48572 10.2842 3.26123 10.0073 3.26123C9.73035 3.26123 9.50586 3.48572 9.50586 3.76264C9.50586 4.03955 9.73035 4.26404 10.0073 4.26404Z" fill="#FA2A3B"/>
|
||||||
|
<path d="M9.8893 9.28347C10.3885 9.28347 10.7932 8.87876 10.7932 8.37953C10.7932 7.8803 10.3885 7.47559 9.8893 7.47559C9.39006 7.47559 8.98535 7.8803 8.98535 8.37953C8.98535 8.87876 9.39006 9.28347 9.8893 9.28347Z" fill="#62D8F9"/>
|
||||||
|
<path d="M9.88961 7.47559C9.82531 7.47559 9.76262 7.48242 9.70215 7.49516C10.1114 7.58148 10.4186 7.94457 10.4186 8.37953C10.4186 8.81449 10.1114 9.17758 9.70215 9.2639C9.76266 9.27668 9.82531 9.28347 9.88961 9.28347C10.3888 9.28347 10.7936 8.87875 10.7936 8.37953C10.7936 7.88031 10.3889 7.47559 9.88961 7.47559Z" fill="#00BEF7"/>
|
||||||
|
<path d="M13.0358 12.1673L11.4546 11.9102L10.5953 10.2506C10.5183 10.077 10.3974 9.83939 10.1304 9.75986L9.12693 9.45876C9.01685 9.43196 8.91099 9.42211 8.72325 9.45157L6.58333 9.94857C6.4552 9.97837 6.34074 10.0503 6.25836 10.1528L5.1158 11.5749C4.91267 11.8278 4.95295 12.1974 5.2058 12.4006C5.31424 12.4878 5.44416 12.5301 5.57323 12.5301C5.74511 12.5301 5.91542 12.455 6.03144 12.3106L7.04685 11.0468L8.0512 10.8135L7.46143 12.779C7.4501 12.8121 7.44647 12.8548 7.43026 12.9482L7.09752 15.3102L5.54569 16.6566C5.30069 16.8692 5.2744 17.2401 5.48698 17.4851C5.60315 17.619 5.76651 17.6875 5.93085 17.6875C6.06726 17.6875 6.20434 17.6403 6.31547 17.5439L8.03331 16.0534C8.14039 15.9605 8.21023 15.8321 8.23 15.6917L8.50207 13.7605L8.53828 13.7713L10.0084 15.487L10.8786 17.3765C10.9777 17.5915 11.1902 17.7182 11.4124 17.7182C11.4946 17.7182 11.5782 17.7009 11.6578 17.6642C11.9524 17.5285 12.0812 17.1797 11.9455 16.8851L11.041 14.9214C11.0183 14.8721 10.9889 14.8262 10.9536 14.7849L9.72272 13.3485L10.146 11.9377L10.5473 12.7127C10.6327 12.8777 10.7912 12.9925 10.9745 13.0223L12.8473 13.3268C12.8792 13.332 12.911 13.3345 12.9423 13.3345C13.2251 13.3345 13.4744 13.1295 13.5212 12.8413C13.5733 12.5211 13.356 12.2194 13.0358 12.1673Z" fill="#62D8F9"/>
|
||||||
|
<path d="M8.30566 9.54864C8.4934 9.51919 8.59872 9.53106 8.7088 9.55786L9.71225 9.85896C9.97929 9.93849 10.1002 10.1762 10.1772 10.3497L11.1316 12.2035C11.156 12.251 11.2017 12.284 11.2545 12.2921L13.5191 12.6415C13.4757 12.404 13.2881 12.2083 13.0362 12.1673L11.4549 11.9102L10.5957 10.2506C10.5187 10.077 10.3978 9.83939 10.1307 9.75986L9.12728 9.45876C9.0172 9.43196 8.91134 9.42211 8.7236 9.45157L8.30566 9.54864Z" fill="#00BEF7"/>
|
||||||
|
<path d="M11.0419 14.9213C11.0192 14.872 10.9898 14.8261 10.9544 14.7849L9.72357 13.3484L10.1469 11.938L10.0931 11.8342C10.0232 11.699 9.82428 11.7176 9.78052 11.8634L9.36196 13.2581C9.32653 13.3761 9.3536 13.5042 9.43384 13.5978L10.5359 14.8841C10.5712 14.9253 10.6007 14.9712 10.6234 15.0205L11.5279 16.9842C11.649 17.2471 11.559 17.5529 11.3288 17.7121C11.3567 17.7161 11.3849 17.7183 11.4133 17.7183C11.4954 17.7183 11.579 17.7009 11.6586 17.6642C11.9532 17.5285 12.082 17.1797 11.9463 16.8851L11.0419 14.9213Z" fill="#00BEF7"/>
|
||||||
|
<path d="M3.21138 16.8311C3.05665 16.8311 2.92712 16.7102 2.91845 16.5538C2.85149 15.3472 3.77866 14.311 4.98521 14.2441C5.14751 14.2357 5.28576 14.359 5.2947 14.521C5.30369 14.6829 5.17974 14.8215 5.01778 14.8305C4.13453 14.8795 3.4558 15.638 3.50483 16.5212C3.51381 16.6831 3.38986 16.8217 3.22791 16.8307C3.2224 16.831 3.21685 16.8311 3.21138 16.8311Z" fill="#00BEF7"/>
|
||||||
|
<path d="M4.40203 16.8436C4.24731 16.8436 4.11778 16.7226 4.10911 16.5662C4.07606 15.9709 4.53352 15.4597 5.12879 15.4267C5.29043 15.4178 5.42926 15.5417 5.43824 15.7037C5.44723 15.8656 5.32324 16.0041 5.16129 16.0131C4.88938 16.0282 4.68039 16.2618 4.69547 16.5338C4.70446 16.6957 4.58047 16.8342 4.41852 16.8432C4.41305 16.8434 4.4075 16.8436 4.40203 16.8436Z" fill="#00BEF7"/>
|
||||||
|
<path d="M15.7026 12.3836C15.6998 12.3836 15.697 12.3835 15.6943 12.3835C15.5321 12.3789 15.4044 12.2438 15.4089 12.0817C15.4335 11.1975 14.7342 10.458 13.8499 10.4334C13.6878 10.4289 13.5601 10.2938 13.5646 10.1317C13.5691 9.96955 13.705 9.84185 13.8663 9.8463C15.0742 9.87994 16.0297 10.8901 15.996 12.0981C15.9915 12.2574 15.8609 12.3836 15.7026 12.3836Z" fill="#00BEF7"/>
|
||||||
|
<path d="M14.5123 12.4288C14.5095 12.4288 14.5067 12.4287 14.5039 12.4286C14.3418 12.4241 14.2141 12.289 14.2186 12.1269C14.2223 11.9951 14.1743 11.8696 14.0837 11.7738C13.993 11.6779 13.8705 11.6231 13.7386 11.6194C13.5765 11.6149 13.4487 11.4798 13.4532 11.3177C13.4578 11.1556 13.5914 11.0276 13.755 11.0324C14.0437 11.0404 14.3119 11.1604 14.5104 11.3702C14.7089 11.5801 14.8137 11.8546 14.8057 12.1433C14.8012 12.3026 14.6707 12.4288 14.5123 12.4288Z" fill="#00BEF7"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 6.1 KiB |
@ -0,0 +1,23 @@
|
|||||||
|
<svg width="23" height="22" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M13.7415 21.7502H2.6543C1.60427 21.7502 0.75 20.8959 0.75 19.8459V4.52686C0.75 3.47683 1.60427 2.62256 2.6543 2.62256H13.7415C14.7916 2.62256 15.6458 3.47683 15.6458 4.52686V19.8459C15.6458 20.8959 14.7916 21.7502 13.7415 21.7502Z" fill="#FF5E82"/>
|
||||||
|
<path d="M13.7409 2.62256H8.19727V21.7502H13.7409C14.7909 21.7502 15.6452 20.8959 15.6452 19.8459V4.52686C15.6452 3.47683 14.7909 2.62256 13.7409 2.62256Z" fill="#B7457D"/>
|
||||||
|
<path d="M2.6543 3.89209C2.30429 3.89209 2.01953 4.17685 2.01953 4.52686V19.8459C2.01953 20.1959 2.30429 20.4806 2.6543 20.4806H13.7415C14.0915 20.4806 14.3763 20.1959 14.3763 19.8459V4.52686C14.3763 4.17685 14.0915 3.89209 13.7415 3.89209H2.6543Z" fill="#F2FAFF"/>
|
||||||
|
<path d="M13.7409 3.89258H8.19727V20.4811H13.7409C14.0909 20.4811 14.3757 20.1964 14.3757 19.8464V4.52734C14.3757 4.17733 14.0909 3.89258 13.7409 3.89258Z" fill="#C8EAFA"/>
|
||||||
|
<path d="M5.10314 10.179C4.94069 10.179 4.77823 10.1171 4.65432 9.99306L3.45741 8.79615C3.20951 8.54825 3.20951 8.14636 3.45741 7.89846C3.70526 7.65056 4.1072 7.65056 4.35509 7.89846L5.10319 8.64655L7.04823 6.70155C7.29613 6.45365 7.69806 6.45365 7.94592 6.70155C8.19382 6.94945 8.19382 7.35134 7.94592 7.59923L5.55205 9.99306C5.42806 10.1171 5.26556 10.179 5.10314 10.179Z" fill="#5E54AC"/>
|
||||||
|
<path d="M5.10314 14.3445C4.94069 14.3445 4.77823 14.2826 4.65432 14.1586L3.45741 12.9617C3.20951 12.7138 3.20951 12.3119 3.45741 12.064C3.70526 11.8161 4.1072 11.8161 4.35509 12.064L5.10319 12.8121L7.04823 10.8671C7.29613 10.6192 7.69806 10.6192 7.94592 10.8671C8.19382 11.115 8.19382 11.5169 7.94592 11.7648L5.55205 14.1586C5.42806 14.2825 5.26556 14.3445 5.10314 14.3445Z" fill="#5E54AC"/>
|
||||||
|
<path d="M6.17603 17.3067L6.99674 16.486C7.24463 16.2381 7.24463 15.8362 6.99674 15.5883C6.74888 15.3404 6.34695 15.3404 6.09905 15.5883L5.27834 16.409L4.45763 15.5883C4.20978 15.3404 3.80784 15.3404 3.55995 15.5883C3.31205 15.8362 3.31205 16.2381 3.55995 16.486L4.38066 17.3067L3.55995 18.1274C3.31205 18.3753 3.31205 18.7772 3.55995 19.0251C3.68389 19.149 3.84635 19.211 4.00881 19.211C4.17127 19.211 4.33373 19.149 4.45763 19.025L5.27834 18.2043L6.09905 19.0251C6.22296 19.149 6.38542 19.211 6.54787 19.211C6.71033 19.211 6.87279 19.149 6.99669 19.025C7.24459 18.7771 7.24459 18.3752 6.99669 18.1273L6.17603 17.3067Z" fill="#5E54AC"/>
|
||||||
|
<path d="M21.7826 21.7503H17.5508C17.2002 21.7503 16.916 21.4661 16.916 21.1156V16.8838C16.916 16.5332 17.2002 16.249 17.5508 16.249H21.7826C22.1331 16.249 22.4173 16.5332 22.4173 16.8838V21.1156C22.4173 21.4661 22.1331 21.7503 21.7826 21.7503Z" fill="#F2FAFF"/>
|
||||||
|
<path d="M21.7829 16.249H19.667V21.7503H21.7829C22.1334 21.7503 22.4176 21.4661 22.4176 21.1156V16.8838C22.4176 16.5332 22.1334 16.249 21.7829 16.249Z" fill="#C8EAFA"/>
|
||||||
|
<path d="M20.513 13.71H18.8203C17.7703 13.71 16.916 14.5642 16.916 15.6143V16.8838H22.4173V15.6143C22.4173 14.5642 21.5631 13.71 20.513 13.71Z" fill="#A4E9FF"/>
|
||||||
|
<path d="M22.4176 15.6143C22.4176 14.5642 21.5634 13.71 20.5133 13.71H19.667V16.8838H22.4176V15.6143Z" fill="#91BBFF"/>
|
||||||
|
<path d="M11.5833 5.16162H4.8125C4.46194 5.16162 4.17773 4.87742 4.17773 4.52686V3.6805C4.17773 2.67237 4.96514 1.84472 5.95728 1.78027C6.23285 0.802262 7.13299 0.0834961 8.19792 0.0834961C9.26284 0.0834961 10.163 0.802262 10.4386 1.78027C11.4307 1.84472 12.2181 2.67237 12.2181 3.6805V4.52686C12.2181 4.87742 11.9339 5.16162 11.5833 5.16162Z" fill="#FFE67A"/>
|
||||||
|
<path d="M10.4379 1.78027C10.1623 0.802262 9.26219 0.0834961 8.19727 0.0834961V5.16162H11.5827C11.9332 5.16162 12.2174 4.87742 12.2174 4.52686V3.6805C12.2174 2.67237 11.43 1.84472 10.4379 1.78027Z" fill="#FFC336"/>
|
||||||
|
<path d="M9.11561 16.8557C8.90525 16.6453 8.8692 16.317 9.02895 16.066L11.1235 12.7744C11.2525 12.5718 11.4875 12.4558 11.7349 12.4849C11.8823 12.5023 12.0174 12.5759 12.1223 12.6808L13.2904 13.8489C13.3953 13.9538 13.469 14.0889 13.4863 14.2363C13.5154 14.4837 13.3994 14.7187 13.1967 14.8476L9.90518 16.9422C9.65423 17.1021 9.32598 17.066 9.11561 16.8557Z" fill="#FFD6AA"/>
|
||||||
|
<path d="M13.2891 13.8487L12.705 13.2646L9.11426 16.8554C9.32462 17.0658 9.65292 17.1018 9.90391 16.9421L13.1955 14.8475C13.3981 14.7186 13.5141 14.4835 13.485 14.2361C13.4677 14.0887 13.394 13.9536 13.2891 13.8487Z" fill="#FAC68F"/>
|
||||||
|
<path d="M20.7863 6.38235L19.5893 5.18543C19.3414 4.93754 18.9395 4.93754 18.6917 5.18543L17.3451 6.53198C17.0972 6.77988 17.0972 7.18177 17.3451 7.42967L18.542 8.62658C18.7899 8.87448 19.1918 8.87448 19.4397 8.62658L20.7863 7.28003C21.0341 7.03218 21.0341 6.63025 20.7863 6.38235Z" fill="#F2FAFF"/>
|
||||||
|
<path d="M20.1876 5.78369L17.9434 8.02793L18.5418 8.62638C18.7897 8.87428 19.1916 8.87428 19.4395 8.62638L20.7861 7.27983C21.0339 7.03194 21.0339 6.63005 20.7861 6.38215L20.1876 5.78369Z" fill="#C8EAFA"/>
|
||||||
|
<path d="M21.9829 3.98849C21.4045 3.41009 20.4667 3.41009 19.8883 3.98849L18.6914 5.1854L20.786 7.28L21.9829 6.08309C22.5613 5.50469 22.5613 4.56688 21.9829 3.98849Z" fill="#FF5E82"/>
|
||||||
|
<path d="M21.9825 3.98828L19.7383 6.23252L20.7856 7.27984L21.9825 6.08292C22.5609 5.50448 22.5609 4.56668 21.9825 3.98828Z" fill="#B7457D"/>
|
||||||
|
<path d="M11.208 12.666L17.3413 6.5327L19.4356 8.627L13.3023 14.7603L11.208 12.666Z" fill="#BC8173"/>
|
||||||
|
<path d="M12.2559 13.7139L18.3892 7.58055L19.4363 8.6277L13.303 14.761L12.2559 13.7139Z" fill="#9D5E4A"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 5.2 KiB |
265
lib/features/scene/helper/functions_per_device/ac_functions.dart
Normal file
265
lib/features/scene/helper/functions_per_device/ac_functions.dart
Normal file
@ -0,0 +1,265 @@
|
|||||||
|
import 'package:syncrow_app/features/scene/enum/ac_values.dart';
|
||||||
|
import 'package:syncrow_app/features/scene/enum/operation_dialog_type.dart';
|
||||||
|
import 'package:syncrow_app/features/scene/model/scene_static_function.dart';
|
||||||
|
import 'package:syncrow_app/generated/assets.dart';
|
||||||
|
import 'package:syncrow_app/utils/resource_manager/constants.dart';
|
||||||
|
|
||||||
|
class ACFunctionsHelper {
|
||||||
|
static List<SceneStaticFunction> tabToRunAcFunctions(
|
||||||
|
String deviceId, String deviceName, functionValue) {
|
||||||
|
return [
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsAcPower,
|
||||||
|
operationName: 'Power',
|
||||||
|
code: 'switch',
|
||||||
|
functionValue: functionValue,
|
||||||
|
operationDialogType: OperationDialogType.onOff,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcPower,
|
||||||
|
description: "ON",
|
||||||
|
value: true,
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcPowerOFF,
|
||||||
|
description: "OFF",
|
||||||
|
value: false,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsFreezing,
|
||||||
|
operationName: 'Mode',
|
||||||
|
code: 'mode',
|
||||||
|
functionValue: functionValue,
|
||||||
|
operationDialogType: OperationDialogType.listOfOptions,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcCooling,
|
||||||
|
description: AcValuesEnums.Cooling.name,
|
||||||
|
value: TempModes.cold.name,
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcHeating,
|
||||||
|
description: AcValuesEnums.Heating.name,
|
||||||
|
value: TempModes.hot.name,
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsFanSpeed,
|
||||||
|
description: AcValuesEnums.Ventilation.name,
|
||||||
|
value: TempModes.wind.name,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsTempreture,
|
||||||
|
operationName: 'Set Temperature',
|
||||||
|
code: 'temp_set',
|
||||||
|
functionValue: functionValue,
|
||||||
|
operationDialogType: OperationDialogType.temperature,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsCelsiusDegrees,
|
||||||
|
value: 0,
|
||||||
|
description: 'COOL TO',
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsFanSpeed,
|
||||||
|
operationName: 'Fan Speed',
|
||||||
|
code: 'level',
|
||||||
|
functionValue: functionValue,
|
||||||
|
operationDialogType: OperationDialogType.listOfOptions,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcFanLow,
|
||||||
|
description: ValueACRange.LOW.name,
|
||||||
|
value: FanSpeeds.low.name,
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcFanMiddle,
|
||||||
|
description: ValueACRange.MIDDLE.name,
|
||||||
|
value: FanSpeeds.middle.name,
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcFanHigh,
|
||||||
|
description: ValueACRange.HIGH.name,
|
||||||
|
value: FanSpeeds.high.name,
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcFanAuto,
|
||||||
|
description: ValueACRange.AUTO.name,
|
||||||
|
value: FanSpeeds.auto.name,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsChildLock,
|
||||||
|
operationName: 'Child Lock',
|
||||||
|
code: 'child_lock',
|
||||||
|
functionValue: functionValue,
|
||||||
|
operationDialogType: OperationDialogType.onOff,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsSceneChildLock,
|
||||||
|
description: 'Lock',
|
||||||
|
value: true,
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsSceneChildUnlock,
|
||||||
|
description: 'Unlock',
|
||||||
|
value: false,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<SceneStaticFunction> automationAcFunctions(
|
||||||
|
String deviceId, String deviceName, functionValue) {
|
||||||
|
return [
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsAcPower,
|
||||||
|
operationName: 'Power',
|
||||||
|
code: 'switch',
|
||||||
|
functionValue: functionValue,
|
||||||
|
operationDialogType: OperationDialogType.onOff,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcPower,
|
||||||
|
description: "ON",
|
||||||
|
value: true,
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcPowerOFF,
|
||||||
|
description: "OFF",
|
||||||
|
value: false,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsFreezing,
|
||||||
|
operationName: 'Mode',
|
||||||
|
code: 'mode',
|
||||||
|
functionValue: functionValue,
|
||||||
|
operationDialogType: OperationDialogType.listOfOptions,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcCooling,
|
||||||
|
description: AcValuesEnums.Cooling.name,
|
||||||
|
value: TempModes.cold.name,
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcHeating,
|
||||||
|
description: AcValuesEnums.Heating.name,
|
||||||
|
value: TempModes.hot.name,
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsFanSpeed,
|
||||||
|
description: AcValuesEnums.Ventilation.name,
|
||||||
|
value: TempModes.wind.name,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsTempreture,
|
||||||
|
operationName: 'Set Temperature',
|
||||||
|
code: 'temp_set',
|
||||||
|
functionValue: functionValue,
|
||||||
|
operationDialogType: OperationDialogType.integerSteps,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsCelsiusDegrees,
|
||||||
|
value: 0,
|
||||||
|
description: 'COOL TO',
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsCurrentTemp,
|
||||||
|
operationName: 'Current Temperature',
|
||||||
|
code: 'temp_current',
|
||||||
|
functionValue: functionValue,
|
||||||
|
operationDialogType: OperationDialogType.integerSteps,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsCelsiusDegrees,
|
||||||
|
value: 0,
|
||||||
|
description: 'COOL TO',
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsFanSpeed,
|
||||||
|
operationName: 'Fan Speed',
|
||||||
|
code: 'level',
|
||||||
|
functionValue: functionValue,
|
||||||
|
operationDialogType: OperationDialogType.listOfOptions,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcFanLow,
|
||||||
|
description: ValueACRange.LOW.name,
|
||||||
|
value: FanSpeeds.low.name,
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcFanMiddle,
|
||||||
|
description: ValueACRange.MIDDLE.name,
|
||||||
|
value: FanSpeeds.middle.name,
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcFanHigh,
|
||||||
|
description: ValueACRange.HIGH.name,
|
||||||
|
value: FanSpeeds.high.name,
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcFanAuto,
|
||||||
|
description: ValueACRange.AUTO.name,
|
||||||
|
value: FanSpeeds.auto.name,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsChildLock,
|
||||||
|
operationName: 'Child Lock',
|
||||||
|
code: 'child_lock',
|
||||||
|
functionValue: functionValue,
|
||||||
|
operationDialogType: OperationDialogType.onOff,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsSceneChildLock,
|
||||||
|
description: 'Lock',
|
||||||
|
value: true,
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsSceneChildUnlock,
|
||||||
|
description: 'Unlock',
|
||||||
|
value: false,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,240 @@
|
|||||||
|
import 'package:syncrow_app/features/scene/enum/operation_dialog_type.dart';
|
||||||
|
import 'package:syncrow_app/features/scene/model/scene_static_function.dart';
|
||||||
|
import 'package:syncrow_app/generated/assets.dart';
|
||||||
|
|
||||||
|
class DoorLockHelperFunctions {
|
||||||
|
/// tab to run functions
|
||||||
|
static List<SceneStaticFunction> doorLockTapToRunFunctions(
|
||||||
|
String deviceId, String deviceName, functionValue) {
|
||||||
|
return [
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsIconsDoorLock,
|
||||||
|
operationName: 'Set Door lock Normal Open',
|
||||||
|
functionValue: functionValue,
|
||||||
|
code: 'normal_open_switch',
|
||||||
|
operationDialogType: OperationDialogType.onOff,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcPower, description: "ON", value: true),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcPowerOFF, description: "OFF", value: false),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
//// automation functions
|
||||||
|
static List<SceneStaticFunction> doorLockAutomationFunctions(
|
||||||
|
String deviceId, String deviceName, functionValue) {
|
||||||
|
return [
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsFingerprintUnlock,
|
||||||
|
operationName: 'Fingerprint Unlock',
|
||||||
|
functionValue: functionValue,
|
||||||
|
code: 'unlock_fingerprint',
|
||||||
|
operationDialogType: OperationDialogType.integerSteps,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: '',
|
||||||
|
description: "",
|
||||||
|
value: 0,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsPasswordUnlock,
|
||||||
|
operationName: 'Password Unlock',
|
||||||
|
functionValue: functionValue,
|
||||||
|
code: 'unlock_password',
|
||||||
|
operationDialogType: OperationDialogType.integerSteps,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: '',
|
||||||
|
description: "",
|
||||||
|
value: 0,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsCardUnlock,
|
||||||
|
operationName: 'Card Unlock',
|
||||||
|
functionValue: functionValue,
|
||||||
|
code: 'unlock_card',
|
||||||
|
operationDialogType: OperationDialogType.integerSteps,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: '',
|
||||||
|
description: "",
|
||||||
|
value: 0,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsLockAlarm,
|
||||||
|
operationName: 'Lock Alarm',
|
||||||
|
functionValue: functionValue,
|
||||||
|
code: 'alarm_lock',
|
||||||
|
operationDialogType: OperationDialogType.none,
|
||||||
|
operationalValues: [],
|
||||||
|
),
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsRemoteUnlockReq,
|
||||||
|
operationName: 'Remote Unlock Request',
|
||||||
|
functionValue: functionValue,
|
||||||
|
code: 'unlock_request',
|
||||||
|
operationDialogType: OperationDialogType.integerSteps,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: '',
|
||||||
|
description: "",
|
||||||
|
value: 0,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsResidualElectricity,
|
||||||
|
operationName: 'Residual Electricity',
|
||||||
|
functionValue: functionValue,
|
||||||
|
code: 'residual_electricity',
|
||||||
|
operationDialogType: OperationDialogType.integerSteps,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: '',
|
||||||
|
description: "",
|
||||||
|
value: 0,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsDoubleLock,
|
||||||
|
operationName: 'Double Lock',
|
||||||
|
functionValue: functionValue,
|
||||||
|
operationDialogType: OperationDialogType.onOff,
|
||||||
|
code: 'reverse_lock',
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcPower,
|
||||||
|
description: "ON",
|
||||||
|
value: true,
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcPowerOFF,
|
||||||
|
description: "OFF",
|
||||||
|
value: false,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsRemoteUnlockViaApp,
|
||||||
|
operationName: 'Remote Unlock Via App',
|
||||||
|
functionValue: functionValue,
|
||||||
|
operationDialogType: OperationDialogType.integerSteps,
|
||||||
|
code: 'unlock_app',
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: '',
|
||||||
|
description: "",
|
||||||
|
value: 0,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsHijackAlarm,
|
||||||
|
operationName: 'Hijack Alarm',
|
||||||
|
functionValue: functionValue,
|
||||||
|
operationDialogType: OperationDialogType.onOff,
|
||||||
|
code: 'hijack',
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcPower,
|
||||||
|
description: "ON",
|
||||||
|
value: true,
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcPowerOFF,
|
||||||
|
description: "OFF",
|
||||||
|
value: false,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsDoorlockNormalOpen,
|
||||||
|
operationName: 'Set Door Lock Normal Open',
|
||||||
|
functionValue: functionValue,
|
||||||
|
code: 'normal_open_switch',
|
||||||
|
operationDialogType: OperationDialogType.onOff,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcPower,
|
||||||
|
description: "ON",
|
||||||
|
value: true,
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcPowerOFF,
|
||||||
|
description: "OFF",
|
||||||
|
value: false,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsDoorlockNormalOpen,
|
||||||
|
operationName: 'Doorbell',
|
||||||
|
functionValue: functionValue,
|
||||||
|
code: 'doorbell',
|
||||||
|
operationDialogType: OperationDialogType.onOff,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcPower,
|
||||||
|
description: "ON",
|
||||||
|
value: true,
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcPowerOFF,
|
||||||
|
description: "OFF",
|
||||||
|
value: false,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsTempPasswordUnlock,
|
||||||
|
operationName: 'Temporary Password Unlock',
|
||||||
|
functionValue: functionValue,
|
||||||
|
operationDialogType: OperationDialogType.integerSteps,
|
||||||
|
code: 'unlock_temporary',
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: '',
|
||||||
|
description: "",
|
||||||
|
value: 0,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,62 @@
|
|||||||
|
import 'package:syncrow_app/features/scene/enum/operation_dialog_type.dart';
|
||||||
|
import 'package:syncrow_app/features/scene/model/scene_static_function.dart';
|
||||||
|
import 'package:syncrow_app/generated/assets.dart';
|
||||||
|
|
||||||
|
class GatewayHelperFunctions {
|
||||||
|
static List<SceneStaticFunction> tabToRunGatewayFunctions(
|
||||||
|
String deviceId, String deviceName, functionValue) {
|
||||||
|
return [
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsSwitchAlarmSound,
|
||||||
|
operationName: 'Switch Alarm Sound',
|
||||||
|
code: 'switch_alarm_sound',
|
||||||
|
functionValue: functionValue,
|
||||||
|
operationDialogType: OperationDialogType.onOff,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcPower, description: "ON", value: true),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcPowerOFF, description: "OFF", value: false),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsMasterState,
|
||||||
|
operationName: 'Master State',
|
||||||
|
code: 'master_state',
|
||||||
|
functionValue: functionValue,
|
||||||
|
operationDialogType: OperationDialogType.listOfOptions,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcPower,
|
||||||
|
description: "Alarm",
|
||||||
|
value: 'alarm',
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcPowerOFF,
|
||||||
|
description: "Normal",
|
||||||
|
value: 'normal',
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsFactoryReset,
|
||||||
|
operationName: 'Factory Reset',
|
||||||
|
code: 'factory_reset',
|
||||||
|
functionValue: functionValue,
|
||||||
|
operationDialogType: OperationDialogType.onOff,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsSceneRefresh, description: "ON", value: true),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsResetOff, description: "OFF", value: false),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,174 @@
|
|||||||
|
import 'package:syncrow_app/features/scene/enum/operation_dialog_type.dart';
|
||||||
|
import 'package:syncrow_app/features/scene/model/scene_static_function.dart';
|
||||||
|
import 'package:syncrow_app/generated/assets.dart';
|
||||||
|
|
||||||
|
class HumanPresenceHelperFunctions {
|
||||||
|
static List<SceneStaticFunction> tabToRunHumanPresenceFunctions(
|
||||||
|
String deviceId, String deviceName, functionValue) {
|
||||||
|
return [
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsFarDetection,
|
||||||
|
operationName: 'Far Detection',
|
||||||
|
code: 'far_detection',
|
||||||
|
functionValue: functionValue,
|
||||||
|
operationDialogType: OperationDialogType.listOfOptions,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsFarDetectionFunction,
|
||||||
|
value: 75,
|
||||||
|
description: '75cm',
|
||||||
|
iconValue: '75',
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsFarDetectionFunction,
|
||||||
|
value: 150,
|
||||||
|
description: '150cm',
|
||||||
|
iconValue: '150',
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsFarDetectionFunction,
|
||||||
|
value: 225,
|
||||||
|
description: '225cm',
|
||||||
|
iconValue: '225',
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsFarDetectionFunction,
|
||||||
|
value: 300,
|
||||||
|
description: '300cm',
|
||||||
|
iconValue: '300',
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsFarDetectionFunction,
|
||||||
|
value: 375,
|
||||||
|
description: '375cm',
|
||||||
|
iconValue: '375',
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsFarDetectionFunction,
|
||||||
|
value: 450,
|
||||||
|
description: '450cm',
|
||||||
|
iconValue: '450',
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsFarDetectionFunction,
|
||||||
|
value: 525,
|
||||||
|
description: '525cm',
|
||||||
|
iconValue: '525',
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsFarDetectionFunction,
|
||||||
|
value: 600,
|
||||||
|
description: '600cm',
|
||||||
|
iconValue: '600',
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsMotionDetection,
|
||||||
|
operationName: 'Motion Detection Sensitivity',
|
||||||
|
code: 'motion_sensitivity_value',
|
||||||
|
functionValue: functionValue,
|
||||||
|
operationDialogType: OperationDialogType.listOfOptions,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsSensitivityOperationIcon,
|
||||||
|
value: 1,
|
||||||
|
description: 1.toString(),
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsSensitivityOperationIcon,
|
||||||
|
value: 2,
|
||||||
|
description: 2.toString(),
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsSensitivityOperationIcon,
|
||||||
|
value: 3,
|
||||||
|
description: 3.toString(),
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsSensitivityOperationIcon,
|
||||||
|
value: 4,
|
||||||
|
description: 4.toString(),
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsSensitivityOperationIcon,
|
||||||
|
value: 5,
|
||||||
|
description: 5.toString(),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsMotionlessDetection,
|
||||||
|
operationName: 'Motionless Detection Sensitivity',
|
||||||
|
code: 'motionless_sensitivity',
|
||||||
|
functionValue: functionValue,
|
||||||
|
operationDialogType: OperationDialogType.listOfOptions,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
iconValue: '1',
|
||||||
|
icon: Assets.assetsFarDetectionFunction,
|
||||||
|
value: 1,
|
||||||
|
description: '1',
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsFarDetectionFunction,
|
||||||
|
value: 2,
|
||||||
|
description: '2',
|
||||||
|
iconValue: '2',
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsFarDetectionFunction,
|
||||||
|
value: 3,
|
||||||
|
description: '3',
|
||||||
|
iconValue: '3',
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsFarDetectionFunction,
|
||||||
|
value: 4,
|
||||||
|
description: '4',
|
||||||
|
iconValue: '4',
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsFarDetectionFunction,
|
||||||
|
value: 5,
|
||||||
|
description: '5',
|
||||||
|
iconValue: '5',
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsIndicator,
|
||||||
|
operationName: 'Indicator',
|
||||||
|
code: 'indicator',
|
||||||
|
functionValue: functionValue,
|
||||||
|
operationDialogType: OperationDialogType.onOff,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcPower, description: "ON", value: true),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcPowerOFF, description: "OFF", value: false),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsNobodyTime,
|
||||||
|
operationName: 'Nobody Time',
|
||||||
|
code: 'presence_time',
|
||||||
|
functionValue: functionValue,
|
||||||
|
operationDialogType: OperationDialogType.countdown,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(icon: '', value: 0),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,181 @@
|
|||||||
|
import 'package:syncrow_app/features/scene/enum/operation_dialog_type.dart';
|
||||||
|
import 'package:syncrow_app/features/scene/model/scene_static_function.dart';
|
||||||
|
import 'package:syncrow_app/generated/assets.dart';
|
||||||
|
|
||||||
|
class PresenceSensorHelperFunctions {
|
||||||
|
static List<SceneStaticFunction> tabToRunPresenceSensorFunctions(
|
||||||
|
String deviceId, String deviceName, functionValue) {
|
||||||
|
return [
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsSensitivityFunction,
|
||||||
|
operationName: 'Sensitivity',
|
||||||
|
code: 'sensitivity',
|
||||||
|
functionValue: functionValue,
|
||||||
|
operationDialogType: OperationDialogType.listOfOptions,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsSensitivityOperationIcon,
|
||||||
|
value: 1,
|
||||||
|
description: 1.toString(),
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsSensitivityOperationIcon,
|
||||||
|
value: 2,
|
||||||
|
description: 2.toString(),
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsSensitivityOperationIcon,
|
||||||
|
value: 3,
|
||||||
|
description: 3.toString(),
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsSensitivityOperationIcon,
|
||||||
|
value: 4,
|
||||||
|
description: 4.toString(),
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsSensitivityOperationIcon,
|
||||||
|
value: 5,
|
||||||
|
description: 5.toString(),
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsSensitivityOperationIcon,
|
||||||
|
value: 6,
|
||||||
|
description: 6.toString(),
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsSensitivityOperationIcon,
|
||||||
|
value: 7,
|
||||||
|
description: 7.toString(),
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsSensitivityOperationIcon,
|
||||||
|
value: 8,
|
||||||
|
description: 8.toString(),
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsSensitivityOperationIcon,
|
||||||
|
value: 9,
|
||||||
|
description: 9.toString(),
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsSensitivityOperationIcon,
|
||||||
|
value: 10,
|
||||||
|
description: 10.toString(),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<SceneStaticFunction> automationPresenceSensorFunctions(
|
||||||
|
String deviceId, String deviceName, functionValue) {
|
||||||
|
return [
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsIconsSensors,
|
||||||
|
operationName: 'Presence Status',
|
||||||
|
code: 'presence_state',
|
||||||
|
functionValue: functionValue,
|
||||||
|
operationDialogType: OperationDialogType.listOfOptions,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsIconsPresenceSensorAssetsEmpty,
|
||||||
|
value: 'none',
|
||||||
|
description: 'None',
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsPresence,
|
||||||
|
value: 'presence',
|
||||||
|
description: 'Presence',
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsMotion,
|
||||||
|
value: 'motion',
|
||||||
|
description: 'Motion',
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsSensitivityFunction,
|
||||||
|
operationName: 'Sensitivity',
|
||||||
|
code: 'sensitivity',
|
||||||
|
functionValue: functionValue,
|
||||||
|
operationDialogType: OperationDialogType.listOfOptions,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsSensitivityOperationIcon,
|
||||||
|
value: 1,
|
||||||
|
description: 1.toString(),
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsSensitivityOperationIcon,
|
||||||
|
value: 2,
|
||||||
|
description: 2.toString(),
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsSensitivityOperationIcon,
|
||||||
|
value: 3,
|
||||||
|
description: 3.toString(),
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsSensitivityOperationIcon,
|
||||||
|
value: 4,
|
||||||
|
description: 4.toString(),
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsSensitivityOperationIcon,
|
||||||
|
value: 5,
|
||||||
|
description: 5.toString(),
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsSensitivityOperationIcon,
|
||||||
|
value: 6,
|
||||||
|
description: 6.toString(),
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsSensitivityOperationIcon,
|
||||||
|
value: 7,
|
||||||
|
description: 7.toString(),
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsSensitivityOperationIcon,
|
||||||
|
value: 8,
|
||||||
|
description: 8.toString(),
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsSensitivityOperationIcon,
|
||||||
|
value: 9,
|
||||||
|
description: 9.toString(),
|
||||||
|
),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsSensitivityOperationIcon,
|
||||||
|
value: 10,
|
||||||
|
description: 10.toString(),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsSelfTestResult,
|
||||||
|
operationName: 'Self-Test Result',
|
||||||
|
code: 'checking_result',
|
||||||
|
functionValue: functionValue,
|
||||||
|
operationDialogType: OperationDialogType.listOfOptions,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsSelfTestResult,
|
||||||
|
value: 'check_success',
|
||||||
|
description: 'Self Testing Success',
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,92 @@
|
|||||||
|
import 'package:syncrow_app/features/scene/enum/operation_dialog_type.dart';
|
||||||
|
import 'package:syncrow_app/features/scene/model/scene_static_function.dart';
|
||||||
|
import 'package:syncrow_app/generated/assets.dart';
|
||||||
|
|
||||||
|
class ThreeGangHelperFunctions {
|
||||||
|
static List<SceneStaticFunction> threeGangHelperFunctions(
|
||||||
|
String deviceId, String deviceName, functionValue) {
|
||||||
|
return [
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsAcPower,
|
||||||
|
operationName: 'Light 1 Switch',
|
||||||
|
code: 'switch_1',
|
||||||
|
functionValue: functionValue,
|
||||||
|
operationDialogType: OperationDialogType.onOff,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcPower, description: "ON", value: true),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcPowerOFF, description: "OFF", value: false),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsAcPower,
|
||||||
|
operationName: 'Light 2 Switch',
|
||||||
|
code: 'switch_2',
|
||||||
|
functionValue: functionValue,
|
||||||
|
operationDialogType: OperationDialogType.onOff,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcPower, description: "ON", value: true),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcPowerOFF, description: "OFF", value: false),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsAcPower,
|
||||||
|
operationName: 'Light 3 Switch',
|
||||||
|
code: 'switch_3',
|
||||||
|
functionValue: functionValue,
|
||||||
|
operationDialogType: OperationDialogType.onOff,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcPower, description: "ON", value: true),
|
||||||
|
SceneOperationalValue(
|
||||||
|
icon: Assets.assetsAcPowerOFF, description: "OFF", value: false),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsLightCountdown,
|
||||||
|
operationName: 'Light 1 CountDown',
|
||||||
|
code: 'countdown_1',
|
||||||
|
functionValue: functionValue,
|
||||||
|
operationDialogType: OperationDialogType.countdown,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(icon: '', value: 0),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsLightCountdown,
|
||||||
|
operationName: 'Light 2 CountDown',
|
||||||
|
code: 'countdown_2',
|
||||||
|
functionValue: functionValue,
|
||||||
|
operationDialogType: OperationDialogType.countdown,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(icon: '', value: 0),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SceneStaticFunction(
|
||||||
|
deviceId: deviceId,
|
||||||
|
deviceName: deviceName,
|
||||||
|
icon: Assets.assetsLightCountdown,
|
||||||
|
operationName: 'Light 3 CountDown',
|
||||||
|
code: 'countdown_3',
|
||||||
|
functionValue: functionValue,
|
||||||
|
operationDialogType: OperationDialogType.countdown,
|
||||||
|
operationalValues: [
|
||||||
|
SceneOperationalValue(icon: '', value: 0),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
@ -68,6 +68,7 @@ class CreateSceneView extends StatelessWidget {
|
|||||||
sceneName: '',
|
sceneName: '',
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
context.read<CreateSceneBloc>().add(const ClearTaskListEvent());
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -3,13 +3,9 @@ import 'package:flutter_bloc/flutter_bloc.dart';
|
|||||||
import 'package:syncrow_app/features/devices/model/device_control_model.dart';
|
import 'package:syncrow_app/features/devices/model/device_control_model.dart';
|
||||||
import 'package:syncrow_app/features/devices/model/device_model.dart';
|
import 'package:syncrow_app/features/devices/model/device_model.dart';
|
||||||
import 'package:syncrow_app/features/scene/bloc/create_scene/create_scene_bloc.dart';
|
import 'package:syncrow_app/features/scene/bloc/create_scene/create_scene_bloc.dart';
|
||||||
import 'package:syncrow_app/features/scene/enum/operation_dialog_type.dart';
|
|
||||||
import 'package:syncrow_app/features/scene/helper/scene_logic_helper.dart';
|
import 'package:syncrow_app/features/scene/helper/scene_logic_helper.dart';
|
||||||
import 'package:syncrow_app/features/scene/helper/scene_operations_data_helper.dart';
|
import 'package:syncrow_app/features/scene/helper/scene_operations_data_helper.dart';
|
||||||
import 'package:syncrow_app/features/scene/model/scene_static_function.dart';
|
import 'package:syncrow_app/features/scene/model/scene_static_function.dart';
|
||||||
import 'package:syncrow_app/features/scene/widgets/alert_dialogs/alert_dialog_countdown.dart';
|
|
||||||
import 'package:syncrow_app/features/scene/widgets/alert_dialogs/alert_dialog_functions_body.dart';
|
|
||||||
import 'package:syncrow_app/features/scene/widgets/alert_dialogs/alert_dialog_temperature_body.dart';
|
|
||||||
import 'package:syncrow_app/features/scene/widgets/scene_list_tile.dart';
|
import 'package:syncrow_app/features/scene/widgets/scene_list_tile.dart';
|
||||||
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
|
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
|
||||||
import 'package:syncrow_app/features/shared_widgets/default_scaffold.dart';
|
import 'package:syncrow_app/features/shared_widgets/default_scaffold.dart';
|
||||||
@ -139,27 +135,9 @@ class DeviceFunctionsView extends StatelessWidget
|
|||||||
.selectedValues[functions[index].code];
|
.selectedValues[functions[index].code];
|
||||||
|
|
||||||
context.customAlertDialog(
|
context.customAlertDialog(
|
||||||
alertBody: functions[index].operationDialogType ==
|
alertBody: getTheCorrectDialogBody(
|
||||||
OperationDialogType.temperature
|
functions[index],
|
||||||
? AlertDialogTemperatureBody(
|
functionValues,
|
||||||
taskItem: functions[index],
|
|
||||||
functionValue: functionValues,
|
|
||||||
)
|
|
||||||
: ((functions[index].operationDialogType ==
|
|
||||||
OperationDialogType.countdown) ||
|
|
||||||
(functions[index].operationDialogType ==
|
|
||||||
OperationDialogType.countdown))
|
|
||||||
? AlertDialogCountdown(
|
|
||||||
durationValue: functions[index]
|
|
||||||
.operationalValues
|
|
||||||
.first
|
|
||||||
.value,
|
|
||||||
function: functions[index],
|
|
||||||
functionValue: functionValues,
|
|
||||||
)
|
|
||||||
: AlertDialogFunctionsOperationsBody(
|
|
||||||
taskItem: functions[index],
|
|
||||||
functionValue: functionValues,
|
|
||||||
),
|
),
|
||||||
title: functions[index].operationName,
|
title: functions[index].operationName,
|
||||||
onConfirm: () {
|
onConfirm: () {
|
||||||
|
@ -1,13 +1,17 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:flutter_svg/flutter_svg.dart';
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
|
import 'package:syncrow_app/features/scene/bloc/create_scene/create_scene_bloc.dart';
|
||||||
|
import 'package:syncrow_app/features/scene/enum/create_scene_enum.dart';
|
||||||
|
import 'package:syncrow_app/features/scene/model/scene_settings_route_arguments.dart';
|
||||||
import 'package:syncrow_app/features/scene/widgets/scene_list_tile.dart';
|
import 'package:syncrow_app/features/scene/widgets/scene_list_tile.dart';
|
||||||
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
|
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
|
||||||
import 'package:syncrow_app/features/shared_widgets/light_divider.dart';
|
import 'package:syncrow_app/features/shared_widgets/light_divider.dart';
|
||||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_large.dart';
|
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_large.dart';
|
||||||
import 'package:syncrow_app/generated/assets.dart';
|
import 'package:syncrow_app/generated/assets.dart';
|
||||||
|
import 'package:syncrow_app/navigation/routing_constants.dart';
|
||||||
import 'package:syncrow_app/utils/context_extension.dart';
|
import 'package:syncrow_app/utils/context_extension.dart';
|
||||||
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
|
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
|
||||||
import 'package:syncrow_app/utils/resource_manager/strings_manager.dart';
|
|
||||||
|
|
||||||
class IFDefaultContainer extends StatelessWidget {
|
class IFDefaultContainer extends StatelessWidget {
|
||||||
const IFDefaultContainer({
|
const IFDefaultContainer({
|
||||||
@ -29,19 +33,73 @@ class IFDefaultContainer extends StatelessWidget {
|
|||||||
color: ColorsManager.primaryTextColor,
|
color: ColorsManager.primaryTextColor,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
trailingWidget: SvgPicture.asset(Assets.addIcon),
|
trailingWidget: GestureDetector(
|
||||||
|
onTap: () => Navigator.pushNamed(
|
||||||
|
context,
|
||||||
|
Routes.sceneControlDevicesRoute,
|
||||||
|
arguments: SceneSettingsRouteArguments(
|
||||||
|
sceneType: CreateSceneEnum.deviceStatusChanges.name,
|
||||||
|
sceneId: '',
|
||||||
|
sceneName: '',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: SvgPicture.asset(
|
||||||
|
Assets.addIcon,
|
||||||
|
colorFilter: const ColorFilter.mode(
|
||||||
|
ColorsManager.primaryColor,
|
||||||
|
BlendMode.srcIn,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
),
|
),
|
||||||
const LightDivider(),
|
const LightDivider(),
|
||||||
const SceneListTile(
|
BlocBuilder<CreateSceneBloc, CreateSceneState>(
|
||||||
assetPath: Assets.handClickIcon,
|
builder: (context, state) {
|
||||||
titleString: StringsManager.tapToRun,
|
if (state is CreateSceneLoading) {
|
||||||
padding: EdgeInsets.zero,
|
return const Center(child: LinearProgressIndicator());
|
||||||
|
}
|
||||||
|
|
||||||
|
// if (state is AddSceneTask) {
|
||||||
|
// final taskLists = state.tasksList;
|
||||||
|
// if (taskLists.isNotEmpty) {
|
||||||
|
// return ListView.builder(
|
||||||
|
// shrinkWrap: true,
|
||||||
|
// physics: const NeverScrollableScrollPhysics(),
|
||||||
|
// itemCount: taskLists.length,
|
||||||
|
// reverse: true,
|
||||||
|
// itemBuilder: (context, index) {
|
||||||
|
// return ThenAddedTasksContainer(
|
||||||
|
// taskItem: taskLists[index],
|
||||||
|
// );
|
||||||
|
// },
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
// return SceneListTile(
|
||||||
|
// titleString: '+ Add Task',
|
||||||
|
// textAlign: TextAlign.center,
|
||||||
|
// onPressed: () => context.customBottomSheet(
|
||||||
|
// child: const CustomBottomSheetWidget(),
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
return SceneListTile(
|
||||||
|
titleString: '+ Add Condition',
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
onPressed: () => Navigator.pushNamed(
|
||||||
|
context,
|
||||||
|
Routes.sceneControlDevicesRoute,
|
||||||
|
arguments: SceneSettingsRouteArguments(
|
||||||
|
sceneType: CreateSceneEnum.deviceStatusChanges.name,
|
||||||
|
sceneId: '',
|
||||||
|
sceneName: '',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -28,10 +28,11 @@ class SceneDevicesBody extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final isAutomationDeviceStatus = (ModalRoute.of(context)?.settings.arguments
|
final isAutomationDeviceStatus = ((ModalRoute.of(context)
|
||||||
as SceneSettingsRouteArguments)
|
?.settings
|
||||||
.sceneType ==
|
.arguments as SceneSettingsRouteArguments?)
|
||||||
CreateSceneEnum.deviceStatusChanges.name;
|
?.sceneType ==
|
||||||
|
CreateSceneEnum.deviceStatusChanges.name);
|
||||||
return BlocBuilder<TabBarBloc, TabBarState>(
|
return BlocBuilder<TabBarBloc, TabBarState>(
|
||||||
builder: (context, tabState) {
|
builder: (context, tabState) {
|
||||||
return Column(
|
return Column(
|
||||||
|
@ -1004,4 +1004,24 @@ class Assets {
|
|||||||
|
|
||||||
static const String assetsTempPasswordUnlock =
|
static const String assetsTempPasswordUnlock =
|
||||||
"assets/icons/functions_icons/automation_functions/temp_password_unlock.svg";
|
"assets/icons/functions_icons/automation_functions/temp_password_unlock.svg";
|
||||||
|
|
||||||
|
//assets/icons/functions_icons/automation_functions/self_test_result.svg
|
||||||
|
|
||||||
|
static const String assetsSelfTestResult =
|
||||||
|
"assets/icons/functions_icons/automation_functions/self_test_result.svg";
|
||||||
|
|
||||||
|
///assets/icons/functions_icons/automation_functions/presence.svg
|
||||||
|
|
||||||
|
static const String assetsPresence =
|
||||||
|
"assets/icons/functions_icons/automation_functions/presence.svg";
|
||||||
|
|
||||||
|
//assets/icons/functions_icons/automation_functions/motion.svg
|
||||||
|
|
||||||
|
static const String assetsMotion =
|
||||||
|
"assets/icons/functions_icons/automation_functions/motion.svg";
|
||||||
|
|
||||||
|
//assets/icons/functions_icons/automation_functions/current_temp.svg
|
||||||
|
|
||||||
|
static const String assetsCurrentTemp =
|
||||||
|
"assets/icons/functions_icons/automation_functions/current_temp.svg";
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user