Hello, why does not my code work with “input_number”? thanks
# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
# base_url: example.duckdns.org:8123
# Text to speech
tts:
- platform: google_translate
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
sensor:
- platform: mitemp_bt
mac: '4C:65:A8:DB:E6:00'
name: capteur1
force_update: false
median: 1
monitored_conditions:
- temperature
- battery
input_number:
heures1:
name: heures DAY OFF
initial: 23
min: 0
max: 23
step: 1
mode: box
minutes1:
name: minutes DAY OFF
initial: 30
min: 0
max: 59
step: 1
mode: box
heures2:
name: heures DAY ON
initial: 6
min: 0
max: 23
step: 1
mode: box
minutes2:
name: minutes DAY ON
initial: 0
min: 0
max: 59
step: 1
mode: box
heures3:
name: heures reboot
initial: 5
min: 0
max: 23
step: 1
mode: box
minutes3:
name: minutes reboot
initial: 30
min: 0
max: 59
step: 1
mode: box
tempday:
name: temperature jour
initial: 23
min: 0
max: 25
step: 1
mode: box
tempnight:
name: temperature nuit
initial: 19
min: 0
max: 25
step: 1
mode: box
climate:
- platform: generic_thermostat
name: thermostat
heater: switch.chauffage
target_sensor: sensor.capteur1_temperature
min_temp: 15
max_temp: 25
ac_mode: false
target_temp: "{{ states('input_number.tempnight') | float }}"
cold_tolerance: 0.5
hot_tolerance: 0.5
min_cycle_duration:
seconds: 5
initial_hvac_mode: "heat"
away_temp: 16
precision: 0.5
automation:
- alias: mode jour
trigger:
- at: "{{ states('input_number.heures2') | int }}:{{ states('input_number.minutes2') | float }}:00"
platform: time
action:
- service: climate.set_temperature
data:
temperature: "{{ states('input_number.tempday') | float }}"
hvac_mode: heat
- alias: mode nuit
trigger:
- at: "{{ states('input_number.heures1') | int }}:{{ states('input_number.minutes2') | float }}:00"
platform: time
action:
- service: climate.set_temperature
data:
temperature: "{{ states('input_number.tempnight') | float }}"
hvac_mode: heat
- alias: debug hs110
trigger:
- event: start
platform: homeassistant
action:
- service: script.turn_on
- alias: reboot
trigger:
- at: "{{ states('input_number.heures3') | int }}:{{ states('input_number.minutes3') | int }}:00"
platform: time
action:
- service: homeassistant.restart