Mqtt configurable state encoding for sensor and binary_sensor platform (#20469)

This commit is contained in:
Jan Bouwhuis 2021-11-30 15:26:43 +01:00 committed by GitHub
parent b0c7969a73
commit b6a54f69ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 0 deletions

View File

@ -119,6 +119,7 @@ Supported abbreviations:
'dev_cla': 'device_class',
'dock_t': 'docked_topic',
'dock_tpl': 'docked_template',
'e': 'encoding',
'err_t': 'error_topic',
'err_tpl': 'error_template',
'fanspd_t': 'fan_speed_topic',

View File

@ -109,6 +109,11 @@ enabled_by_default:
required: false
type: boolean
default: true
encoding:
description: The encoding of the payload received at `state_topic`. Set to `""` to disable decoding.
required: false
type: string
default: "utf-8"
entity_category:
description: The [category](https://developers.home-assistant.io/docs/core/entity#generic-properties) of the entity.
required: false

View File

@ -101,6 +101,11 @@ enabled_by_default:
required: false
type: boolean
default: true
encoding:
description: The encoding of the payload received at `state_topic`. Set to `""` to disable decoding.
required: false
type: string
default: "utf-8"
entity_category:
description: The [category](https://developers.home-assistant.io/docs/core/entity#generic-properties) of the entity.
required: false