From 27a45e3dd09a6c29fd2199179c454b3996867806 Mon Sep 17 00:00:00 2001 From: runningtoy Date: Sat, 25 Oct 2025 14:09:15 +0200 Subject: [PATCH] =?UTF-8?q?presencedetector/HomeAssistentCard.yaml=20hinzu?= =?UTF-8?q?gef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- presencedetector/HomeAssistentCard.yaml | 170 ++++++++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100644 presencedetector/HomeAssistentCard.yaml diff --git a/presencedetector/HomeAssistentCard.yaml b/presencedetector/HomeAssistentCard.yaml new file mode 100644 index 0000000..a3160f7 --- /dev/null +++ b/presencedetector/HomeAssistentCard.yaml @@ -0,0 +1,170 @@ +type: custom:plotly-graph +title: mmWave Radar Sensor +refresh_interval: 1 +hours_to_show: current_day +layout: + height: 230 + margin: + l: 50 + r: 20 + t: 20 + b: 40 + showlegend: true + xaxis: + dtick: 100 + gridcolor: RGBA(200,200,200,0.15) + zerolinecolor: RGBA(200,200,200,0.15) + type: number + fixedrange: true + range: + - 400 + - -400 + yaxis: + dtick: 100 + gridcolor: RGBA(200,200,200,0.15) + zerolinecolor: RGBA(200,200,200,0.15) + scaleanchor: x + scaleratio: 1 + fixedrange: true + range: + - 750 + - 0 +entities: + - entity: "" + name: Target1 + marker: + size: 12 + line: + shape: spline + width: 5 + x: + - $ex hass.states["sensor.presencedetector_5862a8_target_1_x"].state /-10 + "y": + - $ex hass.states["sensor.presencedetector_5862a8_target_1_y"].state /10 + - entity: "" + name: Target2 + marker: + size: 12 + line: + shape: spline + width: 5 + x: + - $ex hass.states["sensor.presencedetector_5862a8_target_2_x"].state /-10 + "y": + - $ex hass.states["sensor.presencedetector_5862a8_target_2_y"].state /10 + - entity: "" + name: Target3 + marker: + size: 12 + line: + shape: spline + width: 5 + x: + - $ex hass.states["sensor.presencedetector_5862a8_target_3_x"].state /-10 + "y": + - $ex hass.states["sensor.presencedetector_5862a8_target_3_y"].state /10 + - entity: "" + name: Zone1 + mode: lines + fill: toself + fillcolor: RGBA(20,200,0,0.1) + line: + color: RGBA(20,200,0,0.2) + shape: line + width: 2 + x: + - $ex hass.states["number.presencedetector_5862a8_zone_1_x1"].state /-10 + - $ex hass.states["number.presencedetector_5862a8_zone_1_x1"].state /-10 + - $ex hass.states["number.presencedetector_5862a8_zone_1_x2"].state /-10 + - $ex hass.states["number.presencedetector_5862a8_zone_1_x2"].state /-10 + - $ex hass.states["number.presencedetector_5862a8_zone_1_x1"].state /-10 + "y": + - $ex hass.states["number.presencedetector_5862a8_zone_1_y1"].state /10 + - $ex hass.states["number.presencedetector_5862a8_zone_1_y2"].state /10 + - $ex hass.states["number.presencedetector_5862a8_zone_1_y2"].state /10 + - $ex hass.states["number.presencedetector_5862a8_zone_1_y1"].state /10 + - $ex hass.states["number.presencedetector_5862a8_zone_1_y1"].state /10 + - entity: "" + name: Zone2 + mode: lines + fill: toself + fillcolor: RGBA(200,0,255,0.1) + line: + color: RGBA(200,0,255,0.2) + shape: line + width: 2 + x: + - $ex hass.states["number.presencedetector_5862a8_zone_2_x1"].state /-10 + - $ex hass.states["number.presencedetector_5862a8_zone_2_x1"].state /-10 + - $ex hass.states["number.presencedetector_5862a8_zone_2_x2"].state /-10 + - $ex hass.states["number.presencedetector_5862a8_zone_2_x2"].state /-10 + - $ex hass.states["number.presencedetector_5862a8_zone_2_x1"].state /-10 + "y": + - $ex hass.states["number.presencedetector_5862a8_zone_2_y1"].state /10 + - $ex hass.states["number.presencedetector_5862a8_zone_2_y2"].state /10 + - $ex hass.states["number.presencedetector_5862a8_zone_2_y2"].state /10 + - $ex hass.states["number.presencedetector_5862a8_zone_2_y1"].state /10 + - $ex hass.states["number.presencedetector_5862a8_zone_2_y1"].state /10 + - entity: "" + name: Zone3 + mode: lines + fill: toself + fillcolor: RGBA(200,120,55,0.1) + line: + color: RGBA(200,120,55,0.2) + shape: line + width: 2 + x: + - $ex hass.states["number.presencedetector_5862a8_zone_3_x1"].state /-10 + - $ex hass.states["number.presencedetector_5862a8_zone_3_x1"].state /-10 + - $ex hass.states["number.presencedetector_5862a8_zone_3_x2"].state /-10 + - $ex hass.states["number.presencedetector_5862a8_zone_3_x2"].state /-10 + - $ex hass.states["number.presencedetector_5862a8_zone_3_x1"].state /-10 + "y": + - $ex hass.states["number.presencedetector_5862a8_zone_3_y1"].state /10 + - $ex hass.states["number.presencedetector_5862a8_zone_3_y2"].state /10 + - $ex hass.states["number.presencedetector_5862a8_zone_3_y2"].state /10 + - $ex hass.states["number.presencedetector_5862a8_zone_3_y1"].state /10 + - $ex hass.states["number.presencedetector_5862a8_zone_3_y1"].state /10 + - entity: "" + name: Coverage + mode: lines + fill: tonexty + fillcolor: rgba(168, 216, 234, 0.15) + line: + shape: line + width: 1 + dash: dot + x: + - 0 + - $ex 750 * Math.sin((2 * Math.PI)/360 * 60) + - 450 + - 400 + - 300 + - 200 + - 100 + - 0 + - -100 + - -200 + - -300 + - -400 + - -450 + - $ex -750 * Math.sin((2 * Math.PI)/360 * 60) + - 0 + "y": + - 0 + - $ex 750 * Math.cos((2 * Math.PI)/360 * 60) + - $ex Math.sqrt( 750**2 - 450**2 ) + - $ex Math.sqrt( 750**2 - 400**2 ) + - $ex Math.sqrt( 750**2 - 300**2 ) + - $ex Math.sqrt( 750**2 - 200**2 ) + - $ex Math.sqrt( 750**2 - 100**2 ) + - 750 + - $ex Math.sqrt( 750**2 - 100**2 ) + - $ex Math.sqrt( 750**2 - 200**2 ) + - $ex Math.sqrt( 750**2 - 300**2 ) + - $ex Math.sqrt( 750**2 - 400**2 ) + - $ex Math.sqrt( 750**2 - 450**2 ) + - $ex 750 * Math.cos((2 * Math.PI)/360 * 60) + - 0 +raw_plotly_config: true