Skip to content

Home Assistant #9

Open
Open
@dlidstrom

Description

@dlidstrom
#!/bin/bash

current_hour=$(date -d "`date +%Y.%m.%d-%H:00:00`" -Iseconds)
current_day=$(date "+%Y/%m-%d")
curl -s "https://www.elprisetjustnu.se/api/v1/prices/${current_day}_SE3.json" | jq ".[] | select(.time_start == \"$current_hour\") | .SEK_per_kWh"
bluetooth:

##########

# Loads default set of integrations. Do not remove.
default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

# Text to speech
tts:
  - platform: google_translate

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
#sensor: !include sensor.yaml
template:
  - binary_sensor:
    - name: People home
      unique_id: peoplehome
      state: >
        {{ is_state('device_tracker.daniels_iphone', 'home') or is_state('device_tracker.iphone_6s', 'home') }}

sensor:
  - platform: command_line
    name: CPU temperature
    unique_id: cpu_temperature
    command: "cat /sys/class/thermal/thermal_zone0/temp"
    unit_of_measurement: "°C"
    value_template: "{{ value | multiply(0.001) | round(1) }}"

  - platform: command_line
    name: Elpriset just nu
    unique_id: elpriset_just_nu
    command: "sh /config/get-energy-price.sh"
    unit_of_measurement: "kr/kWh"
    value_template: "{{ value | float | multiply(1.25) | round(2) }}"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions