Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Home Assistant #9

Open
dlidstrom opened this issue Mar 20, 2023 · 0 comments
Open

Home Assistant #9

dlidstrom opened this issue Mar 20, 2023 · 0 comments

Comments

@dlidstrom
Copy link
Owner

#!/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) }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant