Posts

Showing posts with the label configuration

Home Assistant default_config

At some point during your Home Assistant journey you will probably want to replace the default_config: line in your configuration.yaml file with a config of your own. I didn't manage to find a replacement for the default_config: oneliner in the internet, so I made this config based on the default configuration help page . Just replace the oneliner with all this and the configuration should stay the same.  Note that in the case of Home Assistant changing the default config, this post will become outdated, so be sure to give the help page a glance before you do that. If some of these entries are already present in your config, remove or comment them with the hash character #, for example #script: instead of script: If you're running Home Assistant OS, then comment or remove the backup: entry, or you will get an error in the logs. That entry isn't supported on the HAOS due to HAOS having a slightly different backup system. However, you will be able to do backups just fine ...

Changing the crontab editor in Home Assistant SSH terminal

Here is how to change the default editor on an Home Assistant OS installation. When you SSH to a Linux machine and want to edit crontab, there is an environmental variable which decided which text editor to use. I personally like to use nano as the editor. On my Home Assistant I have set up the SSH Web Terminal for terminal access to the system. After connecting with an SSH client (such as PuTTY ) one can edit crontab with the command: crontab -e   The default editor for HA OS seems to be vim(?). In order to quit editing the crontab with vim, press ESC and then :q and press enter. Now to change the editor. Edit the .zshrc file: nano ~/.zshrc Add the following line to .zshrc: export EDITOR='nano' Exit nano by pressing Ctrl-X and then selecting Yes to save modified file. You can then try which editor opens when you again type: crontab -e

Adding the system monitor sensors to Home Assistant

 Just add these lines to your configuration.yaml file: sensor:   - platform: systemmonitor     resources:       - type: disk_use_percent         arg: /config       - type: memory_use_percent       - type: swap_use_percent       - type: load_1m       - type: load_5m       - type: load_15m       - type: network_in         arg: eth0       - type: network_out         arg: eth0       - type: processor_temperature       - type: last_boot   Then check and reload your YAML configuration by restarting Home Assistant Core. You can find this on the page Developer Tools on the tab YAML. After that you will have sensors f...