Add mqtt sensor configurable state encoding for sensor and binary_sensor platform (#60447)
* Add mqtt sensor state encoding * Make encoding attribute not specific to states * Move encoding attribute to schema base
This commit is contained in:
parent
7469f083fd
commit
2a2a20fcb3
8 changed files with 76 additions and 7 deletions
|
@ -13,6 +13,7 @@ CONF_AVAILABILITY = "availability"
|
|||
CONF_BROKER = "broker"
|
||||
CONF_BIRTH_MESSAGE = "birth_message"
|
||||
CONF_COMMAND_TOPIC = "command_topic"
|
||||
CONF_ENCODING = "encoding"
|
||||
CONF_QOS = ATTR_QOS
|
||||
CONF_RETAIN = ATTR_RETAIN
|
||||
CONF_STATE_TOPIC = "state_topic"
|
||||
|
@ -24,6 +25,7 @@ DATA_MQTT_CONFIG = "mqtt_config"
|
|||
DEFAULT_PREFIX = "homeassistant"
|
||||
DEFAULT_BIRTH_WILL_TOPIC = DEFAULT_PREFIX + "/status"
|
||||
DEFAULT_DISCOVERY = True
|
||||
DEFAULT_ENCODING = "utf-8"
|
||||
DEFAULT_QOS = 0
|
||||
DEFAULT_PAYLOAD_AVAILABLE = "online"
|
||||
DEFAULT_PAYLOAD_NOT_AVAILABLE = "offline"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue