Revert temperature_unit_is_fahrenheit
This commit is contained in:
@@ -322,7 +322,7 @@ api:
|
||||
embedded_climate: bool
|
||||
embedded_climate_friendly_name: string
|
||||
embedded_indoor_temperature: bool
|
||||
temperature_unit_is_fahrenheit: bool # Deprecated
|
||||
temperature_unit_is_fahrenheit: bool
|
||||
mui_please_confirm: string
|
||||
mui_unavailable: string
|
||||
screensaver_time: bool
|
||||
@@ -334,6 +334,7 @@ api:
|
||||
embedded_climate: !lambda "return embedded_climate;"
|
||||
embedded_climate_friendly_name: !lambda "return embedded_climate_friendly_name;"
|
||||
embedded_indoor_temperature: !lambda "return embedded_indoor_temperature;"
|
||||
temperature_unit_is_fahrenheit: !lambda "return temperature_unit_is_fahrenheit;"
|
||||
mui_please_confirm: !lambda "return mui_please_confirm;"
|
||||
mui_unavailable: !lambda "return mui_unavailable;"
|
||||
screensaver_time: !lambda "return screensaver_time;"
|
||||
@@ -831,6 +832,12 @@ globals:
|
||||
restore_value: true
|
||||
initial_value: 'false'
|
||||
|
||||
##### Temperature unit #####
|
||||
- id: temp_unit_fahrenheit
|
||||
type: bool
|
||||
restore_value: true
|
||||
initial_value: 'false'
|
||||
|
||||
##### Date/time formats #####
|
||||
- id: home_date_color
|
||||
type: uint
|
||||
@@ -1850,9 +1857,9 @@ script:
|
||||
- lambda: |-
|
||||
if (id(embedded_indoor_temp) or (!wifi_component->is_connected()) or (!api_server->is_connected())) {
|
||||
float unit_based_temperature = temp_nspanel->state;
|
||||
if ("${temp_units}" == "°F" or "${temp_units}" == "°f" or "${temp_units}" == "F" or "${temp_units}" == "f")
|
||||
if (id(temp_unit_fahrenheit))
|
||||
unit_based_temperature = (unit_based_temperature * 9 / 5) + 32;
|
||||
disp1->set_component_text_printf("home.current_temp", "%.1f${temp_units}", unit_based_temperature);
|
||||
disp1->set_component_text_printf("home.current_temp", "%.1f°%s", unit_based_temperature, id(temp_unit_fahrenheit) ? "F" : "C");
|
||||
}
|
||||
|
||||
- id: display_wrapped_text
|
||||
@@ -1915,6 +1922,7 @@ script:
|
||||
embedded_climate: bool
|
||||
embedded_climate_friendly_name: string
|
||||
embedded_indoor_temperature: bool
|
||||
temperature_unit_is_fahrenheit: bool
|
||||
mui_please_confirm: string
|
||||
mui_unavailable: string
|
||||
screensaver_time: bool
|
||||
@@ -1934,6 +1942,7 @@ script:
|
||||
// Indoor temperature
|
||||
ESP_LOGV(TAG, "Set indoor temperature");
|
||||
id(embedded_indoor_temp) = embedded_indoor_temperature;
|
||||
id(temp_unit_fahrenheit) = temperature_unit_is_fahrenheit;
|
||||
display_embedded_temp->execute();
|
||||
|
||||
// MUI strings
|
||||
|
||||
@@ -21,7 +21,9 @@ Table of contents:
|
||||
- [Scheduled actions](#scheduled-actions)
|
||||
- [Scheduled relay](#scheduled-relay)
|
||||
- [Scheduled climate](#scheduled-climate)
|
||||
- [Framework `esp-idf`](#framework-esp-idf)
|
||||
- [Frameworks](#frameworks)
|
||||
- [Framework `arduino`](#framework-arduino)
|
||||
- [Framework `esp-idf`](#framework-esp-idf)
|
||||
- [Bluetooth proxy](#bluetooth-proxy)
|
||||
- [Logger via UART](#logger-via-uart)
|
||||
- [Climate custom presets](#climate-custom-presets)
|
||||
@@ -474,7 +476,7 @@ time:
|
||||
target_temperature: 18°C
|
||||
```
|
||||
|
||||
### Framework `esp-idf`
|
||||
### Frameworks
|
||||
> [!IMPORTANT]
|
||||
> When switching from `arduino` to `esp-idf`, make sure to update the device with a serial cable as the partition table is different between the two frameworks
|
||||
as [OTA Update Component](https://esphome.io/components/ota) updates will not change the partition table.
|
||||
@@ -489,6 +491,14 @@ In any case, you can overlap the settings with this customization.
|
||||
> [!NOTE]
|
||||
> For more info about frameworks, please visit [ESPHome docs](https://esphome.io/components/esp32).
|
||||
|
||||
#### Framework `arduino`
|
||||
```yaml
|
||||
# Change framework to `arduino`
|
||||
esp32:
|
||||
framework:
|
||||
type: arduino
|
||||
```
|
||||
#### Framework `esp-idf`
|
||||
```yaml
|
||||
# Change framework to `esp-idf`
|
||||
esp32:
|
||||
|
||||
Reference in New Issue
Block a user