mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-13 12:26:50 +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',
|
'stat_val_tpl': 'state_value_template',
|
||||||
'step': 'step',
|
'step': 'step',
|
||||||
'stype': 'subtype',
|
'stype': 'subtype',
|
||||||
|
'sug_dsp_prc': 'suggested_display_precision',
|
||||||
'sup_clrm': 'supported_color_modes',
|
'sup_clrm': 'supported_color_modes',
|
||||||
'sup_dur': 'support_duration',
|
'sup_dur': 'support_duration',
|
||||||
'sup_vol': 'support_volume_set',
|
'sup_vol': 'support_volume_set',
|
||||||
|
@ -170,6 +170,10 @@ payload_not_available:
|
|||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
default: offline
|
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:
|
qos:
|
||||||
description: The maximum QoS level of the state topic.
|
description: The maximum QoS level of the state topic.
|
||||||
required: false
|
required: false
|
||||||
@ -323,6 +327,7 @@ mqtt:
|
|||||||
sensor:
|
sensor:
|
||||||
- name: "Temperature"
|
- name: "Temperature"
|
||||||
state_topic: "office/sensor1"
|
state_topic: "office/sensor1"
|
||||||
|
suggested_display_precision: 1
|
||||||
unit_of_measurement: "°C"
|
unit_of_measurement: "°C"
|
||||||
value_template: "{{ value_json.temperature }}"
|
value_template: "{{ value_json.temperature }}"
|
||||||
- name: "Humidity"
|
- name: "Humidity"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user