Sam resets configuration.yaml

Hi,

I have just started using Sam and Snips. Its not necessarily a problem but somewhat of a hindrance!

Every time I install an assistant or actions Sam overwrites the configuration file. It doesnt wipe it but removes the configurations I entered for the hass snippets and intent scripts. E.g.

configuration.yaml before “sam install actions”:

homeassistant:
  # Manage the UI
  customize: !include customize.yaml

# Loads default hass integrations
default_config: 

# Text to speech
tts:
  - platform: google_translate


automation: !include_dir_merge_list automations/
intent_script: !include intent_scripts.yaml
script: !include scripts.yaml
group: !include groups.yaml

# Manages the mqtt broker
mqtt:
  broker: 192.168.0.136
  port: 1883

# Include the option to run python snippets
python_script: 

# Integrate the snips platform
snips: 

configuration.yaml after “sam install actions”:

 homeassistant:
   customize: !include customize.yaml
 default_config: 
 tts:
   - platform: google_translate
 automation: !include_dir_merge_list automations/
 script: !include scripts.yaml
 group: !include groups.yaml
 mqtt:
   broker: 192.168.0.136
   port: 1883
 python_script: 
 snips: 
 intent_script: {}

At the moment I have to back up code before installing, then copy and pasting back after the install.

Is there an option to stop this? Or have I missed a trick?

Thanks for your help

Hello @code-pig

You are right, Sam overrides home assistant configuration and at the moment there is no option to prevent this. I added this issue to our backlog.

In the meantime, you’ll have to manually copy the old configuration as you are already doing.

Okay thanks for getting back to me Charles :+1: