converted html to a boolean and updated documentation and schema

This commit is contained in:
2024-11-13 11:52:08 -05:00
parent 3ab4b45041
commit 61e4eeff6c
3 changed files with 20 additions and 15 deletions

View File

@@ -1664,11 +1664,11 @@ properties:
that device instead of all devices.
example: pixel8
html:
type: integer
type: boolean
description: |
Set to 1 to enable HTML parsing of the message. Set
to 0 for plain text.
example: 1
Set to True to enable HTML parsing of the message.
Set to False for plain text.
example: True
sound:
type: string
description: |
@@ -1740,11 +1740,11 @@ properties:
that device instead of all devices.
example: pixel8
html:
type: integer
type: boolean
description: |
Set to 1 to enable HTML parsing of the message. Set
to 0 for plain text.
example: 1
Set to True to enable HTML parsing of the message.
Set to False for plain text.
example: True
sound:
type: string
description: |
@@ -1815,11 +1815,11 @@ properties:
that device instead of all devices.
example: pixel8
html:
type: integer
type: boolean
description: |
Set to 1 to enable HTML parsing of the message. Set
to 0 for plain text.
example: 1
Set to True to enable HTML parsing of the message.
Set to False for plain text.
example: True
sound:
type: string
description: |

View File

@@ -48,6 +48,11 @@ def ping_monitor(hook_config, config, config_filename, state, monitoring_log_lev
state_config.pop('expire', None)
state_config.pop('retry', None)
state_config = {
key: (1 if value is True and key in 'html' else value)
for key, value in state_config.items()
}
data = dict(
{
'token': token,