Git Product home page Git Product logo

sensor.drivvo's Introduction

hacs_badge hacs_badge

Drivvo Custom Integration Home Assistant

topo.png

Custom integration for the Home Assistant to obtain information present in drivvo.com.

Install

Installation via HACS

Have HACS installed, this will allow you to update easily.

Adding Drivvo to HACS can be using this button:

image

If the button above doesn't work, add https://github.com/hudsonbrendon/sensor.drivvo as a custom repository of type Integration in HACS.

  • Click Install on the Drivvo integration.
  • Restart the Home Assistant.

Manual installation

  • Copy drivvo folder from latest release to your <config dir>/custom_components/ directory.
  • Restart the Home Assistant.

Configuration

Adding Drivvo to your Home Assistant instance can be done via the UI using this button:

image

Manual Configuration

If the button above doesn't work, you can also perform the following steps manually:

  • Navigate to your Home Assistant instance.
  • In the sidebar, click Settings.
  • From the Setup menu, select: Devices & Services.
  • In the lower right corner, click the Add integration button.
  • In the list, search and select Drivvo.
  • Follow the on-screen instructions to complete the setup.

Debugging

To enable debug for Drivvo integration, add following to your configuration.yaml:

logger:
  default: info
  logs:
    custom_components.drivvo: debug

Make a card

To view drivvo information, follow an example of a card. Remember to replace the entities present on the card with your entities.

type: custom:config-template-card
entities:
  - sensor.nissan_march_abastecimento
card:
  type: entities
  show_header_toggle: 'off'
  style: |
    .card-header {
      padding: 0px 0px 0px 0px !important;
    }
  entities:
    - type: custom:hui-vertical-stack-card
      cards:
        - type: horizontal-stack
          cards:
            - type: picture
              style: |
                ha-card {
                    --paper-card-background-color: 'rgba(0, 0, 0, 0.0)';
                    --ha-card-background: "rgba(0, 0, 0, 0.0)";
                    --ha-card-box-shadow: 'none';
                }
              image: /local/images/nissan.png
            - type: custom:button-card
              layout: icon_name_state2nd
              show_icon: true
              show_state: true
              styles:
                grid:
                  - grid-template-columns: 50px auto
                icon:
                  - padding: 0px 0px
                  - height: 100px
                  - width: 30px
                card:
                  - '--ha-card-background': rgba(0, 0, 0, 0.0)
                  - '--ha-card-box-shadow': none
                state:
                  - padding: 0px 10px
                  - justify-self: start
                  - font-family: Roboto, sans-serif
                  - font-size: 15px
                name:
                  - padding: 0px 10px
                  - justify-self: start
                  - color: var(--secondary-text-color)
              entity: device_tracker.nissan_march
              name: Localização
              icon: mdi:car
        - type: custom:bar-card
          show_icon: true
          align: split
          columns: 1
          max: 41
          positions:
            icon: inside
            indicator: inside
            name: inside
            value: inside
          unit_of_measurement: Litros
          animation: 'on'
          severity:
            - color: '#fd0000'
              from: 1
              to: 19
            - color: '#ffaa00'
              from: 20
              to: 29
            - color: '#2CE026'
              from: 30
              to: 41
          style: |
            ha-card {
                --paper-card-background-color: 'rgba(0, 0, 0, 0.0)';
                --ha-card-background: "rgba(0, 0, 0, 0.0)";
                --paper-item-icon-color: 'var(--text-primary-color';
                --ha-card-box-shadow: 'none';
            }
          entities:
            - entity: sensor.nissan_march_abastecimento
              attribute: volume_de_combustivel
          name: Volume de combustível
          entity_row: true
        - type: custom:apexcharts-card
          chart_type: line
          header:
            title: Nissan March
            show: true
            show_states: true
            colorize_states: true
          series:
            - entity: sensor.nissan_march_abastecimento
              attribute: odometro
              type: column
              name: Odômetro
              unit: km
            - entity: sensor.nissan_march_abastecimento
              attribute: preco_do_combustivel
              type: column
              name: Preço atual da gasolina
              unit: R$
              float_precision: 2
            - entity: sensor.nissan_march_abastecimento
              attribute: valor_total_pago
              type: column
              name: Valor total pago
              unit: R$
              float_precision: 2
            - entity: sensor.nissan_march_abastecimento
              attribute: soma_total_de_valores_pagos_em_todos_os_abastecimentos
              type: column
              name: Total pago em todos os abestecimentos até então
              unit: R$
              float_precision: 2
            - entity: sensor.nissan_march_abastecimento
              attribute: km_percorridos_desde_o_ultimo_abastecimento
              type: column
              name: Kms percorridos desde o último abastecimento
              unit: Km
            - entity: sensor.gasolina_media_natal
              type: column
              name: Preço médio da gasolina
              unit: R$
              float_precision: 2
            - entity: sensor.nissan_march_abastecimento
              type: column
              name: Abastecimentos
              unit: Abastecimentos

