Hi here!
I just got my HA and have been trying to dome some very shy tweaks. Mainly I’ve tried to follow this tutorial to integrate Solax. However, I wanted to keep things organised before they grew and got unmanageable. So I followed this Splitting up the configuration - Home Assistant and also a few repos.
What works:
configuration.yaml
:
# Loads default set of integrations. Do not remove.
default_config:
# Load frontend themes from the themes folder
frontend:
themes: !include_dir_merge_named themes
# Text To Speech
tts:
- platform: google_translate
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
sensor: !include_dir_merge_list sensor
template:
- sensor:
- name: "Solax Cloud Yield Today"
state: "{{ state_attr('sensor.solax_rest_cloud', 'yieldtoday') }}"
unit_of_measurement: "kWh"
unique_id: solax_2
icon: mdi:flash
device_class: energy
state_class: total_increasing
This makes the sensor show up correctly. Then I tried to move this to a different structure:
configuration.yaml
# Loads default set of integrations. Do not remove.
default_config:
# Load frontend themes from the themes folder
frontend:
themes: !include_dir_merge_named themes
# Text To Speech
tts:
- platform: google_translate
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
sensor: !include_dir_merge_list sensor
template: !include_dir_merge_list template
And within template
I’ve tried several structures:
└── template
└── solax.yml
And also:
└── template
└── sensors
└── solax.yml
In any case the context of solax.yml
is as follows:
- sensor:
- name: "Solax Cloud Yield Today"
state: "{{ state_attr('sensor.solax_rest_cloud', 'yieldtoday') }}"
unit_of_measurement: "kWh"
unique_id: solax_2
icon: mdi:flash
device_class: energy
state_class: total_increasing
Upon restarting HA the sensor stops working and shows as unavailable. I don’t see any errors or anything that would lead me to know where the issue could be.
Is there something obvious I’m missing?