mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-13 04:16:48 +00:00
Add suggested_display_precision
config setting for MQTT sensor (#26064)
* Add precision config setting to MQTT sensor * rename to suggested_display_precision
This commit is contained in:
parent
fd944c8b03
commit
ff666ac3ac
@ -441,6 +441,7 @@ Configuration variable names in the discovery payload may be abbreviated to cons
|
||||
'stat_val_tpl': 'state_value_template',
|
||||
'step': 'step',
|
||||
'stype': 'subtype',
|
||||
'sug_dsp_prc': 'suggested_display_precision',
|
||||
'sup_clrm': 'supported_color_modes',
|
||||
'sup_dur': 'support_duration',
|
||||
'sup_vol': 'support_volume_set',
|
||||
|
@ -170,6 +170,10 @@ payload_not_available:
|
||||
required: false
|
||||
type: string
|
||||
default: offline
|
||||
suggested_display_precision:
|
||||
description: The number of decimals which should be used in the sensor's state after rounding.
|
||||
required: false
|
||||
type: integer
|
||||
qos:
|
||||
description: The maximum QoS level of the state topic.
|
||||
required: false
|
||||
@ -323,6 +327,7 @@ mqtt:
|
||||
sensor:
|
||||
- name: "Temperature"
|
||||
state_topic: "office/sensor1"
|
||||
suggested_display_precision: 1
|
||||
unit_of_measurement: "°C"
|
||||
value_template: "{{ value_json.temperature }}"
|
||||
- name: "Humidity"
|
||||
|
Loading…
x
Reference in New Issue
Block a user