Skip to content

Commit

Permalink
Improve deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
heinemannj committed Nov 1, 2024
1 parent 18cbe28 commit 7078176
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 54 deletions.
2 changes: 1 addition & 1 deletion config/custom_templates/032-emhass.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
{%- set last_start_time = net_price|map(attribute='start_time')|list|last %}
{%- set array_length = net_price|map(attribute='start_time')|list|length %}

{% if (last_start_time|as_datetime).day < (now() + timedelta( days = 1)).day %}
{% if (last_start_time|as_datetime) < (today_at("00:00:00") + timedelta(days = 1)) %}
{% for i in range((array_length - 24),array_length) %}
{%- set var.result = var.result +
[{
Expand Down
4 changes: 2 additions & 2 deletions config/custom_templates/032-epexspot.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@

{%- set last_data = data|map(attribute='start_time')|list|last %}
{%- set last_data_ts = last_data|as_timestamp %}
{%- set tomorrow_ts = (t + timedelta( days = 1)).timestamp() %}
{%- set tomorrow_ts = (t + timedelta(days = 1)).timestamp() %}

{% if last_data_ts >= tomorrow_ts %}
{% if not tomorrow_data_available %}
{%- set last_update = t.replace(microsecond=0) %}
{% endif %}
{% set tomorrow_data_available = true %}
{%- set next_poll_time = today_at("13:00:00") + timedelta( days = 1) %}
{%- set next_poll_time = today_at("13:00:00") + timedelta(days = 1) %}
{% elif t <= t.replace(hour=13).replace(minute=0).replace(second=0).replace(microsecond=0) %}
{% set tomorrow_data_available = false %}
{%- set next_poll_time = t.replace(hour=13).replace(minute=0).replace(second=0).replace(microsecond=0) %}
Expand Down
17 changes: 1 addition & 16 deletions config/dashboards/420-pv/cards/427-pv-row-1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ card:
height: 460px
stroke:
dashArray:
- 0
- 0
- 4
- 0
Expand Down Expand Up @@ -241,20 +240,6 @@ card:
all_series_config:
yaxis_id: kW_2
series:
# Sun2 Integration
- entity: sensor.hems_sun_azimuth
name: Sun Azimuth
type: line
opacity: 1
stroke_width: 0.8
color: "orange"
unit: °
yaxis_id: azimuth
show:
in_header: false
group_by:
func: avg
duration: 5m
# HUAWEI Solar Integration
- entity: sensor.batteries_state_of_capacity
name: Bat-SoC
Expand Down Expand Up @@ -645,4 +630,4 @@ card:
name: Ø
yaxis_id: header_only
card_mod:
class: azimuth-forecast-chart
class: prediction-horizon-chart
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,6 @@ pv_solar_forecast_chart:
# title:
# text: Capacity [%]
# rotate: 90
- id: azimuth
show: false
opposite: true
decimals: 0
max: 360
min: 0
apex_config:
tickAmount: 1
- id: kW
show: true
decimals: 3
Expand Down
5 changes: 2 additions & 3 deletions config/packages/emhass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ template:
prediction_end_time_today: "{{ prediction_end_time_today }}"
prediction_end_time_tomorrow: "{{ prediction_end_time_tomorrow }}"
prediction_time_step: 30
prediction_offset: 0.2
last_updated: "{{ t }}"
#
#
Expand Down Expand Up @@ -372,8 +371,8 @@ template:
#
- name: emhass_forecast_data
unique_id: emhass_forecast_data
#friendly_name: "emhass_forecast_data"
# state_class: "total"
# friendly_name: "emhass_forecast_data"
# state_class: "total"
state_class: measurement
unit_of_measurement: "EUR/kWh"
icon: mdi:eye
Expand Down
37 changes: 17 additions & 20 deletions config/packages/sun2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@
#
# ########## Entities ##########
#
# - sensor.hems_sun_pv_excess_start_at_elevation
# - sensor.hems_sun_pv_excess_end_at_elevation
# - sensor.hems_sun_prediction_end_at_elevation
#
# - sensor.hems_sun_pv_excess_start
# - sensor.hems_sun_pv_excess_end
# - sensor.hems_sun_prediction_end
Expand All @@ -33,22 +29,23 @@
#
sun2:
- unique_id: hems
sensors:
- unique_id: pv_excess_start_at_elevation
time_at_elevation: 15
direction: rising
icon: mdi:weather-sunset-up
name: PV excess start at elevation
- unique_id: pv_excess_end_at_elevation
time_at_elevation: 15
direction: setting
icon: mdi:weather-sunset-down
name: PV excess end at elevation
- unique_id: prediction_end_at_elevation
time_at_elevation: 25
direction: setting
icon: mdi:weather-sunset-down
name: Prediction end at elevation
observer_elevation: 10
# sensors:
# - unique_id: pv_excess_start_at_elevation
# time_at_elevation: 15
# direction: rising
# icon: mdi:weather-sunset-up
# name: PV excess start at elevation
# - unique_id: pv_excess_end_at_elevation
# time_at_elevation: 15
# direction: setting
# icon: mdi:weather-sunset-down
# name: PV excess end at elevation
# - unique_id: prediction_end_at_elevation
# time_at_elevation: 25
# direction: setting
# icon: mdi:weather-sunset-down
# name: Prediction end at elevation
#
# ########## Start: Persistent Template Sensors ##########
#
Expand Down
8 changes: 4 additions & 4 deletions config/themes/dashboards.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ dashboards:
width: auto !important;
height: 320px !important;
}
ha-card.azimuth-forecast-chart {
ha-card.prediction-horizon-chart {
width: auto !important;
height: 516px !important;
}
Expand All @@ -115,7 +115,7 @@ dashboards:
ha-card.solar-forecast-chart #header,
ha-card.solar-forecast-chart-large-width #header,
ha-card.solar-forecast-chart-full-width #header,
ha-card.azimuth-forecast-chart #header,
ha-card.prediction-horizon-chart #header,
ha-card.tibber-chart-full-width #header,
ha-card.tibber-consumption-chart-full-width #header,
ha-card.tibber-brush-chart-full-width #header {
Expand All @@ -128,7 +128,7 @@ dashboards:
ha-card.solar-forecast-chart #state__value > #state,
ha-card.solar-forecast-chart-large-width #state__value > #state,
ha-card.solar-forecast-chart-full-width #state__value > #state,
ha-card.azimuth-forecast-chart #state__value > #state,
ha-card.prediction-horizon-chart #state__value > #state,
ha-card.tibber-chart-full-width #state__value > #state,
ha-card.tibber-consumption-chart-full-width #state__value > #state,
ha-card.tibber-brush-chart-full-width #state__value > #state {
Expand All @@ -139,7 +139,7 @@ dashboards:
ha-card.solar-forecast-chart #state__value > #uom,
ha-card.solar-forecast-chart-large-width #state__value > #uom,
ha-card.solar-forecast-chart-full-width #state__value > #uom,
ha-card.azimuth-forecast-chart #state__value > #uom,
ha-card.prediction-horizon-chart #state__value > #uom,
ha-card.tibber-chart-full-width #state__value > #uom,
ha-card.tibber-consumption-chart-full-width #state__value > #uom,
ha-card.tibber-brush-chart-full-width #state__value > #uom {
Expand Down
File renamed without changes.
Binary file removed em_optimization_cycle.png
Binary file not shown.

0 comments on commit 7078176

Please sign in to comment.