Hi i tried removing this, but it made no difference,
the start of my config file looks like this:
# Loads default set of integrations. Do not remove.
default_config:
homeassistant:
# Load frontend themes from the themes folder
frontend:
themes: !include_dir_merge_named themes
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
sensor: !include sensors.yaml
switch: !include switches.yaml
#weather: !include forecast.yaml
template: !include templates.yaml
#template: !include_dir_merge_list templates/ # includes .yaml files located in config/templates
#climate: !include climate.yaml
# enable https
this is the adjusted sensors.yaml
# sensors.yaml
# Victron Configuration. // If you require stats from your victron system you must have a Venus device installed as part of your Victron installation. This does not use VRM.This users MODBUS
#template:
- sensor:
- unique_id: 000007
default_entity_id: sensor.battery_charge_discharge
icon: mdi:battery
name: Battery State
state: '{{ [''idle'', ''charging'', ''discharging''][states(''sensor.battery_state'')|int]
}}'
- sensor:
- unique_id: 000017
unit_of_measurement: W
device_class: power
default_entity_id: sensor.battery_out
name: Battery Power Out
state: '{% set power = (states(''sensor.battery_power'')|round) %} {{ 0 if power
> 0 else power | abs }}'
- sensor:
- unique_id: 000018
unit_of_measurement: W
device_class: power
default_entity_id: sensor.battery_in
name: Battery Power In
state: '{% set powerin = (states(''sensor.battery_power'')|round) %} {{ 0 if powerin
< 0 else powerin }}'
- sensor:
- unique_id: '16'
unit_of_measurement: W
device_class: power
default_entity_id: sensor.grid_export
name: Grid Export
state: '{% set power = (states(''sensor.power_from_grid'')|round) %} {{ 0 if power
> 0 else power | abs }}'
- sensor:
- unique_id: '17'
unit_of_measurement: W
device_class: power
default_entity_id: sensor.grid_import
name: Grid Import
state: '{% set powerin = (states(''sensor.power_from_grid'')|round) %} {{ 0 if
powerin < 0 else powerin }}
# templates.yaml
# Total Solar power in
sensor:
- name: "total solar in"
#friendly_name: "Total Solar In"
unique_id: 000019
unit_of_measurement: W
device_class: power
state: >
{{ [ states('sensor.compost_power'),
states('sensor.roof_pv_power'), states('sensor.rear_wall_power') ]
| map('float') | sum }}
availability: >
{{ not 'unavailable' in
[ states('sensor.compost_power'),
states('sensor.roof_pv_power'), states('sensor.rear_wall_power') ] }}
should i move the new sensor code into this and simply remove the sensors.yaml?
It has a step by step process that tells you exactly what to do. To me, it seems you havenāt read it. Step 2 covers where the new templates should go.
This is not necessarily true for everyone, particulary for those that organize everything in a bunch of different files.
I truly appreciate the tool being available as it helps a great deal. However, the generated state definitions have a lot of escape sequences which need to be replaced with the original code for better readability and maintainability. After that, everything needs to be manually copied / pasted to their respective files.
So all in all and unfortunately for me, all required work demands more time than I have or can afford now or in the intermediate future.
It feels like you spent more time thinking through and writing out your response than downloading the integration and trying it out. It took me all of 15 mins to update mine including the removal of the tool. Itās really very good.