mirror of
https://github.com/jpawlowski/hass.tibber_prices.git
synced 2026-03-30 05:13:40 +00:00
1 line
No EOL
12 KiB
JavaScript
1 line
No EOL
12 KiB
JavaScript
"use strict";(globalThis.webpackChunkdocs_split_user=globalThis.webpackChunkdocs_split_user||[]).push([[2764],{9338:(e,s,r)=>{r.r(s),r.d(s,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>a,metadata:()=>n,toc:()=>l});const n=JSON.parse('{"id":"sensors","title":"Sensors","description":"Note: This guide is under construction. For now, please refer to the main README for available sensors.","source":"@site/docs/sensors.md","sourceDirName":".","slug":"/sensors","permalink":"/hass.tibber_prices/user/sensors","draft":false,"unlisted":false,"editUrl":"https://github.com/jpawlowski/hass.tibber_prices/tree/main/docs/user/docs/sensors.md","tags":[],"version":"current","lastUpdatedAt":1764985026000,"frontMatter":{"comments":false},"sidebar":"tutorialSidebar","previous":{"title":"Glossary","permalink":"/hass.tibber_prices/user/glossary"},"next":{"title":"Period Calculation","permalink":"/hass.tibber_prices/user/period-calculation"}}');var i=r(4848),t=r(8453);const a={comments:!1},o="Sensors",c={},l=[{value:"Binary Sensors",id:"binary-sensors",level:2},{value:"Best Price Period & Peak Price Period",id:"best-price-period--peak-price-period",level:3},{value:"Core Price Sensors",id:"core-price-sensors",level:2},{value:"Statistical Sensors",id:"statistical-sensors",level:2},{value:"Rating Sensors",id:"rating-sensors",level:2},{value:"Diagnostic Sensors",id:"diagnostic-sensors",level:2},{value:"Chart Metadata",id:"chart-metadata",level:3},{value:"Chart Data Export",id:"chart-data-export",level:3}];function d(e){const s={a:"a",blockquote:"blockquote",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",hr:"hr",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.header,{children:(0,i.jsx)(s.h1,{id:"sensors",children:"Sensors"})}),"\n",(0,i.jsxs)(s.blockquote,{children:["\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Note:"})," This guide is under construction. For now, please refer to the ",(0,i.jsx)(s.a,{href:"https://github.com/jpawlowski/hass.tibber_prices/blob/v0.20.0/README.md",children:"main README"})," for available sensors."]}),"\n"]}),"\n",(0,i.jsxs)(s.blockquote,{children:["\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Tip:"})," Many sensors have dynamic icons and colors! See the ",(0,i.jsx)(s.strong,{children:(0,i.jsx)(s.a,{href:"/hass.tibber_prices/user/dynamic-icons",children:"Dynamic Icons Guide"})})," and ",(0,i.jsx)(s.strong,{children:(0,i.jsx)(s.a,{href:"/hass.tibber_prices/user/icon-colors",children:"Dynamic Icon Colors Guide"})})," to enhance your dashboards."]}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"binary-sensors",children:"Binary Sensors"}),"\n",(0,i.jsx)(s.h3,{id:"best-price-period--peak-price-period",children:"Best Price Period & Peak Price Period"}),"\n",(0,i.jsxs)(s.p,{children:["These binary sensors indicate when you're in a detected best or peak price period. See the ",(0,i.jsx)(s.strong,{children:(0,i.jsx)(s.a,{href:"/hass.tibber_prices/user/period-calculation",children:"Period Calculation Guide"})})," for a detailed explanation of how these periods are calculated and configured."]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.strong,{children:"Quick overview:"})}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Best Price Period"}),": Turns ON during periods with significantly lower prices than the daily average"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Peak Price Period"}),": Turns ON during periods with significantly higher prices than the daily average"]}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"Both sensors include rich attributes with period details, intervals, relaxation status, and more."}),"\n",(0,i.jsx)(s.h2,{id:"core-price-sensors",children:"Core Price Sensors"}),"\n",(0,i.jsx)(s.p,{children:"Coming soon..."}),"\n",(0,i.jsx)(s.h2,{id:"statistical-sensors",children:"Statistical Sensors"}),"\n",(0,i.jsx)(s.p,{children:"Coming soon..."}),"\n",(0,i.jsx)(s.h2,{id:"rating-sensors",children:"Rating Sensors"}),"\n",(0,i.jsx)(s.p,{children:"Coming soon..."}),"\n",(0,i.jsx)(s.h2,{id:"diagnostic-sensors",children:"Diagnostic Sensors"}),"\n",(0,i.jsx)(s.h3,{id:"chart-metadata",children:"Chart Metadata"}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Entity ID:"})," ",(0,i.jsx)(s.code,{children:"sensor.tibber_home_NAME_chart_metadata"})]}),"\n",(0,i.jsxs)(s.blockquote,{children:["\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"\u2728 New Feature"}),": This sensor provides dynamic chart configuration metadata for optimal visualization. Perfect for use with the ",(0,i.jsx)(s.code,{children:"get_apexcharts_yaml"})," action!"]}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This diagnostic sensor provides essential chart configuration values as sensor attributes, enabling dynamic Y-axis scaling and optimal chart appearance in rolling window modes."}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.strong,{children:"Key Features:"})}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Dynamic Y-Axis Bounds"}),": Automatically calculates optimal ",(0,i.jsx)(s.code,{children:"yaxis_min"})," and ",(0,i.jsx)(s.code,{children:"yaxis_max"})," for your price data"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Automatic Updates"}),": Refreshes when price data changes (coordinator updates)"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Lightweight"}),": Metadata-only mode (no data processing) for fast response"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"State Indicator"}),": Shows ",(0,i.jsx)(s.code,{children:"pending"})," (initialization), ",(0,i.jsx)(s.code,{children:"ready"})," (data available), or ",(0,i.jsx)(s.code,{children:"error"})," (service call failed)"]}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.strong,{children:"Attributes:"})}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:(0,i.jsx)(s.code,{children:"timestamp"})}),": When the metadata was last fetched"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:(0,i.jsx)(s.code,{children:"yaxis_min"})}),": Suggested minimum value for Y-axis (optimal scaling)"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:(0,i.jsx)(s.code,{children:"yaxis_max"})}),": Suggested maximum value for Y-axis (optimal scaling)"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:(0,i.jsx)(s.code,{children:"currency"})}),': Currency code (e.g., "EUR", "NOK")']}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:(0,i.jsx)(s.code,{children:"resolution"})}),": Interval duration in minutes (usually 15)"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:(0,i.jsx)(s.code,{children:"error"})}),": Error message if service call failed"]}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.strong,{children:"Usage:"})}),"\n",(0,i.jsxs)(s.p,{children:["The ",(0,i.jsx)(s.code,{children:"tibber_prices.get_apexcharts_yaml"})," action ",(0,i.jsx)(s.strong,{children:"automatically uses this sensor"})," for dynamic Y-axis scaling in ",(0,i.jsx)(s.code,{children:"rolling_window"})," and ",(0,i.jsx)(s.code,{children:"rolling_window_autozoom"})," modes! No manual configuration needed - just enable the action's result with ",(0,i.jsx)(s.code,{children:"config-template-card"})," and the sensor provides optimal Y-axis bounds automatically."]}),"\n",(0,i.jsxs)(s.p,{children:["See the ",(0,i.jsx)(s.strong,{children:(0,i.jsx)(s.a,{href:"/hass.tibber_prices/user/chart-examples",children:"Chart Examples Guide"})})," for practical examples!"]}),"\n",(0,i.jsx)(s.hr,{}),"\n",(0,i.jsx)(s.h3,{id:"chart-data-export",children:"Chart Data Export"}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Entity ID:"})," ",(0,i.jsx)(s.code,{children:"sensor.tibber_home_NAME_chart_data_export"}),"\n",(0,i.jsx)(s.strong,{children:"Default State:"})," Disabled (must be manually enabled)"]}),"\n",(0,i.jsxs)(s.blockquote,{children:["\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"\u26a0\ufe0f Legacy Feature"}),": This sensor is maintained for backward compatibility. For new integrations, use the ",(0,i.jsx)(s.strong,{children:(0,i.jsx)(s.code,{children:"tibber_prices.get_chartdata"})})," service instead, which offers more flexibility and better performance."]}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This diagnostic sensor provides cached chart-friendly price data that can be consumed by chart cards (ApexCharts, custom cards, etc.)."}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.strong,{children:"Key Features:"})}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Configurable via Options Flow"}),": Service parameters can be configured through the integration's options menu (Step 7 of 7)"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Automatic Updates"}),": Data refreshes on coordinator updates (every 15 minutes)"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Attribute-Based Output"}),": Chart data is stored in sensor attributes for easy access"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"State Indicator"}),": Shows ",(0,i.jsx)(s.code,{children:"pending"})," (before first call), ",(0,i.jsx)(s.code,{children:"ready"})," (data available), or ",(0,i.jsx)(s.code,{children:"error"})," (service call failed)"]}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.strong,{children:"Important Notes:"})}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"\u26a0\ufe0f Disabled by default - must be manually enabled in entity settings"}),"\n",(0,i.jsx)(s.li,{children:"\u26a0\ufe0f Consider using the service instead for better control and flexibility"}),"\n",(0,i.jsx)(s.li,{children:"\u26a0\ufe0f Configuration updates require HA restart"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.strong,{children:"Attributes:"})}),"\n",(0,i.jsx)(s.p,{children:"The sensor exposes chart data with metadata in attributes:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:(0,i.jsx)(s.code,{children:"timestamp"})}),": When the data was last fetched"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:(0,i.jsx)(s.code,{children:"error"})}),": Error message if service call failed"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:(0,i.jsx)(s.code,{children:"data"})})," (or custom name): Array of price data points in configured format"]}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.strong,{children:"Configuration:"})}),"\n",(0,i.jsx)(s.p,{children:"To configure the sensor's output format:"}),"\n",(0,i.jsxs)(s.ol,{children:["\n",(0,i.jsxs)(s.li,{children:["Go to ",(0,i.jsx)(s.strong,{children:"Settings \u2192 Devices & Services \u2192 Tibber Prices"})]}),"\n",(0,i.jsxs)(s.li,{children:["Click ",(0,i.jsx)(s.strong,{children:"Configure"})," on your Tibber home"]}),"\n",(0,i.jsxs)(s.li,{children:["Navigate through the options wizard to ",(0,i.jsx)(s.strong,{children:"Step 7: Chart Data Export Settings"})]}),"\n",(0,i.jsx)(s.li,{children:"Configure output format, filters, field names, and other options"}),"\n",(0,i.jsx)(s.li,{children:"Save and restart Home Assistant"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.strong,{children:"Available Settings:"})}),"\n",(0,i.jsxs)(s.p,{children:["See the ",(0,i.jsx)(s.code,{children:"tibber_prices.get_chartdata"})," service documentation below for a complete list of available parameters. All service parameters can be configured through the options flow."]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.strong,{children:"Example Usage:"})}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-yaml",children:"# ApexCharts card consuming the sensor\ntype: custom:apexcharts-card\nseries:\n - entity: sensor.tibber_home_chart_data_export\n data_generator: |\n return entity.attributes.data;\n"})}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.strong,{children:"Migration Path:"})}),"\n",(0,i.jsx)(s.p,{children:"If you're currently using this sensor, consider migrating to the service:"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-yaml",children:'# Old approach (sensor)\n- service: apexcharts_card.update\n data:\n entity: sensor.tibber_home_chart_data_export\n\n# New approach (service)\n- service: tibber_prices.get_chartdata\n data:\n entry_id: YOUR_ENTRY_ID\n day: ["today", "tomorrow"]\n output_format: array_of_objects\n response_variable: chart_data\n'})})]})}function h(e={}){const{wrapper:s}={...(0,t.R)(),...e.components};return s?(0,i.jsx)(s,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}}}]); |