All Projects → iprak → Yahoofinance

iprak / Yahoofinance

Licence: mit
Home Assistant component which allows you to get stock updates from Yahoo finance.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Yahoofinance

addon-mopidy
Mopidy - Home Assistant Community Add-ons
Stars: ✭ 42 (+50%)
Mutual labels:  home-assistant, homeassistant
Vacuum Card
Vacuum cleaner card for Home Assistant Lovelace UI
Stars: ✭ 295 (+953.57%)
Mutual labels:  home-assistant, homeassistant
Home assistant
My personal Home Assistant setup - Running on a HassOS VM.
Stars: ✭ 270 (+864.29%)
Mutual labels:  home-assistant, homeassistant
addon-airsonos
AirSonos - Home Assistant Community Add-ons
Stars: ✭ 50 (+78.57%)
Mutual labels:  home-assistant, homeassistant
Repository
Home Assistant Community Add-ons
Stars: ✭ 520 (+1757.14%)
Mutual labels:  home-assistant, homeassistant
addon-appdaemon
AppDaemon4 - Home Assistant Community Add-ons
Stars: ✭ 66 (+135.71%)
Mutual labels:  home-assistant, homeassistant
Unifiprotect
Control and monitor your Unifi Protect Cameras from Home Assistant
Stars: ✭ 279 (+896.43%)
Mutual labels:  home-assistant, homeassistant
home-assistant-frigidaire
Custom component for the Frigidaire integration
Stars: ✭ 11 (-60.71%)
Mutual labels:  home-assistant, homeassistant
Replaylightshistory
AppDaemon App for Home Assistant to replay light switch history when no one is home.
Stars: ✭ 17 (-39.29%)
Mutual labels:  home-assistant, homeassistant
Homeassistant
Home Assistant Configuration Files and Documentation
Stars: ✭ 395 (+1310.71%)
Mutual labels:  home-assistant, homeassistant
entur-card
Home Assistant Lovelace card card for the Entur public transport component.
Stars: ✭ 38 (+35.71%)
Mutual labels:  home-assistant, homeassistant
Smarthome
SmartHome: firmware per ESP8266 - Casa domotica
Stars: ✭ 28 (+0%)
Mutual labels:  home-assistant, homeassistant
hass-actron
Actron Air Conditioner Add-On for Home Assistant
Stars: ✭ 14 (-50%)
Mutual labels:  home-assistant, homeassistant
ha-zoom-automation
Custom Home Assistant component for Zoom. Tracks when you are connected to a Zoom call by default but may allow you to track more.
Stars: ✭ 47 (+67.86%)
Mutual labels:  home-assistant, homeassistant
esphome-weather-station
ESPHome version of Elektor weather station v2
Stars: ✭ 140 (+400%)
Mutual labels:  home-assistant, homeassistant
Awesome Home Assistant
A curated list of amazingly awesome Home Assistant resources.
Stars: ✭ 3,487 (+12353.57%)
Mutual labels:  home-assistant, homeassistant
home
Monorepo for all home automation related development, including integrated firmware, PCBs, configuration, and bridges
Stars: ✭ 104 (+271.43%)
Mutual labels:  home-assistant, homeassistant
HomeAssistant
My Home Assistant Configuration
Stars: ✭ 71 (+153.57%)
Mutual labels:  home-assistant, homeassistant
Home Assistantconfig
🏠 Home Assistant configuration & Documentation for my Smart House. Write-ups, videos, part lists, and links throughout. Be sure to ⭐ it. Updated FREQUENTLY!
Stars: ✭ 3,687 (+13067.86%)
Mutual labels:  home-assistant, homeassistant
Ble monitor
Xiaomi Mijia BLE MiBeacon monitor
Stars: ✭ 611 (+2082.14%)
Mutual labels:  home-assistant, homeassistant

Summary

A custom component to display stock information from Yahoo finance.

Currency details can be presented in an different currency than what is reported (target_currency). Data is downloaded at regular intervals (scan_interval) but a retry is attempted after 20 seconds in case of failure.

Installation

This can be installed through HACS or by copying all the files from custom_components/yahoofinance/ to <config directory>/custom_components/yahoofinance/.

Configuration

Define the symbols to be tracked and optional parameters in configuration.yaml.

# Example configuration.yaml entry
yahoofinance:
  symbols:
    - ISTNX

The above configuration will generate an entity with the id yahoofinance.istnx and current value as the state along with these attributes:

attribution: Data provided by Yahoo Finance
currencySymbol: $
symbol: ISTNX
quoteType: MUTUALFUND
quoteSourceName: Delayed Quote
averageDailyVolume10Day: 16
averageDailyVolume3Month: 1745
fiftyDayAverage: 284.3
fiftyDayAverageChange: -17.09
fiftyDayAverageChangePercent: -0.0
postMarketChange: -0.03
postMarketChangePercent: -0.1
postMarketPrice: 267.
regularMarketChange: 0.34
regularMarketChangePercent: 0.13
regularMarketDayHigh: 27
regularMarketDayLow: 26
regularMarketPreviousClose: 26
regularMarketPrice: 267.25
regularMarketVolume: 14
twoHundredDayAverage: 261.2
twoHundredDayAverageChange: 6.0
twoHundredDayAverageChangePercent: 0.02
trending: up
unit_of_measurement: USD
friendly_name: ...
icon: 'mdi:trending-up'

Optional Configuration

  • Data fetch interval can be adjusted by specifying the scan_interval setting whose default value is 6 hours and the minimum value is 30 seconds.

    scan_interval:
      hours: 4
    

    You can disable automatic update by passing None for scan_interval.

  • Trending icons (trending-up, trending-down or trending-neutral) can be displayed instead of currency based icon by specifying show_trending_icon.

    show_trending_icon: true
    
  • All numeric values are by default rounded to 2 places of decimal. This can be adjusted by the decimal_places setting. A value of 0 will return in integer values and -1 will suppress rounding.

    decimal_places: 3
    
  • An alternate target currency can be specified for a symbol using the extended declaration format. Here, the symbol EMIM.L is reported in USD but will be presented in EUR. The conversion would be based on the value of the symbol USDEUR=X.

    symbols:
      - symbol: EMIM.L
        target_currency: EUR
    

    If data for the target currency is not found, then the display will remain in original currency. The conversion is only applied on the attributes representing prices.

Examples

  • The symbol can also represent a financial index such as this.

    symbols:
      - ^SSMI
    
  • Yahoo also provides currency conversion as a symbol.

    symbols:
      - GBPUSD=X
    
  • The trending icons themselves cannot be colored but colors can be added using browser_mod. Here auto-entities is being used to simplify the code.

    - type: custom:auto-entities
      card:
        type: entities
        title: Financial
      filter:
        include:
          - group: group.stocks
            options:
              entity: this.entity_id
              style: |
                :host {
                  --paper-item-icon-color: {% set value=state_attr(config.entity,"trending") %}
                                          {% if value=="up" -%} green
                                          {% elif value=="down" -%} red
                                          {% else %} var(--paper-item-icon-color))
                                          {% endif %};
    

Services

The component exposes the service yahoofinance.refresh_symbols which can be used to refresh all the data.

Breaking Changes

  • As of version 1.0.0, all the configuration is now under yahoofinance. If you are upgrading from an older version, then you would need to adjust the configuration.
  • As of version 1.0.1, the minimum scan_interval is 30 seconds.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].