Revert temperature_unit_is_fahrenheit
This commit is contained in:
@@ -322,7 +322,7 @@ api:
|
|||||||
embedded_climate: bool
|
embedded_climate: bool
|
||||||
embedded_climate_friendly_name: string
|
embedded_climate_friendly_name: string
|
||||||
embedded_indoor_temperature: bool
|
embedded_indoor_temperature: bool
|
||||||
temperature_unit_is_fahrenheit: bool # Deprecated
|
temperature_unit_is_fahrenheit: bool
|
||||||
mui_please_confirm: string
|
mui_please_confirm: string
|
||||||
mui_unavailable: string
|
mui_unavailable: string
|
||||||
screensaver_time: bool
|
screensaver_time: bool
|
||||||
@@ -334,6 +334,7 @@ api:
|
|||||||
embedded_climate: !lambda "return embedded_climate;"
|
embedded_climate: !lambda "return embedded_climate;"
|
||||||
embedded_climate_friendly_name: !lambda "return embedded_climate_friendly_name;"
|
embedded_climate_friendly_name: !lambda "return embedded_climate_friendly_name;"
|
||||||
embedded_indoor_temperature: !lambda "return embedded_indoor_temperature;"
|
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_please_confirm: !lambda "return mui_please_confirm;"
|
||||||
mui_unavailable: !lambda "return mui_unavailable;"
|
mui_unavailable: !lambda "return mui_unavailable;"
|
||||||
screensaver_time: !lambda "return screensaver_time;"
|
screensaver_time: !lambda "return screensaver_time;"
|
||||||
@@ -831,6 +832,12 @@ globals:
|
|||||||
restore_value: true
|
restore_value: true
|
||||||
initial_value: 'false'
|
initial_value: 'false'
|
||||||
|
|
||||||
|
##### Temperature unit #####
|
||||||
|
- id: temp_unit_fahrenheit
|
||||||
|
type: bool
|
||||||
|
restore_value: true
|
||||||
|
initial_value: 'false'
|
||||||
|
|
||||||
##### Date/time formats #####
|
##### Date/time formats #####
|
||||||
- id: home_date_color
|
- id: home_date_color
|
||||||
type: uint
|
type: uint
|
||||||
@@ -1850,9 +1857,9 @@ script:
|
|||||||
- lambda: |-
|
- lambda: |-
|
||||||
if (id(embedded_indoor_temp) or (!wifi_component->is_connected()) or (!api_server->is_connected())) {
|
if (id(embedded_indoor_temp) or (!wifi_component->is_connected()) or (!api_server->is_connected())) {
|
||||||
float unit_based_temperature = temp_nspanel->state;
|
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;
|
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
|
- id: display_wrapped_text
|
||||||
@@ -1915,6 +1922,7 @@ script:
|
|||||||
embedded_climate: bool
|
embedded_climate: bool
|
||||||
embedded_climate_friendly_name: string
|
embedded_climate_friendly_name: string
|
||||||
embedded_indoor_temperature: bool
|
embedded_indoor_temperature: bool
|
||||||
|
temperature_unit_is_fahrenheit: bool
|
||||||
mui_please_confirm: string
|
mui_please_confirm: string
|
||||||
mui_unavailable: string
|
mui_unavailable: string
|
||||||
screensaver_time: bool
|
screensaver_time: bool
|
||||||
@@ -1934,6 +1942,7 @@ script:
|
|||||||
// Indoor temperature
|
// Indoor temperature
|
||||||
ESP_LOGV(TAG, "Set indoor temperature");
|
ESP_LOGV(TAG, "Set indoor temperature");
|
||||||
id(embedded_indoor_temp) = embedded_indoor_temperature;
|
id(embedded_indoor_temp) = embedded_indoor_temperature;
|
||||||
|
id(temp_unit_fahrenheit) = temperature_unit_is_fahrenheit;
|
||||||
display_embedded_temp->execute();
|
display_embedded_temp->execute();
|
||||||
|
|
||||||
// MUI strings
|
// MUI strings
|
||||||
|
|||||||
@@ -21,7 +21,9 @@ Table of contents:
|
|||||||
- [Scheduled actions](#scheduled-actions)
|
- [Scheduled actions](#scheduled-actions)
|
||||||
- [Scheduled relay](#scheduled-relay)
|
- [Scheduled relay](#scheduled-relay)
|
||||||
- [Scheduled climate](#scheduled-climate)
|
- [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)
|
- [Bluetooth proxy](#bluetooth-proxy)
|
||||||
- [Logger via UART](#logger-via-uart)
|
- [Logger via UART](#logger-via-uart)
|
||||||
- [Climate custom presets](#climate-custom-presets)
|
- [Climate custom presets](#climate-custom-presets)
|
||||||
@@ -474,7 +476,7 @@ time:
|
|||||||
target_temperature: 18°C
|
target_temperature: 18°C
|
||||||
```
|
```
|
||||||
|
|
||||||
### Framework `esp-idf`
|
### Frameworks
|
||||||
> [!IMPORTANT]
|
> [!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
|
> 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.
|
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]
|
> [!NOTE]
|
||||||
> For more info about frameworks, please visit [ESPHome docs](https://esphome.io/components/esp32).
|
> 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
|
```yaml
|
||||||
# Change framework to `esp-idf`
|
# Change framework to `esp-idf`
|
||||||
esp32:
|
esp32:
|
||||||
|
|||||||
Reference in New Issue
Block a user