Giter VIP home page Giter VIP logo

Comments (3)

luuuis avatar luuuis commented on June 26, 2024

Olá,

Os sensores dos Tarifários Portugal podem ser usados directamente no Energy do HA, não é necessário fazer conversões nenhumas.
Settings – Home Assistant 2024-03-19 15-56-40

Relativamente aos tarifários, até notícia em contrário estão actualizados. Eu não sigo todos os tarifários do mercado mas conto com as contribuições dos utilizadores neste tópico do CPHA.pt ou aqui no GitHub quando há alguma actualização a fazer.

from hass_omie.

FilipeOS avatar FilipeOS commented on June 26, 2024

Se eu colocar assim como diz (testei) o energy deixa de reportar dados..

Tive de fazer estes 2 sensores:

      - name: "Ibelectra Current Hour Price"
        unit_of_measurement: '€/kWh'
        state_class: measurement
        device_class: monetary
        state: >
          {% set current_hour = now().strftime('%Y-%m-%dT%H:00:00+00:00') %}
          {% set today_hours = state_attr('sensor.template_ibelectra_familia_bihorario', 'today_hours') %}
          {% set current_price_mwh = today_hours.get(current_hour) %}
          {% if current_price_mwh is not none %}
            {{ (current_price_mwh / 1000) | round(4) }}
          {% else %}
            0
          {% endif %}

      - name: "Energia Simples Current Hour Price"
        unit_of_measurement: '€/kWh'
        state_class: measurement
        device_class: monetary
        state: >
          {% set current_hour = now().strftime('%Y-%m-%dT%H:00:00+00:00') %}
          {% set today_hours = state_attr('sensor.template_energia_simples_excedente_indexado', 'today_hours') %}
          {% set current_price_mwh = today_hours.get(current_hour) %}
          {% if current_price_mwh is not none %}
            {{ (current_price_mwh / 1000) | round(4) }}
          {% else %}
            0
          {% endif %}

from hass_omie.

luuuis avatar luuuis commented on June 26, 2024

Não é necessário, deve haver por aí algum outro problema qualquer que pode estar a causar isso. Há erros nas estatísticas dos sensores dos tarifários?

https://my.home-assistant.io/redirect/developer_statistics/

from hass_omie.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.