Skip to content

Latest commit

 

History

History
112 lines (94 loc) · 3.13 KB

README.md

File metadata and controls

112 lines (94 loc) · 3.13 KB

🌊 Havvarsel - Home Assistant Custom Integration

Havvarsel API License Maintained

📌 Overview

Havvarsel is a custom Home Assistant integration that fetches sea temperature forecasts from the Havvarsel API and provides real-time temperature data for a given location.

🌡 Features:

✅ Fetches hourly sea temperature predictions.
✅ Displays current hour's temperature in Home Assistant.
✅ Stores a 5-day forecast in the raw_today attribute.
✅ Provides temperature history & trends for automations.
Works with multiple locations.


🔧 Installation

1️⃣ Manual Installation

  1. Download this repository as a ZIP file.
  2. Extract the havvarsel folder into:
    /config/custom_components/havvarsel/
  3. Restart Home Assistant.

2️⃣ Installation via HACS (Recommended)

  1. Open HACS in Home Assistant.
  2. Click "Integrations" → "Custom Repositories".
  3. Add:
  • Repository URL: https://github.com/oyvhov/havvarsel_seatemp
  • Category: Integration
  1. Search for "Havvarsel" in HACS and install.
  2. Restart Home Assistant.

⚙️ Configuration

Adding the Integration

  1. Go to Home Assistant → Settings → Devices & Services.
  2. Click "Add Integration" and search for Havvarsel.
  3. Enter:

image

  • Sensor Name (e.g., "Bergen Sea Temp")
  • Latitude (e.g., 61.356045)
  • Longitude (e.g., 5.18974)

Use

Example of forecast with custom apex charts card (https://github.com/RomRider/apexcharts-card):

image

type: grid
cards:
  - type: heading
    heading_style: title
    grid_options:
      columns: 6
      rows: 1
    heading: Sjøtemperatur Bergen
    icon: mdi:coolant-temperature
  - type: custom:apexcharts-card
    graph_span: 120h
    experimental:
      color_threshold: false
    apex_config:
      chart:
        height: 240px
      grid:
        show: false
        borderColor: var(--blue)
    header:
      show: false
    span:
      start: day
    yaxis:
      - min: 0
        max: "|3|"
        decimals: 1
        show: true
    now:
      show: true
      label: "No"
      color: "#ffb581"
    all_series_config:
      float_precision: 2
    series:
      - entity: sensor.sea_temperature_bergen
        show:
          extremas: true
          in_header: false
          name_in_header: true
          in_chart: true
        name: Rivedal
        type: area
        curve: smooth
        extend_to: end
        stroke_width: 3
        opacity: 0.2
        color: "#90bfff"
        data_generator: |
          return entity.attributes.raw_today.map((start, index) => {
            return [new Date(start["start"]).getTime(), entity.attributes.raw_today[index]["value"]];
          });