The md5 function provides an easy way to calculate the MD5 hash of a given value.
Template function properties | |
---|---|
Function | Calculate the MD5 hash of a given value |
Function name | md5 |
Returns | The MD5 hash |
Return type | string |
Can be used as a filter | Yes |
Can be used as a test | No |
Spook's influence | Newly added template function |
Developer tools | Try this in the template developer tools |
Signature |
---|
|
Function parameters | |||
---|---|---|---|
Attribute | Type | Required | Default / Example |
value | string | Yes | hash me |
ExamplesΒΆ
Using md5 as a functionΒΆ
1
{{ md5("hash me") }}
Returns:
d09dba7d332adb585d176cf807f00f34
Using md5 as a filterΒΆ
1
{{ "hash me" | md5 }}
Returns:
d09dba7d332adb585d176cf807f00f34
Features requests, ideas, and supportΒΆ
If you have an idea on how to further enhance the Home Assistant template engine, for example, by adding a new template function; feel free to let us know in our discussion forums.
Are you stuck using this new feature? Or maybe youβve run into a bug? Please check the Support page on where to go for help.