hvorragend / ha-blueprints

Other
39 stars 8 forks source link

issue with time control triggered before sun elevation #148

Closed dba59 closed 1 month ago

dba59 commented 1 month ago

I have a shutter that opens at 07:30 but now the sun rises later at my place (northern France) and the shutter always opens at that time so I tryed to check t_open_1 and I modified like this just test current_sun_elevation :

 1755 trigger:
 1756 - platform: template
 1757   value_template: "{% if (current_sun_elevation | float(default=sun_elevation_up) > sun_elevation_up) %}\n
 1758     {% if workday_sensor_today != [] and is_state(workday_sensor_today, 'off') %}\n
 1759      {{ now() >= today_at(time_up_early_non_workday) }}\n
 1760      {% else %}\n
 1761      {{ now() >= today_at(time_up_early) }}\n
 1762      {% endif %}
 1763      {% endif %}"
 1764   enabled: '{{ is_time_field_enabled }}'
 1765   id: t_open_1

tested during some days and it's ok

dba59 commented 1 month ago

it must be the same for closing

hvorragend commented 1 month ago

The roller blind is not opened before the "Early" time period. And at the latest at the "Late" time. In between, you can control the brightness and height of the sun.

But the fact is that it opens at the latest time.

I don't quite understand what you are trying to tell me.

If you have a problem, then show me a trace or at least your config.

dba59 commented 1 month ago

I just want the shutter to stop opening at 07:30 because it is still night. is this possible? have I missed something? trace automation.ch_denis_cca 2024-10-06T05_38_55.899276+00_00.json

hvorragend commented 1 month ago

You can adjust everything via the configuration. Why did you specify 7:30 a.m. if it is still night? Why do you think that is? Because it is still dark? Then why have you configured the brightness values and the sun elevation so low? Simply change the values. And ask yourself when your roller blind should always be opened at the latest - regardless of brightness/sunlight. That would be the new time instead of 7:30 am.

dba59 commented 1 month ago

I get up around 07:30 it is light before this time (between the equinoxes in summer) I don't want the shutter to be open. on the other hand in winter it is dark so I don't want the shutter to open before sunrise. I have used your blueprint since May with the parameters in the trace it was very good, but since the end of September the shutter opens but it is dark. I do not really see how to do it with all these parameters that interfere between.

hvorragend commented 3 weeks ago

Please try something similar. I can't understand your problems. Once the values have been configured correctly, it works in both summer and winter.

alias: Rollo - EG - Büro
description: ""
trace:
  stored_traces: 20
use_blueprint:
  path: hvorragend/cover_control_automation.yaml
  input:
    blind: cover.buero
    auto_global_condition:
      - condition: state
        entity_id: input_boolean.auto_rollo_eg
        state: "on"
    workday_sensor: binary_sensor.workday_today
    workday_sensor_tomorrow: binary_sensor.workday_tomorrow
    drive_delay_fix: 70
    time_up_early: "07:15:00"
    time_up_early_non_workday: "07:45:00"
    time_up_late: "08:15:00"
    time_down_late: "22:00:00"
    default_brightness_sensor: sensor.lichtsensoren
    brightness_up: 100
    brightness_down: 200
    sun_elevation_up: 4
    sun_elevation_down: -2.5
    auto_shading_start_condition:
      - condition: state
        entity_id: input_boolean.auto_shading_start
        state: "on"
    auto_shading_end_condition:
      - condition: state
        entity_id: input_boolean.auto_shading_end
        state: "on"
    cover_status_options: cover_helper_enabled
    cover_status_helper: input_text.rollo_status_buero
    shading_position: 25
    shading_forecast_sensor: weather.openweathermap
    shading_sun_brightness_start: 39000
    shading_sun_brightness_end: 15000
    shading_azimuth_start: 260
    shading_azimuth_end: 360
    shading_elevation_min: 5
    shading_min_temperatur1: 21
    shading_min_temperatur2: 22
    shading_temperatur_sensor1: sensor.innen_temperature_filtered
    shading_temperatur_sensor2: sensor.aussen_temperature_filtered
    shading_forecast_temp: 22
    auto_options:
      - auto_up_enabled
      - auto_down_enabled
      - auto_shading_enabled
      - auto_sun_enabled
      - auto_brightness_enabled
    shading_brightness_sensor: sensor.lichtsensor_westen_filter_moving_average
    time_control: time_control_input
    time_up_late_non_workday: "08:30:00"
    ignore_after_manual_config: []
    check_config: false
    position_tolerance: 1
    check_config_debuglevel: critical
    ventilate_position: 30