Hi, I’m trying to configure two http cards (denkovi smartden) together and I can’t figure out where I’m wrong. I attach files and ask if someone can help me.
thanks
configuration.yaml
homeassistant:
name: Home
latitude: !secret home_lat
longitude: !secret home_long
unit_system: metric
time_zone: Europe/Rome
customize_glob:
sensor.hidden*:
hidden: true
weather.vkshchi:
hidden: true
# 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
# Include board specific configuration files
#######################################
group: !include_dir_merge_list groups
sensor: !include_dir_merge_list sensors
switch: !include_dir_merge_list switches
rest_command: !include restcommands/rest_commands.yaml
sensors16.yaml
#######################################
# Sensors
#######################################
- platform: rest
name: hidden_current_state
resource: http://192.168.1.104:80/current_state.json?pw=admin
json_attributes:
- CurrentState
value_template: "OK"
force_update: true
- platform: template
sensors:
# Relays status sensor (hidden)
hidden_relay_1_status:
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["Output"][0]["Value"] }}'
hidden_relay_2_status:
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["Output"][1]["Value"] }}'
hidden_relay_3_status:
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["Output"][2]["Value"] }}'
hidden_relay_4_status:
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["Output"][3]["Value"] }}'
hidden_relay_5_status:
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["Output"][4]["Value"] }}'
hidden_relay_6_status:
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["Output"][5]["Value"] }}'
hidden_relay_7_status:
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["Output"][6]["Value"] }}'
hidden_relay_8_status:
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["Output"][7]["Value"] }}'
hidden_relay_9_status:
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["Output"][8]["Value"] }}'
hidden_relay_10_status:
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["Output"][9]["Value"] }}'
hidden_relay_11_status:
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["Output"][10]["Value"] }}'
hidden_relay_12_status:
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["Output"][11]["Value"] }}'
hidden_relay_13_status:
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["Output"][12]["Value"] }}'
hidden_relay_14_status:
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["Output"][13]["Value"] }}'
hidden_relay_15_status:
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["Output"][14]["Value"] }}'
hidden_relay_16_status:
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["Output"][15]["Value"] }}'
sensors32.yaml
#######################################
# Sensors
#######################################
- platform: rest
name: hidden_current_state
resource: http://192.168.1.105:80/current_state.json?pw=admin
json_attributes:
- CurrentState
value_template: "OK"
force_update: true
- platform: template
sensors:
# Digital Inputs
digital_input_1:
friendly_name: "Digital Input 1"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["DigitalInput"][DI1]["Value"] }}'
digital_input_2:
friendly_name: "Digital Input 2"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["DigitalInput"][DI2]["Value"] }}'
digital_input_3:
friendly_name: "Digital Input 3"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["DigitalInput"][DI3]["Value"] }}'
digital_input_4:
friendly_name: "Digital Input 4"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["DigitalInput"][DI4]["Value"] }}'
digital_input_5:
friendly_name: "Digital Input 5"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["DigitalInput"][DI5]["Value"] }}'
digital_input_6:
friendly_name: "Digital Input 6"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["DigitalInput"][DI6]["Value"] }}'
digital_input_7:
friendly_name: "Digital Input 7"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["DigitalInput"][DI7]["Value"] }}'
digital_input_8:
friendly_name: "Digital Input 8"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["DigitalInput"][DI8]["Value"] }}'
digital_input_9:
friendly_name: "Digital Input 9"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["DigitalInput"][DI9]["Value"] }}'
digital_input_10:
friendly_name: "Digital Input 10"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["DigitalInput"][DI10]["Value"] }}'
digital_input_11:
friendly_name: "Digital Input 11"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["DigitalInput"][DI11]["Value"] }}'
digital_input_12:
friendly_name: "Digital Input 12"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["DigitalInput"][DI12]["Value"] }}'
digital_input_13:
friendly_name: "Digital Input 13"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["DigitalInput"][DI13]["Value"] }}'
digital_input_14:
friendly_name: "Digital Input 14"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["DigitalInput"][DI14]["Value"] }}'
digital_input_15:
friendly_name: "Digital Input 15"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["DigitalInput"][DI15]["Value"] }}'
digital_input_16:
friendly_name: "Digital Input 16"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["DigitalInput"][DI16]["Value"] }}'
# Counters
counter_1:
friendly_name: "Counter 1"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["DigitalInput"][DI1]["Count"] }}'
counter_2:
friendly_name: "Counter 2"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["DigitalInput"][DI2]["Count"] }}'
counter_3:
friendly_name: "Counter 3"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["DigitalInput"][DI3]["Count"] }}'
counter_4:
friendly_name: "Counter 4"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["DigitalInput"][DI4]["Count"] }}'
counter_5:
friendly_name: "Counter 5"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["DigitalInput"][DI5]["Count"] }}'
counter_6:
friendly_name: "Counter 6"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["DigitalInput"][DI6]["Count"] }}'
counter_7:
friendly_name: "Counter 7"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["DigitalInput"][DI7]["Count"] }}'
counter_8:
friendly_name: "Counter 8"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["DigitalInput"][DI8]["Count"] }}'
counter_9:
friendly_name: "Counter 9"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["DigitalInput"][DI9]["Count"] }}'
counter_10:
friendly_name: "Counter 10"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["DigitalInput"][D10]["Count"] }}'
counter_11:
friendly_name: "Counter 11"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["DigitalInput"][DI11]["Count"] }}'
counter_12:
friendly_name: "Counter 12"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["DigitalInput"][DI12]["Count"] }}'
counter_13:
friendly_name: "Counter 13"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["DigitalInput"][DI13]["Count"] }}'
counter_14:
friendly_name: "Counter 14"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["DigitalInput"][DI14]["Count"] }}'
counter_15:
friendly_name: "Counter 15"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["DigitalInput"][DI15]["Count"] }}'
counter_16:
friendly_name: "Counter 16"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["DigitalInput"][DI16]["Count"] }}'
# Analog Inputs
analog_input_1:
friendly_name: "Analog Input 1"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["AnalogInput"][AI1]["Measure"] }}'
analog_input_2:
friendly_name: "Analog Input 2"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["AnalogInput"][AI2]["Measure"] }}'
analog_input_3:
friendly_name: "Analog Input 3"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["AnalogInput"][AI3]["Measure"] }}'
analog_input_4:
friendly_name: "Analog Input 4"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["AnalogInput"][AI4]["Measure"] }}'
analog_input_5:
friendly_name: "Analog Input 5"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["AnalogInput"][AI5]["Measure"] }}'
analog_input_6:
friendly_name: "Analog Input 6"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["AnalogInput"][AI6]["Measure"] }}'
analog_input_7:
friendly_name: "Analog Input 7"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["AnalogInput"][AI7]["Measure"] }}'
analog_input_8:
friendly_name: "Analog Input 8"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["AnalogInput"][AI8]["Measure"] }}'
# Temperature Inputs
temperature_input_1:
friendly_name: "Temperature Input 1"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["TemperatureInput"][TI1]["Value"].split(" ")[0] }}'
unit_of_measurement: "°C"
temperature_input_2:
friendly_name: "Temperature Input 2"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["TemperatureInput"][TI2]["Value"].split(" ")[0] }}'
unit_of_measurement: "°C"
temperature_input_3:
friendly_name: "Temperature Input 3"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["TemperatureInput"][TI3]["Value"].split(" ")[0] }}'
unit_of_measurement: "°C"
temperature_input_4:
friendly_name: "Temperature Input 4"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["TemperatureInput"][TI4]["Value"].split(" ")[0] }}'
unit_of_measurement: "°C"
temperature_input_5:
friendly_name: "Temperature Input 5"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["TemperatureInput"][TI5]["Value"].split(" ")[0] }}'
unit_of_measurement: "°C"
temperature_input_6:
friendly_name: "Temperature Input 6"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["TemperatureInput"][TI6]["Value"].split(" ")[0] }}'
unit_of_measurement: "°C"
temperature_input_7:
friendly_name: "Temperature Input 7"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["TemperatureInput"][TI7]["Value"].split(" ")[0] }}'
unit_of_measurement: "°C"
temperature_input_8:
friendly_name: "Temperature Input 8"
value_template: '{{ states.sensor.hidden_current_state.attributes["CurrentState"]["TemperatureInput"][TI8]["Value"].split(" ")[0] }}'
unit_of_measurement: "°C"