I’m trying to use the QNAP NAS integration w/ configurations.yaml but for some reason (I suspect user error) I cannot get it to work with multiple NAS units on my LAN.
HA starts up fine, but will only register sensors for the 2nd NAS that i use. If comment out one, or the other they will work fine independently, just not together.
Welcome any insights:
YAML snippets:
sensor:
- platform: qnap
host: QNAP1_IP
username: homeassistant
password: PASSWORD
monitored_conditions:
- status
- cpu_usage
- memory_percent_used
- network_tx
- volume_percentage_used
sensor:
- platform: qnap
host: QNAP2_IP
username: homeassistant
password: PASSWORD
monitored_conditions:
- status
- cpu_usage
- memory_percent_used
- network_tx
- volume_percentage_used
Is this in one file? If so, you can only have one sensor defined.
Ah! Yes, it is all in my one configuration.yaml file and that would definitely explain the behavior I’m seeing!
Is there a best practice for setting up multiple sensors? Should I be doing this with the UI somehow instead of mucking about with .yaml files in text editors?
That is limited by the integration you are using. I had nmap sensors configured via yaml, until I was “forced” to switch to UI because of version upgrade. I use packages to split my config in yaml. It makes more sense to me.
Thank you again for your help.
For posterity, I was able to solve this with this syntax in configuration.yaml (removed redundant / problematic sensor statements):
sensor:
- platform: qnap
host: QNAP1_IP
username: homeassistant
password: PASSWORD
monitored_conditions:
- status
- cpu_usage
- memory_percent_used
- network_tx
- volume_percentage_used
- platform: qnap
host: QNAP2_IP
username: homeassistant
password: PASSWORD
monitored_conditions:
- status
- cpu_usage
- memory_percent_used
- network_tx
- volume_percentage_used