Add this to your configuration.yaml:
Code: Select all
###############################
### Snektek Solar Dashboard ###
###############################
rest:
- resource: http://192.168.10.30/cur_data
scan_interval: 5
sensor:
- name: "Solar Voltage"
#unique_id: snektek_solardashboard_solar_voltage
value_template: '{{ (value_json["pv.v"] | float -0.0 | float) | round (2)}}'
device_class: voltage
state_class: measurement
unit_of_measurement: "V"
- name: "Solar Power"
#unique_id: snektek_solardashboard_solar_power
value_template: '{{ value_json["pv.p"] }}'
device_class: power
state_class: measurement
unit_of_measurement: "W"
- name: "Solar Current"
#unique_id: snektek_solardashboard_solar_current
value_template: '{{ value_json["pv.c"] }}'
device_class: current
state_class: measurement
unit_of_measurement: "A"
- name: "Battery Voltage"
#unique_id: snektek_solardashboard_battery_voltage
value_template: '{{ (value_json["bt.v"] | float +0.04 | float) | round (2)}}'
device_class: voltage
state_class: measurement
unit_of_measurement: "V"
- name: "Battery Temp"
#unique_id: snektek_solardashboard_battery_temp
value_template: '{{ value_json["bt.t"] }}'
device_class: temperature
state_class: measurement
unit_of_measurement: "°C"
- name: "Battery Current"
#unique_id: snektek_solardashboard_battery_current
value_template: '{{ value_json["bt.c"] }}'
device_class: current
state_class: measurement
unit_of_measurement: "A"
- name: "Load Voltage"
#unique_id: snektek_solardashboard_load_voltage
value_template: '{{ (value_json["ld.v"] | float -0.0 | float) | round (2)}}'
device_class: voltage
state_class: measurement
unit_of_measurement: "V"
- name: "Load Power"
#unique_id: snektek_solardashboard_load_power
value_template: '{{ value_json["ld.p"] }}'
device_class: power
state_class: measurement
unit_of_measurement: "W"
- name: "Load Current"
#unique_id: snektek_solardashboard_load_current
value_template: '{{ value_json["ld.c"] }}'
device_class: current
state_class: measurement
unit_of_measurement: "A"
- name: "Solar Generation Today"
#unique_id: snektek_solardashboard_gen_today
value_template: '{{ value_json["genToday"] }}'
device_class: energy
state_class: measurement
unit_of_measurement: "kWh"
- name: "Solar Generation This Month"
#unique_id: snektek_solardashboard_gen_month
value_template: '{{ value_json["genMonth"] }}'
device_class: energy
state_class: measurement
unit_of_measurement: "kWh"
- name: "Solar Generation This Year"
#unique_id: snektek_solardashboard_gen_year
value_template: '{{ value_json["genYear"] }}'
device_class: energy
state_class: measurement
unit_of_measurement: "kWh"