After setup, the card above will look like this:

image

logo.png

sensor.drivvo's People

Contributors

cmolinaord avatar daluzguilherme avatar dougiteixeira avatar hudsonbrendon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

sensor.drivvo's Issues

Stopped working

As of today, the sensors stopped updating. A power cycle yielded no positive results. Has this happened to anyone else?

Missing Sensors

Once integrated, only exposes one entity (refuelings).

Many attributes are present under the refueling sensor, but the example car references entities which do not exist.

Problema ao mostrar volume do combustível

Os dois cards que tenho mostram o volume do combustível sempre no verde máximo.
Ao analisar os atributos, não importa o que coloque o valor não altera, apenas se eu retirar o atributo ele mostra uma litragem que não condiz.

image

image

image

General average does not match the value of the app

When doing the app analysis, and the sensor attribute analysis, I noticed that the overall average is not the same as what it shows in the app.

General average showing the value of 7.17 km/L
image

General average showing the value of 2.90 km/L

image

Currency symbol ($) is incorrectly located

In North America (Canada and USA), the currency symbol for the dollar ($) is always shown in front of the value, however the integration has it appearing after the value.

Is this something that can be adjusted in the code if a unit of $ for currency is entered?

See below screenshot with the currency symbol at the end instead of at the beginning.

image

Google authentication problem

Hello everyone!
I installed the integration in Home Assistant, and I try to connect by entering the address and password, but I logged in using Google, and entering the address I can't connect. Did someone succeed?

Last refill volume

Hello!
Someway the last refill volume is missing from the attributes, I don't know the last version when it worked; I know I can make a sensor to calculate it (using unit price and total price paid), but it would make sense to be an attribute has it was. Is it possible, please, to reeintroduce it in the sensor again?
Thank you very much for your integration, and sorry for my english!

adicionar mais de um veiculo

Olá!

Eu tenho mais de um veiculo que gostaria de estar monitorando. Porem notei que quando tento realizar a adição deste segundo não funciona!

É alguma limitação mesmo da integração ou será que estou realizando algo errado?

A proposito, parabens pelo projeto!

Invalid device info

Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:624
Integration: Sensor (documentation, issues)
First occurred: 09:58:48 (1 occurrences)
Last logged: 09:58:48

Ignoring invalid device info: Invalid device info {'configuration_url': 'https://web.drivvo.com/', 'default_manufacturer': 'Drivvo', 'default_model': 'Ford/C-Max', 'entry_type': <DeviceEntryType.SERVICE: 'service'>, 'identifiers': {('drivvo', '978231')}, 'name': 'Ford'} for 'drivvo' config entry: device info needs to either describe a device, link to existing device or provide extra information.

Won't reconfigure

Today Drivvo has come up that it needs reconfiguring but when I try it says invalid authentication.
My email and password have not changed so I don't understand why.

Support login using google

Drivvo website supports login using Google, is it possible to make this repo using loginGoogle?
thanks :)

Write access to add refilling via program?

Hi,
thanks for the integration. I have a question though: is it possible to make refills writable from HA? I have an electric car and since my charger is also connected to HA it would be nice if I could upload the details of the charging session automatically to Drivvo (I have the amount of kWh and also the last milage of the car from its own integration).
It could have a service where you could add the details.
What do you think? Is it possible?
Thanks

Data not updating

Not seeing any updates in HA. Tried reloading Drivvo service in HA but still no updated data. Using free version of drivvo.

Problem ? No data

Hello

On HA i see info from drivvo but only about fuel

Can you help me ? Thanks

image

image

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.