Note that, due to a firmware change, the m400 rule should use "gpio_keys" instead of "gpio-keys". Here is the new rule:
SUBSYSTEM=="input", KERNEL=="event*", SUBSYSTEMS=="platform", KERNELS=="gpio_keys.6", PROGRAM="/bin/grep '^HP ProLiant m400 Server Cartridge$' /proc/device-tree/model", TAG+="power-switch"
Note that, due to a firmware change, the m400 rule should use "gpio_keys" instead of "gpio-keys". Here is the new rule:
SUBSYSTEM=="input", KERNEL=="event*", SUBSYSTEMS= ="platform" , KERNELS= ="gpio_ keys.6" , PROGRAM="/bin/grep '^HP ProLiant m400 Server Cartridge$' /proc/device- tree/model" , TAG+="power-switch"