Browse Source

filter "home-assistant-device-registry": shorten valetudo hostnames

The hostname is derived from the robot's system id, which identifies it persistently.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fabian Peter Hammerle 1 day ago
parent
commit
fa6ac4894b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      gitconfig

+ 1 - 1
gitconfig

@@ -64,7 +64,7 @@
 
 [filter "home-assistant-device-registry"]
 	required = true
-	clean = "jq '.data.devices[] |= if .manufacturer == \"Victron Energy BV\" then (.name, .serial_number) |= if . != null then sub(\"(?<p>HQ[0-9]{4}[[:alnum:]])[[:alnum:]]{4}(?=[^[:alnum:]]|$)\"; \"\\(.p)…\") else . end else . end' | eval \"$(git config --get filter.truncate-mac-address-to-24-bits.clean)\" | eval \"$(git config --get filter.truncate-dyness-battery-serial-numbers.clean)\""
+	clean = "jq '.data.devices[] |= if .manufacturer == \"Victron Energy BV\" then (.name, .serial_number) |= if . != null then sub(\"(?<p>HQ[0-9]{4}[[:alnum:]])[[:alnum:]]{4}(?=[^[:alnum:]]|$)\"; \"\\(.p)…\") else . end elif .manufacturer == \"Valetudo\" then .configuration_url |= if . != null then sub(\"(?<p>://valetudo-[[:alnum:]]{2})[[:alnum:]]+\"; \"\\(.p)…\") else . end else . end' | eval \"$(git config --get filter.truncate-mac-address-to-24-bits.clean)\" | eval \"$(git config --get filter.truncate-dyness-battery-serial-numbers.clean)\""
 	smudge = cat
 
 [filter "truncate-dyness-battery-serial-numbers"]