Advertisement
Guest User

Untitled

a guest
Mar 29th, 2020
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.82 KB | None | 0 0
  1. name: Floorplan
  2. image: /local/custom_ui/floorplan/floorplan.svg
  3. stylesheet: /local/custom_ui/floorplan/floorplan.css
  4. warnings:
  5. # These options are optional
  6. # warnings: # enable warnings (to find out why things might ot be working correctly)
  7. # pan_zoom: # enable experimental panning / zooming
  8. # hide_app_toolbar: # hide the application toolbar (when used as a custom panel)
  9. # date_format: DD-MMM-YYYY # Date format to use in hover-over text
  10.  
  11. last_motion_entity: sensor.template_last_motion
  12. last_motion_class: last-motion
  13.  
  14. groups:
  15. - name: Sensors
  16. entities:
  17. - sensor.tasmota_dht11_temperature
  18. - sensor.tasmota_ds18b20_temperature
  19. text_template: '${entity.state ? Math.ceil(entity.state) : "undefined"}'
  20. class_template: '
  21. var temp = parseFloat(entity.state.replace("°", ""));
  22. if (temp < 60)
  23. return "temp-low";
  24. else if (temp < 73)
  25. return "temp-medium";
  26. else
  27. return "temp-high";
  28. '
  29. - name: Lights
  30. entities:
  31. - light.bookshelf_lamp
  32. - light.corner_lamp
  33. - light.nightstand_lamp
  34. - light.desk_lamp
  35. states:
  36. - state: 'on'
  37. class: 'light-on'
  38. - state: 'off'
  39. class: 'light-off'
  40. action:
  41. service: toggle
  42.  
  43. - name: Switches
  44. entities:
  45. - switch.tasmota_2
  46. - switch.hallway_light
  47. - switch.tasmota
  48. - switch.desksign
  49. states:
  50. - state: 'on'
  51. class: 'switch-on'
  52. - state: 'off'
  53. class: 'switch-off'
  54. action:
  55. service: toggle
  56. - name: Presence
  57. entities:
  58. - person.claire_chambers
  59. text_template: 'Claire is ${entity.state}'
  60. - name: Time until semester
  61. entities:
  62. - sun.sun
  63. text_template: '
  64. var countDownDate = new Date("Aug 17, 2020 00:00:01").getTime();
  65. var distance = countDownDate - now;
  66. var days = Math.floor(distance / (1000 * 60 * 60 * 24));
  67. var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
  68. var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
  69. var seconds = Math.floor((distance % (1000 * 60)) / 1000);
  70.  
  71. if (distance < 0) {
  72. return "Back at Clemson!!";
  73. }
  74. else {
  75. return "Semester Starts in " + days + " days, " + hours "hours, " + minutes + " minutes, and " + seconds + "seconds";
  76. }
  77. '
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement