Boa noite…
Não estou a conseguir colocar o agendamento a trabalhar, chega a hora do agendamento e nao faz nada.
Copiei o codigo yaml cima referido e fiz alguma alterações para o meu caso:
#===========
#=== Groups
#===========
#group:
# irrigation_valves:
# control: hidden
# name: 'Válvulas'
# entities:
# - switch.irrigation_zone1_valve
# - switch.irrigation_zone2_valve
# - switch.irrigation_zone3_valve
# - switch.irrigation_zone4_valve
#================
#=== Input_Texts
#================
input_text:
irrigation_status:
name: 'Estado atual da Rega'
#==================
#=== Input_Selects
#==================
input_select:
irrigation_cycle1_schedule_time:
name: "Horas de começo do ciclo 1"
options:
- 'Desativado'
- '00:00'
- '00:30'
- '01:00'
- '01:30'
- '02:00'
- '02:30'
- '03:00'
- '03:30'
- '04:00'
- '04:30'
- '05:00'
- '05:30'
- '06:00'
- '06:30'
- '07:00'
- '07:30'
- '08:00'
- '08:30'
- '09:00'
- '09:30'
- '10:00'
- '10:30'
- '11:00'
- '11:30'
- '12:00'
- '12:30'
- '13:00'
- '13:30'
- '14:00'
- '14:30'
- '15:00'
- '15:30'
- '16:00'
- '16:30'
- '17:00'
- '17:30'
- '18:00'
- '18:30'
- '19:00'
- '19:30'
- '20:00'
- '20:30'
- '21:00'
- '21:30'
- '22:00'
- '22:30'
- '23:00'
- '23:30'
icon: mdi:alarm
irrigation_cycle2_schedule_time:
name: "Horas de começo do ciclo 2"
options:
- 'Desativado'
- '00:00'
- '00:30'
- '01:00'
- '01:30'
- '02:00'
- '02:30'
- '03:00'
- '03:30'
- '04:00'
- '04:30'
- '05:00'
- '05:30'
- '06:00'
- '06:30'
- '07:00'
- '07:30'
- '08:00'
- '08:30'
- '09:00'
- '09:30'
- '10:00'
- '10:30'
- '11:00'
- '11:30'
- '12:00'
- '12:30'
- '13:00'
- '13:30'
- '14:00'
- '14:30'
- '15:00'
- '15:30'
- '16:00'
- '16:30'
- '17:00'
- '17:30'
- '18:00'
- '18:30'
- '19:00'
- '19:30'
- '20:00'
- '20:30'
- '21:00'
- '21:30'
- '22:00'
- '22:30'
- '23:00'
- '23:30'
icon: mdi:alarm
irrigation_cycle3_schedule_time:
name: "Horas de começo do ciclo 3"
options:
- 'Desativado'
- '00:00'
- '00:30'
- '01:00'
- '01:30'
- '02:00'
- '02:30'
- '03:00'
- '03:30'
- '04:00'
- '04:30'
- '05:00'
- '05:30'
- '06:00'
- '06:30'
- '07:00'
- '07:30'
- '08:00'
- '08:30'
- '09:00'
- '09:30'
- '10:00'
- '10:30'
- '11:00'
- '11:30'
- '12:00'
- '12:30'
- '13:00'
- '13:30'
- '14:00'
- '14:30'
- '15:00'
- '15:30'
- '16:00'
- '16:30'
- '17:00'
- '17:30'
- '18:00'
- '18:30'
- '19:00'
- '19:30'
- '20:00'
- '20:30'
- '21:00'
- '21:30'
- '22:00'
- '22:30'
- '23:00'
- '23:30'
icon: mdi:alarm
#==================
#=== Input_Numbers
#==================
input_number:
# CYCLE
irrigation_zone1_duration:
name: "Sector 1"
min: 0
max: 10
step: 1
icon: mdi:timer
#===================
#=== Input_Booleans
#===================
input_boolean:
irrigation_enable:
name: "Ativar Rega"
icon: mdi:water-pump
irrigation_cancel:
irrigation_manual_run:
name: "Ativar ciclo manualmente"
icon: mdi:arrow-right-drop-circle
irrigation_running:
name: "Rega em curso"
#====================
#=== Input_Datetimes
#====================
input_datetime:
irrigation_next_run_time:
has_date: true
has_time: true
irrigation_last_time_irrigated:
has_date: true
has_time: true
#===========
#=== timers
#===========
timer:
irrigation_cycle_zone_duration:
name: "Tempo restante"
#============
#=== Sensors
#============
sensor:
- platform: template
sensors:
irrigation_next_run_time:
friendly_name: "Próxima rega agendada"
value_template: >
{% if is_state('input_boolean.irrigation_enable', 'on') and
(states('input_select.irrigation_cycle1_schedule_time') != 'Desativado' or
states('input_select.irrigation_cycle2_schedule_time') != 'Desativado' or
states('input_select.irrigation_cycle3_schedule_time') != 'Desativado') %}
{{ states.input_datetime.irrigation_next_run_time.attributes.timestamp | timestamp_custom("%a %d %h às %H:%M") }}
{% else %}
Nenhuma
{% endif %}
icon_template: mdi:clock-start
irrigation_status:
friendly_name: "Estado atual da Rega"
value_template: >
{% if states.input_text.irrigation_status.state == 'unkown' %}
Desligado
{% else %}
{{ states.input_text.irrigation_status.state }}
{% endif %}
irrigation_zone1_status:
friendly_name: "Válvula Sector 1"
value_template: >
{% if is_state('switch.irrigation_zone1_valve', 'on') %}
Aberta
{% else %}
Fechada
{% endif %}
icon_template: >
{% if is_state('switch.irrigation_zone1_valve', 'on') %}
mdi:pipe
{% else %}
mdi:pipe-disconnected
{% endif %}
irrigation_last_time_irrigated:
friendly_name: "Último ciclo de rega acabado"
value_template: >
{{ (as_timestamp(states.input_datetime.irrigation_last_time_irrigated.state)) | timestamp_custom("%a %d %h às %H:%M") }}
icon_template: mdi:update
# Zone Times - templated on history_stats sensors
irrigation_zone1_time_today:
friendly_name: "Sector 1 tempo total de rega hoje"
value_template: >
{% set duration = states('sensor.zone1_time') %}
{{ (float(duration) * 60) | round }}
unit_of_measurement: minutes
icon_template: mdi:water
# History sensors
# Zone Times
- platform: history_stats
name: "zone1_time"
entity_id: switch.irrigation_zone1_valve
state: 'on'
type: time
start: '{{ now().replace(hour=0).replace(minute=0).replace(second=0) }}'
end: '{{ now() }}'
binary_sensor:
- platform: template
sensors:
irrigation_running:
friendly_name: "Rega"
device_class: power
value_template: >
{% if is_state('input_boolean.irrigation_running', 'on') %}
True
{% else %}
False
{% endif %}
icon_template: >
{% if is_state('input_boolean.irrigation_running', 'on') %}
mdi:run
{% else %}
mdi:human-handsdown
{% endif %}
#=============
#=== Switches
#=============
switch:
# Tasmota Commands
# interlock 1
# poweronstate<x> 0
# pulsetime<x> 700
# Zone 1
- platform: mqtt
name: "irrigation_zone1_valve"
state_topic: "stat/rega/POWER"
command_topic: "cmnd/rega/power0"
availability_topic: "tele/rega/LWT"
qos: 1
payload_on: "ON"
payload_off: "OFF"
payload_available: "Online"
payload_not_available: "Offline"
em relação ao codigo Node-red nao alterei nada.
tenho alguns pontos a vermelho:
Alguma sugestão que eu possa fazer?
Obrigado