diff --git a/docs/core/entity/number.md b/docs/core/entity/number.md index 529c0824..a713a198 100644 --- a/docs/core/entity/number.md +++ b/docs/core/entity/number.md @@ -19,7 +19,7 @@ Properties should always only return information from memory and not do I/O (lik | native_min_value | float | 0 | The minimum accepted value in the number's `native_unit_of_measurement` (inclusive) | native_step | float | **See below** | Defines the resolution of the values, i.e. the smallest increment or decrement in the number's | native_unit_of_measurement | string | `None` | The unit of measurement that the number's value is expressed in. If the `native_unit_of_measurement` is °C or °F, and its `device_class` is temperature, the number's `unit_of_measurement` will be the preferred temperature unit configured by the user and the number's `state` will be the `native_value` after an optional unit conversion. | native_value | float | **Required** | The value of the number in the number's `native_unit_of_measurement`. -| native_unit_of_measurement | string | None | The unit of measurement that the sensor's value is expressed in. If the `native_unit_of_measurement` is °C or °F, and its `device_class` is temperature, the sensor's `unit_of_measurement` will be the preferred temperature unit configured by the user and the sensor's `state` will be the `native_value` after an optional unit conversion. +| native_unit_of_measurement | string | None | The unit of measurement that the sensor's value is expressed in. If the `native_unit_of_measurement` is °C or °F, and its `device_class` is temperature, the sensor's `unit_of_measurement` will be the preferred temperature unit configured by the user and the sensor's `state` will be the `native_value` after an optional unit conversion. If a [unit translation is provided](/docs/internationalization/core#unit-of-measurement-of-entities), `native_unit_of_measurement` should not be defined. Other properties that are common to all entities such as `icon`, `name` etc are also applicable. diff --git a/docs/core/entity/sensor.md b/docs/core/entity/sensor.md index 9d502e11..6e5d9a0d 100644 --- a/docs/core/entity/sensor.md +++ b/docs/core/entity/sensor.md @@ -15,7 +15,7 @@ Properties should always only return information from memory and not do I/O (lik | ---- | ---- | ------- | ----------- | device_class | SensorDeviceClass | None | `None` | Type of sensor. | last_reset | datetime.datetime | None | `None` | The time when an accumulating sensor such as an electricity usage meter, gas meter, water meter etc. was initialized. If the time of initialization is unknown, set it to `None`. Note that the `datetime.datetime` returned by the `last_reset` property will be converted to an ISO 8601-formatted string when the entity's state attributes are updated. When changing `last_reset`, the `state` must be a valid number. -| native_unit_of_measurement | str | None | `None` | The unit of measurement that the sensor's value is expressed in. If the `native_unit_of_measurement` is °C or °F, and its `device_class` is temperature, the sensor's `unit_of_measurement` will be the preferred temperature unit configured by the user and the sensor's `state` will be the `native_value` after an optional unit conversion. +| native_unit_of_measurement | str | None | `None` | The unit of measurement that the sensor's value is expressed in. If the `native_unit_of_measurement` is °C or °F, and its `device_class` is temperature, the sensor's `unit_of_measurement` will be the preferred temperature unit configured by the user and the sensor's `state` will be the `native_value` after an optional unit conversion. If a [unit translation is provided](/docs/internationalization/core#unit-of-measurement-of-entities), `native_unit_of_measurement` should not be defined. | native_value | str | int | float | date | datetime | Decimal | None | **Required** | The value of the sensor in the sensor's `native_unit_of_measurement`. Using a `device_class` may restrict the types that can be returned by this property. | options | list[str] | None | `None` | In case this sensor provides a textual state, this property can be used to provide a list of possible states. Requires the `enum` device class to be set. Cannot be combined with `state_class` or `native_unit_of_measurement`. | state_class | SensorStateClass | str | None | `None` | Type of state. If not `None`, the sensor is assumed to be numerical and will be displayed as a line-chart in the frontend instead of as discrete values. diff --git a/docs/internationalization/core.md b/docs/internationalization/core.md index a5d07517..7b2f82af 100644 --- a/docs/internationalization/core.md +++ b/docs/internationalization/core.md @@ -470,7 +470,7 @@ If your integration provides entities under its domain, you will want to transla #### Unit of measurement of entities Integrations can provide translations for units of measurement of its entities. To do this, provide an `entity` object, that contains translations for the units and set the entity's `translation_key` property to a key under a domain in the `entity` object. -If the entity's `translation_key` property is not `None` and the `entity` object provides a translated unit, `SensorEntityDescription.native_unit_of_measurement` and `NumberEntityDescription.native_unit_of_measurement` will be ignored. +If the entity's `translation_key` property is not `None` and the `entity` object provides a translated unit of measurement, `SensorEntityDescription.native_unit_of_measurement` or `NumberEntityDescription.native_unit_of_measurement` should not be defined. The following example `strings.json` is for a `sensor` entity with its `translation_key` property set to `goal`: ```json