Advertisement
Milfeldt

resized

Feb 10th, 2024
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 7.65 KB | Source Code | 0 0
  1. type: custom:plotly-graph
  2. refresh_interval: 1
  3. hours_to_show: current_day
  4. config:
  5.   modeBarButtonsToRemove:
  6.    - select2d
  7.     - lasso2d
  8.     - toImage
  9.   displaylogo: false
  10. layout:
  11.   height: 350
  12.   margin:
  13.     l: 40
  14.     r: 40
  15.     t: 0
  16.     b: 25
  17.   showlegend: true
  18.   xaxis:
  19.     showticklabels: true
  20.     dtick: 1000
  21.     visible: true
  22.     gridcolor: RGBA(200,200,200,0.15)
  23.     zerolinecolor: RGBA(200,200,200,0.15)
  24.     type: number
  25.     fixedrange: true
  26.     range:
  27.      - 1200
  28.       - -1200
  29.   yaxis:
  30.     showticklabels: true
  31.     dtick: 1000
  32.     visible: true
  33.     gridcolor: RGBA(200,200,200,0.15)
  34.     zerolinecolor: RGBA(200,200,200,0.15)
  35.     scaleanchor: x
  36.     scaleratio: 1
  37.     fixedrange: true
  38.     range:
  39.      - 3000
  40.       - 0
  41. entities:
  42.   - entity: ''
  43.     fn_var1: $ex vars.sensor_custom_name = "screek_bad_screek";
  44.     fn_var2: $ex vars.sensor_name_prefix = "sensor." + vars.sensor_custom_name + "_";
  45.     fn_var3: $ex vars.number_name_prefix = "number." + vars.sensor_custom_name + "_";
  46.   - entity: ''
  47.     name: Target1
  48.     marker:
  49.       size: 10
  50.       symbol: star-diamond
  51.     line:
  52.       shape: spline
  53.       width: 5
  54.     x:
  55.      - >-
  56.         $ex { var x = hass.states[vars.sensor_name_prefix + "target1_x"].state;
  57.         var y = hass.states[vars.sensor_name_prefix + "target1_y"].state; if (x
  58.         == 0 && y == 0) { return -9999 }; if (vars.is_inch_unit) { x = x * 25.4
  59.         }; return x; }
  60.     'y':
  61.      - >-
  62.         $ex { var x = hass.states[vars.sensor_name_prefix + "target1_x"].state;
  63.         var y = hass.states[vars.sensor_name_prefix + "target1_y"].state; if (x
  64.         == 0 && y == 0) { return -9999 }; if (vars.is_inch_unit) { y = y * 25.4
  65.         }; return y; }
  66.   - entity: ''
  67.     name: Target2
  68.     marker:
  69.       size: 10
  70.       symbol: star-diamond
  71.     line:
  72.       shape: spline
  73.       width: 5
  74.     x:
  75.      - >-
  76.         $ex { var x = hass.states[vars.sensor_name_prefix + "target2_x"].state;
  77.         var y = hass.states[vars.sensor_name_prefix + "target2_y"].state; if (x
  78.         == 0 && y == 0) { return -9999 }; if (vars.is_inch_unit) { x = x * 25.4
  79.         }; return x; }
  80.     'y':
  81.      - >-
  82.         $ex { var x = hass.states[vars.sensor_name_prefix + "target2_x"].state;
  83.         var y = hass.states[vars.sensor_name_prefix + "target2_y"].state; if (x
  84.         == 0 && y == 0) { return -9999 }; if (vars.is_inch_unit) { y = y * 25.4
  85.         }; return y; }
  86.   - entity: ''
  87.     internal: false
  88.     name: Target3
  89.     marker:
  90.       size: 10
  91.       symbol: star-diamond
  92.     line:
  93.       shape: spline
  94.       width: 5
  95.     x:
  96.      - >-
  97.         $ex { var x = hass.states[vars.sensor_name_prefix + "target3_x"].state;
  98.         var y = hass.states[vars.sensor_name_prefix + "target3_y"].state; if (x
  99.         == 0 && y == 0) { return -9999 }; if (vars.is_inch_unit) { x = x * 25.4
  100.         }; return x; }
  101.     'y':
  102.      - >-
  103.         $ex { var x = hass.states[vars.sensor_name_prefix + "target3_x"].state;
  104.         var y = hass.states[vars.sensor_name_prefix + "target3_y"].state; if (x
  105.         == 0 && y == 0) { return -9999 }; if (vars.is_inch_unit) { y = y * 25.4
  106.         }; return y; }
  107.   - entity: ''
  108.     name: Zone1
  109.     mode: lines
  110.     fill: toself
  111.     fillcolor: RGBA(20,200,0,0.06)
  112.     line:
  113.       color: RGBA(20,200,0,0.2)
  114.       shape: line
  115.       width: 2
  116.     x:
  117.      - $ex hass.states[vars.number_name_prefix + "zone1_x_begin"].state
  118.       - $ex hass.states[vars.number_name_prefix + "zone1_x_begin"].state
  119.       - $ex hass.states[vars.number_name_prefix + "zone1_x_end"].state
  120.       - $ex hass.states[vars.number_name_prefix + "zone1_x_end"].state
  121.       - $ex hass.states[vars.number_name_prefix + "zone1_x_begin"].state
  122.     'y':
  123.      - $ex hass.states[vars.number_name_prefix + "zone1_y_begin"].state
  124.       - $ex hass.states[vars.number_name_prefix + "zone1_y_end"].state
  125.       - $ex hass.states[vars.number_name_prefix + "zone1_y_end"].state
  126.       - $ex hass.states[vars.number_name_prefix + "zone1_y_begin"].state
  127.       - $ex hass.states[vars.number_name_prefix + "zone1_y_begin"].state
  128.   - entity: ''
  129.     name: Zone2
  130.     mode: lines
  131.     fill: toself
  132.     fillcolor: RGBA(200,0,255,0.06)
  133.     line:
  134.       color: RGBA(200,0,255,0.2)
  135.       shape: line
  136.       width: 2
  137.     x:
  138.      - $ex hass.states[vars.number_name_prefix + "zone2_x_begin"].state
  139.       - $ex hass.states[vars.number_name_prefix + "zone2_x_begin"].state
  140.       - $ex hass.states[vars.number_name_prefix + "zone2_x_end"].state
  141.       - $ex hass.states[vars.number_name_prefix + "zone2_x_end"].state
  142.       - $ex hass.states[vars.number_name_prefix + "zone2_x_begin"].state
  143.     'y':
  144.      - $ex hass.states[vars.number_name_prefix + "zone2_y_begin"].state
  145.       - $ex hass.states[vars.number_name_prefix + "zone2_y_end"].state
  146.       - $ex hass.states[vars.number_name_prefix + "zone2_y_end"].state
  147.       - $ex hass.states[vars.number_name_prefix + "zone2_y_begin"].state
  148.       - $ex hass.states[vars.number_name_prefix + "zone2_y_begin"].state
  149.   - entity: ''
  150.     name: Zone3
  151.     mode: lines
  152.     fill: toself
  153.     fillcolor: RGBA(200,120,55,0.06)
  154.     line:
  155.       color: RGBA(200,120,55,0.2)
  156.       shape: line
  157.       width: 2
  158.     x:
  159.      - $ex hass.states[vars.number_name_prefix + "zone3_x_begin"].state
  160.       - $ex hass.states[vars.number_name_prefix + "zone3_x_begin"].state
  161.       - $ex hass.states[vars.number_name_prefix + "zone3_x_end"].state
  162.       - $ex hass.states[vars.number_name_prefix + "zone3_x_end"].state
  163.       - $ex hass.states[vars.number_name_prefix + "zone3_x_begin"].state
  164.     'y':
  165.      - $ex hass.states[vars.number_name_prefix + "zone3_y_begin"].state
  166.       - $ex hass.states[vars.number_name_prefix + "zone3_y_end"].state
  167.       - $ex hass.states[vars.number_name_prefix + "zone3_y_end"].state
  168.       - $ex hass.states[vars.number_name_prefix + "zone3_y_begin"].state
  169.       - $ex hass.states[vars.number_name_prefix + "zone3_y_begin"].state
  170.   - entity: ''
  171.     name: ExZone
  172.     mode: lines
  173.     fill: toself
  174.     fillcolor: RGBA(255,0,0,0.15)
  175.     line:
  176.       shape: line
  177.       width: 1
  178.       color: RGBA(255,0,0,0.2)
  179.     x:
  180.      - $ex hass.states[vars.number_name_prefix + "zout1_x_begin"].state
  181.       - $ex hass.states[vars.number_name_prefix + "zout1_x_begin"].state
  182.       - $ex hass.states[vars.number_name_prefix + "zout1_x_end"].state
  183.       - $ex hass.states[vars.number_name_prefix + "zout1_x_end"].state
  184.       - $ex hass.states[vars.number_name_prefix + "zout1_x_begin"].state
  185.     'y':
  186.      - $ex hass.states[vars.number_name_prefix + "zout1_y_begin"].state
  187.       - $ex hass.states[vars.number_name_prefix + "zout1_y_end"].state
  188.       - $ex hass.states[vars.number_name_prefix + "zout1_y_end"].state
  189.       - $ex hass.states[vars.number_name_prefix + "zout1_y_begin"].state
  190.       - $ex hass.states[vars.number_name_prefix + "zout1_y_begin"].state
  191.   - entity: ''
  192.     name: Coverage
  193.     mode: lines
  194.     fill: tonexty
  195.     fillcolor: rgba(168, 216, 234, 0.15)
  196.     hoverinfo: none
  197.     line:
  198.       shape: line
  199.       width: 0.7
  200.       dash: dot
  201.     x:
  202.      - 0
  203.       - $ex 3500 * Math.sin((2 * Math.PI)/360 * 60)
  204.       - 1500
  205.       - 1000
  206.       - 500
  207.       - 0
  208.       - -500
  209.       - -1000
  210.       - -1500
  211.       - $ex -3500 * Math.sin((2 * Math.PI)/360 * 60)
  212.       - 0
  213.     'y':
  214.      - 0
  215.       - $ex 3500 * Math.cos((2 * Math.PI)/360 * 60)
  216.       - $ex Math.sqrt( 3500**2 - 1500**2 )
  217.       - $ex Math.sqrt( 3500**2 - 1000**2 )
  218.       - $ex Math.sqrt( 3500**2 - 500**2 )
  219.       - 3500
  220.       - $ex Math.sqrt( 3500**2 - 500**2 )
  221.       - $ex Math.sqrt( 3500**2 - 1000**2 )
  222.       - $ex Math.sqrt( 3500**2 - 1500**2 )
  223.       - $ex 3500 * Math.cos((2 * Math.PI)/360 * 60)
  224.       - 0
  225. raw_plotly_config: true
  226. title: $ex "Badeværelse"
  227.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement