Fix build issue since std namespace is missing
Also fix some spelling mistakes
This commit is contained in:
@@ -247,11 +247,11 @@ api:
|
|||||||
switch.is_on: nextion_init
|
switch.is_on: nextion_init
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
//ESP_LOGD("nextion", "thermostat sendig value %f", value);
|
//ESP_LOGD("nextion", "thermostat sendig value %f", value);
|
||||||
int v = int(2 * min(max(value - 13.5, 0.0), 5.0));
|
int v = int(2 * std::min(std::max(value - 13.5, 0.0), 5.0));
|
||||||
int left = v + (v ? 19 : 16); // 16 is empty left.
|
int left = v + (v ? 19 : 16); // 16 is empty left.
|
||||||
v = int(2 * min(max(value - 18.0, 0), 4.0));
|
v = int(2 * std::min(std::max(value - 18.0, 0.0), 4.0));
|
||||||
int mid = v + (v ? 29 : 17); // 17 is empty mid.
|
int mid = v + (v ? 29 : 17); // 17 is empty mid.
|
||||||
v = int(2 * min(max(value - 21.5, 0), 5.5));
|
v = int(2 * std::min(std::max(value - 21.5, 0.0), 5.5));
|
||||||
int right = v + (v ? 37 : 18); // 18 is empty right.
|
int right = v + (v ? 37 : 18); // 18 is empty right.
|
||||||
// sends the 3 images to the display
|
// sends the 3 images to the display
|
||||||
//ESP_LOGD("nextion", "thermostat left %i", left);
|
//ESP_LOGD("nextion", "thermostat left %i", left);
|
||||||
@@ -391,21 +391,21 @@ sensor:
|
|||||||
name: ${device_name} RSSI
|
name: ${device_name} RSSI
|
||||||
update_interval: 60s
|
update_interval: 60s
|
||||||
|
|
||||||
##### INTERNAL TEMPERATUE SENSOR, ADC VALUE #####
|
##### INTERNAL TEMPERATURE SENSOR, ADC VALUE #####
|
||||||
- platform: adc
|
- platform: adc
|
||||||
id: ntc_source
|
id: ntc_source
|
||||||
pin: 38
|
pin: 38
|
||||||
update_interval: 10s
|
update_interval: 10s
|
||||||
attenuation: 11db
|
attenuation: 11db
|
||||||
|
|
||||||
##### INTERNAL TEMPERATUE SENSOR, adc reading converted to resistance (calculation)#####
|
##### INTERNAL TEMPERATURE SENSOR, adc reading converted to resistance (calculation)#####
|
||||||
- platform: resistance
|
- platform: resistance
|
||||||
id: resistance_sensor
|
id: resistance_sensor
|
||||||
sensor: ntc_source
|
sensor: ntc_source
|
||||||
configuration: DOWNSTREAM
|
configuration: DOWNSTREAM
|
||||||
resistor: 11.2kOhm
|
resistor: 11.2kOhm
|
||||||
|
|
||||||
##### INTERNAL TEMPERATUE SENSOR, resistance to temperature (calculation) #####
|
##### INTERNAL TEMPERATURE SENSOR, resistance to temperature (calculation) #####
|
||||||
- platform: ntc
|
- platform: ntc
|
||||||
name: ${device_name} Temperature
|
name: ${device_name} Temperature
|
||||||
id: temp_nspanel
|
id: temp_nspanel
|
||||||
|
|||||||
Reference in New Issue
Block a user