{"id":10374,"date":"2026-09-09T07:20:00","date_gmt":"2026-09-09T05:20:00","guid":{"rendered":"https:\/\/www.lukaswojcik.com\/blog\/?p=10374"},"modified":"2026-09-04T23:51:47","modified_gmt":"2026-09-04T21:51:47","slug":"why-a-sensor-never-reaches-the-energy-dashboard","status":"publish","type":"post","link":"https:\/\/www.lukaswojcik.com\/blog\/en\/smart-home\/why-a-sensor-never-reaches-the-energy-dashboard\/","title":{"rendered":"Home Assistant Energy Dashboard: Device Class, Unit and State Class in the Discovery Payload"},"content":{"rendered":"<p>The sensor arrives. It shows a number, the number changes, the history draws a line. Then the energy dashboard is opened, the list of possible sources is short, and the sensor is not in it &#8211; with no error anywhere, because from the system&#8217;s point of view nothing went wrong.<\/p>\n<p>What is missing is agreement between three fields of the discovery payload. Each one is optional, each one is accepted on its own, and only the combination decides whether an entity is a number on a graph or a quantity that can be added up.<\/p>\n<figure class=\"lw-diagram\">\n<img decoding=\"async\" src=\"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/diagrams\/energieuebersicht-en.png\" width=\"1120\" height=\"580\" loading=\"lazy\" alt=\"A Home Assistant MQTT discovery payload with device_class, unit_of_measurement and state_class highlighted and connected to three explanations\"><figcaption>Everything outside the three highlighted lines decides what the entity is called. Those three decide where it can be used.<\/figcaption><\/figure>\n<h2>Where the Payload Goes and Why It Stays There<\/h2>\n<p>Discovery is a message on a topic the broker keeps: <code>homeassistant\/&lt;component&gt;\/&lt;node&gt;\/&lt;object&gt;\/config<\/code>, published with the retain flag. Retained means the broker hands it to Home Assistant again after every restart, which is what makes an MQTT device survive a reboot without a device sending anything.<\/p>\n<pre class=\"wp-block-kevinbatdorf-code-block-pro\"><code># create, retained\nmosquitto_pub -h broker -r -t \"homeassistant\/sensor\/zaehler01\/energie\/config\" -m \"$(cat sensor.json)\"\n\n# remove: an empty payload on the same topic, retained again\nmosquitto_pub -h broker -r -t \"homeassistant\/sensor\/zaehler01\/energie\/config\" -m \"\"<\/code><\/pre>\n<p>The second command is the one that is usually missing. Deleting the entity in the interface removes it until the next restart, at which point the broker replays the retained config and the device is back. An MQTT entity is only gone when the topic that created it is empty.<\/p>\n<h2>The Three Fields That Decide Everything<\/h2>\n<p><code>device_class<\/code> declares what kind of quantity this is, and by doing so fixes the set of units that may accompany it. For <code>energy<\/code> that set is Wh, kWh and MWh. For <code>power<\/code> it is W and kW, and a power sensor is not a candidate for an energy source no matter what else the payload says &#8211; watts are a rate, and a dashboard that adds up rates would be wrong.<\/p>\n<p><code>unit_of_measurement<\/code> is compared literally. <code>kWh<\/code> passes; <code>kwh<\/code> and <code>KWH<\/code> do not, and the result of failing is not a rejected payload but an entity whose unit does not match its class and which therefore cannot be selected. This is the single most common cause, and it is invisible from every screen except the one where the entity refuses to appear.<\/p>\n<p><code>state_class<\/code> decides whether long-term statistics are recorded at all. Without it, the value is kept in the short-term history and nothing more; with the wrong one, the same. Only <code>total<\/code> and <code>total_increasing<\/code> produce the hourly sums that an energy dashboard reads.<\/p>\n<h2>total_increasing, total, measurement<\/h2>\n<p><code>total_increasing<\/code> is for meters that only count up. A drop is interpreted as a meter reset &#8211; a replaced device, a firmware that starts at zero &#8211; and the new value is counted from there rather than as negative consumption. It needs no <code>last_reset<\/code> and it is the right choice for almost every energy meter.<\/p>\n<p><code>total<\/code> is for values that can also fall, such as a net balance, and it expects a <code>last_reset<\/code> timestamp to know when a cycle began. <code>measurement<\/code> is for everything that is a state rather than a sum: temperature, power, humidity. It is the default people reach for because it sounds neutral, and it is the reason a perfectly good meter reading produces a beautiful graph and never a single kilowatt hour.<\/p>\n<p>One detail of <code>total_increasing<\/code> is worth knowing before it happens: a value that jitters downward is read as a reset if the drop is large enough, and the entire new reading is then booked as consumption in that hour. A meter that occasionally reports a stale, lower value therefore does not produce a small error but a spike the size of the whole meter reading.<\/p>\n<h2>Which Symptom Comes from Which Line<\/h2>\n<table style=\"width:100%;border-collapse:collapse\">\n<thead>\n<tr>\n<th style=\"vertical-align:top\">Symptom<\/th>\n<th>Cause in the payload<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"vertical-align:top\">Entity exists, cannot be chosen as an energy source<\/td>\n<td><code>state_class<\/code> missing or set to <code>measurement<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"vertical-align:top\">Entity exists, unit shown but never summed<\/td>\n<td>unit does not match <code>device_class<\/code>, e.g. <code>kwh<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"vertical-align:top\">Entity cannot be renamed or edited in the interface<\/td>\n<td><code>unique_id<\/code> missing &#8211; and without it, no energy source either<\/td>\n<\/tr>\n<tr>\n<td style=\"vertical-align:top\">A single enormous spike in one hour<\/td>\n<td><code>total_increasing<\/code> on a meter that reported a lower value<\/td>\n<\/tr>\n<tr>\n<td style=\"vertical-align:top\">Value frozen for days, consumption reads zero<\/td>\n<td>no <code>availability_topic<\/code> and no <code>expire_after<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"vertical-align:top\">A deleted device returns after a restart<\/td>\n<td>the retained config topic was never emptied<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Five of the six show up as something other than an error. That is the shape of the whole problem: a discovery payload is accepted or ignored field by field, and a field that is ignored leaves no trace beyond the capability it silently withheld.<\/p>\n<h2>The Sensor That Keeps Its Last Value Forever<\/h2>\n<p>An MQTT sensor with no availability handling has no concept of being offline. The last value that arrived stays on screen, and for a meter reading that is worse than a gap: the number looks plausible, the graph is flat, and the energy dashboard reports a household that consumed nothing since Tuesday.<\/p>\n<p><code>availability_topic<\/code> with a last will on the device side is the clean solution, and <code>expire_after<\/code> is the blunt one &#8211; a number of seconds after which the state becomes unavailable if nothing new has arrived. For a meter that publishes every ten seconds, three hundred is generous and still catches a dead device within five minutes.<\/p>\n<h2>Statistics Do Not Look Back<\/h2>\n<p>Long-term statistics are computed once an hour from the states that were recorded in that hour. A payload corrected on Friday does not produce statistics for Monday through Thursday, because there were none to compute from &#8211; the states existed, but nothing was told to sum them.<\/p>\n<p>The hole can be closed by hand in the statistics editor under the developer tools, which allows individual sums to be adjusted, and that is worth doing for a meter whose readings matter. It is also the reason the three fields deserve a check on the day a device is added rather than at the end of the month: everything else in a discovery payload can be fixed later without losing anything.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Device class, unit and state class are three lines of a discovery payload, and all three have to agree before an entity can be picked as an energy source. None of them reports an error when it does not.<\/p>\n","protected":false},"author":1,"featured_media":15161,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[91106,91626],"class_list":["post-10374","post","type-post","status-publish","format-standard","hentry","category-smart-home","tag-automation","tag-smart-home-de"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Home Assistant Energy Dashboard: Device Class, Unit and State Class in the Discovery Payload - Lukas Wojcik - Blog<\/title>\n<meta name=\"description\" content=\"device_class, unit_of_measurement and state_class in a Home Assistant discovery payload: which combinations are accepted, and why a rejected one fails silently.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.lukaswojcik.com\/blog\/en\/smart-home\/why-a-sensor-never-reaches-the-energy-dashboard\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Home Assistant Energy Dashboard: Device Class, Unit and State Class in the Discovery Payload - Lukas Wojcik - Blog\" \/>\n<meta property=\"og:description\" content=\"device_class, unit_of_measurement and state_class in a Home Assistant discovery payload: which combinations are accepted, and why a rejected one fails silently.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.lukaswojcik.com\/blog\/en\/smart-home\/why-a-sensor-never-reaches-the-energy-dashboard\/\" \/>\n<meta property=\"og:site_name\" content=\"Lukas Wojcik - Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-09T05:20:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-10374-why-a-sensor-never-reaches-the-energ-n.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"luky\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"luky\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/smart-home\\\/why-a-sensor-never-reaches-the-energy-dashboard\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/smart-home\\\/why-a-sensor-never-reaches-the-energy-dashboard\\\/\"},\"author\":{\"name\":\"luky\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"headline\":\"Home Assistant Energy Dashboard: Device Class, Unit and State Class in the Discovery Payload\",\"datePublished\":\"2026-09-09T05:20:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/smart-home\\\/why-a-sensor-never-reaches-the-energy-dashboard\\\/\"},\"wordCount\":966,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"image\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/smart-home\\\/why-a-sensor-never-reaches-the-energy-dashboard\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-10374-why-a-sensor-never-reaches-the-energ-n.png\",\"keywords\":[\"Automation\",\"Smart Home\"],\"articleSection\":[\"Smart Home\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/smart-home\\\/why-a-sensor-never-reaches-the-energy-dashboard\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/smart-home\\\/why-a-sensor-never-reaches-the-energy-dashboard\\\/\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/smart-home\\\/why-a-sensor-never-reaches-the-energy-dashboard\\\/\",\"name\":\"Home Assistant Energy Dashboard: Device Class, Unit and State Class in the Discovery Payload - Lukas Wojcik - Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/smart-home\\\/why-a-sensor-never-reaches-the-energy-dashboard\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/smart-home\\\/why-a-sensor-never-reaches-the-energy-dashboard\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-10374-why-a-sensor-never-reaches-the-energ-n.png\",\"datePublished\":\"2026-09-09T05:20:00+00:00\",\"description\":\"device_class, unit_of_measurement and state_class in a Home Assistant discovery payload: which combinations are accepted, and why a rejected one fails silently.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/smart-home\\\/why-a-sensor-never-reaches-the-energy-dashboard\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/smart-home\\\/why-a-sensor-never-reaches-the-energy-dashboard\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/smart-home\\\/why-a-sensor-never-reaches-the-energy-dashboard\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-10374-why-a-sensor-never-reaches-the-energ-n.png\",\"contentUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-10374-why-a-sensor-never-reaches-the-energ-n.png\",\"width\":1200,\"height\":630,\"caption\":\"Home Assistant Energy Dashboard: Device Class, Unit and State Class in the Discovery Payload\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/smart-home\\\/why-a-sensor-never-reaches-the-energy-dashboard\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Home Assistant Energy Dashboard: Device Class, Unit and State Class in the Discovery Payload\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/\",\"name\":\"Lukas Wojcik - Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\",\"name\":\"luky\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"contentUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"width\":424,\"height\":636,\"caption\":\"luky\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\"},\"sameAs\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\"],\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/author\\\/luky\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Home Assistant Energy Dashboard: Device Class, Unit and State Class in the Discovery Payload - Lukas Wojcik - Blog","description":"device_class, unit_of_measurement and state_class in a Home Assistant discovery payload: which combinations are accepted, and why a rejected one fails silently.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.lukaswojcik.com\/blog\/en\/smart-home\/why-a-sensor-never-reaches-the-energy-dashboard\/","og_locale":"en_US","og_type":"article","og_title":"Home Assistant Energy Dashboard: Device Class, Unit and State Class in the Discovery Payload - Lukas Wojcik - Blog","og_description":"device_class, unit_of_measurement and state_class in a Home Assistant discovery payload: which combinations are accepted, and why a rejected one fails silently.","og_url":"https:\/\/www.lukaswojcik.com\/blog\/en\/smart-home\/why-a-sensor-never-reaches-the-energy-dashboard\/","og_site_name":"Lukas Wojcik - Blog","article_published_time":"2026-09-09T05:20:00+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-10374-why-a-sensor-never-reaches-the-energ-n.png","type":"image\/png"}],"author":"luky","twitter_card":"summary_large_image","twitter_misc":{"Written by":"luky","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/smart-home\/why-a-sensor-never-reaches-the-energy-dashboard\/#article","isPartOf":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/smart-home\/why-a-sensor-never-reaches-the-energy-dashboard\/"},"author":{"name":"luky","@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"headline":"Home Assistant Energy Dashboard: Device Class, Unit and State Class in the Discovery Payload","datePublished":"2026-09-09T05:20:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/smart-home\/why-a-sensor-never-reaches-the-energy-dashboard\/"},"wordCount":966,"commentCount":0,"publisher":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"image":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/smart-home\/why-a-sensor-never-reaches-the-energy-dashboard\/#primaryimage"},"thumbnailUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-10374-why-a-sensor-never-reaches-the-energ-n.png","keywords":["Automation","Smart Home"],"articleSection":["Smart Home"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.lukaswojcik.com\/blog\/en\/smart-home\/why-a-sensor-never-reaches-the-energy-dashboard\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/smart-home\/why-a-sensor-never-reaches-the-energy-dashboard\/","url":"https:\/\/www.lukaswojcik.com\/blog\/en\/smart-home\/why-a-sensor-never-reaches-the-energy-dashboard\/","name":"Home Assistant Energy Dashboard: Device Class, Unit and State Class in the Discovery Payload - Lukas Wojcik - Blog","isPartOf":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/smart-home\/why-a-sensor-never-reaches-the-energy-dashboard\/#primaryimage"},"image":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/smart-home\/why-a-sensor-never-reaches-the-energy-dashboard\/#primaryimage"},"thumbnailUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-10374-why-a-sensor-never-reaches-the-energ-n.png","datePublished":"2026-09-09T05:20:00+00:00","description":"device_class, unit_of_measurement and state_class in a Home Assistant discovery payload: which combinations are accepted, and why a rejected one fails silently.","breadcrumb":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/smart-home\/why-a-sensor-never-reaches-the-energy-dashboard\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.lukaswojcik.com\/blog\/en\/smart-home\/why-a-sensor-never-reaches-the-energy-dashboard\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/smart-home\/why-a-sensor-never-reaches-the-energy-dashboard\/#primaryimage","url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-10374-why-a-sensor-never-reaches-the-energ-n.png","contentUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-10374-why-a-sensor-never-reaches-the-energ-n.png","width":1200,"height":630,"caption":"Home Assistant Energy Dashboard: Device Class, Unit and State Class in the Discovery Payload"},{"@type":"BreadcrumbList","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/smart-home\/why-a-sensor-never-reaches-the-energy-dashboard\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.lukaswojcik.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Home Assistant Energy Dashboard: Device Class, Unit and State Class in the Discovery Payload"}]},{"@type":"WebSite","@id":"https:\/\/www.lukaswojcik.com\/blog\/#website","url":"https:\/\/www.lukaswojcik.com\/blog\/","name":"Lukas Wojcik - Blog","description":"","publisher":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.lukaswojcik.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9","name":"luky","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","contentUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","width":424,"height":636,"caption":"luky"},"logo":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg"},"sameAs":["https:\/\/www.lukaswojcik.com\/blog"],"url":"https:\/\/www.lukaswojcik.com\/blog\/author\/luky\/"}]}},"_links":{"self":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/10374","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/comments?post=10374"}],"version-history":[{"count":2,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/10374\/revisions"}],"predecessor-version":[{"id":15005,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/10374\/revisions\/15005"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/media\/15161"}],"wp:attachment":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/media?parent=10374"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/categories?post=10374"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/tags?post=10374"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}