mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-06-01 07:46:49 +00:00

* 🔥 Removes octopress.js * 🔥 Removes use of root_url var * 🔥 Removes Octopress generator reference from feed * 🔥 Removes delicious support * 🔥 Removes support for Pinboard * 🔥 Removes support for Disqus * 🔥 Removes support for Google Plus * ↩️ Migrate custom after_footer to default template * ↩️ Migrate custom footer to default template * ↩️ Migrate custom header to default template * 🔥 Removes unused template files * 🚀 Places time to read directly in post template * 🚀 Removes unneeded capture from archive_post.html template * 🔥 🚀 Removes unused, but heaving sorting call in component page * 🚀 Merged javascripts into a single file * 🔥 Removes more uses of root_url * 🚀 Removal of unneeded captures from head * 🔥 🚀 Removal of expensive liquid HTML compressor * 🔥 Removes unneeded templates * 🚀 Replaces kramdown with GitHub's CommonMark 🚀 * 💄 Adds Prism code syntax highlighting * ✨ Adds support for redirect in Netlify * ↩️ 🔥 Let Netlify handle all developer doc redirects * ✏️ Fixes typo in redirects file: Netify -> Netlify * 🔥 Removes unused .themes folder * 🔥 Removes unused aside.html template * 🔥 Removes Disqus config leftover * 🔥 Removes rouge highlighter config * 🔥 Removes Octopress 🎉 * 💄 Adjust code block font size and adds soft wraps * 💄 Adds styling for inline code blocks * 💄 Improve styling of note/warning/info boxes + div support * 🔨 Rewrites all note/warning/info boxes
75 lines
2.5 KiB
Markdown
75 lines
2.5 KiB
Markdown
---
|
|
title: "PVOutput Sensor"
|
|
description: "Instructions on how to use PVOutput within Home Assistant."
|
|
logo: pvoutput.png
|
|
ha_category:
|
|
- Energy
|
|
ha_release: 0.33
|
|
ha_iot_class: Cloud Polling
|
|
redirect_from:
|
|
- /components/sensor.pvoutput/
|
|
---
|
|
|
|
The `pvoutput` sensor platform consumes information from [PVOutput](http://pvoutput.org/) which were uploaded by your solar photovoltaic (PV) system.
|
|
|
|
To add PVOutput details to your installation, add the following to your `configuration.yaml` file:
|
|
|
|
```yaml
|
|
# Example configuration.yaml entry
|
|
sensor:
|
|
- platform: pvoutput
|
|
system_id: YOUR_SYSTEM_ID
|
|
api_key: YOUR_API_KEY
|
|
scan_interval: 120
|
|
```
|
|
|
|
{% configuration %}
|
|
api_key:
|
|
description: Your API key. A read-only key is fine.
|
|
required: true
|
|
type: string
|
|
system_id:
|
|
description: The ID of your station.
|
|
required: true
|
|
type: string
|
|
name:
|
|
description: Name of the sensor.
|
|
required: false
|
|
default: PVOutput
|
|
type: string
|
|
{% endconfiguration %}
|
|
|
|
<div class='note warning'>
|
|
|
|
It's recommended to set `scan_interval:` according to a value greater than 60 seconds. The service only allows 60 requests per hour but the sensor's default is 30 seconds.
|
|
|
|
</div>
|
|
|
|
To format the PVoutput sensor it's recommended to use the [template component](/topics/templating/). For example:
|
|
|
|
```yaml
|
|
sensor:
|
|
- platform: pvoutput
|
|
system_id: YOUR_SYSTEM_ID
|
|
api_key: YOUR_API_KEY
|
|
scan_interval: 150
|
|
- platform: template
|
|
sensors:
|
|
power_consumption:
|
|
value_template: {% raw %}'{% if is_state_attr("sensor.pvoutput", "power_consumption", "NaN") %}0{% else %}{{ state_attr('sensor.pvoutput', 'power_consumption') }}{% endif %}'{% endraw %}
|
|
friendly_name: 'Using'
|
|
unit_of_measurement: 'Watt'
|
|
energy_consumption:
|
|
value_template: {% raw %}'{{ "%0.1f"|format(state_attr('sensor.pvoutput', 'energy_consumption')|float/1000) }}'{% endraw %}
|
|
friendly_name: 'Used'
|
|
unit_of_measurement: 'kWh'
|
|
power_generation:
|
|
value_template: {% raw %}'{% if is_state_attr("sensor.pvoutput", "power_generation", "NaN") %}0{% else %}{{ state_attr('sensor.pvoutput', 'power_generation') }}{% endif %}'{% endraw %}
|
|
friendly_name: 'Generating'
|
|
unit_of_measurement: 'Watt'
|
|
energy_generation:
|
|
value_template: {% raw %}'{% if is_state_attr("sensor.pvoutput", "energy_generation", "NaN") %}0{% else %}{{ "%0.2f"|format(state_attr('sensor.pvoutput', 'energy_generation')|float/1000) }}{% endif %}'{% endraw %}
|
|
friendly_name: 'Generated'
|
|
unit_of_measurement: 'kWh'
|
|
```
|