[Question] Control of temperature units #248
-
Your QuestionIs the temperature unit (e.g. degrees C, F) something that can be configured or is Celsius hardcoded in the driver? Additional ContextI see that Checking this page: https://esphome.io/components/sensor/index.html, it seems like Is this actually the case? Would the code need to be extended to support Fahrenheit?
Pre-Submission Checklist
HVAC System TypeNASA (Bus Protocol) Samsung HVAC Device ModelAC048BNHDCH ESP Device ModelM5Stack Atom Lite + M5Stack Atom RS485 Connection PinsF1/F2 YAML Configurationesphome:
name: samsung-hvac
friendly_name: Samsung HVAC
# Select chipset and board configuration - in this case M5STACK
esp32:
board: m5stack-atom
# [Optional] - Create web interface where you can control the AC from your web browser (without Home Assistant)
web_server:
port: 80
# Enable logging
logger:
logs:
component: ERROR # Remove the "Your component takes to long to respond warning"
# Enable Home Assistant API
api:
encryption:
key: ""
ota:
- platform: esphome
password: ""
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Samsung-Hvac Fallback Hotspot"
password: ""
captive_portal:
# Specify pins used by the board to comunicate with RS485 board - in this case M5STACK
uart:
tx_pin: GPIO19 # Use GPIO26 for ATOM Tail485
rx_pin: GPIO22 # Use GPIO32 for ATOM Tail485
# For older devices it could also be 2400. But you should start with 9600.
baud_rate: 9600
parity: EVEN
## SAMSUNG AC CONFIGURATION
# Import custom component from GitHub
external_components:
- source: github://omerfaruk-aran/esphome_samsung_hvac_bus@main # Use @stable if you want a more stable experience, but note a lot of this example code breaks.
components: [ samsung_ac ]
samsung_ac:
capabilities:
presets:
quiet: true
sleep: true
windfree: true
eco: true
devices:
- address: "20.00.00" # Indoor device address
climate:
name: "Home climate"
# The controls directly below are all included in the climate control. Its adviced to only add the climate control and skip the extra controls.
room_temperature:
name: "Home temperature"
target_temperature:
name: "Home target temperature"
power:
name: "Home power"
mode:
name: "Home mode"
#Add automatic_cleaning mode for Samsung AC NASA
#- Added the "automatic_cleaning" feature to the Samsung AC integration.
#- This mode ensures hygienic drying of all moisture in the indoor unit after the cooling process is completed.
automatic_cleaning:
name: "Home automatic clean"
room_humidity:
name: "Home humidity"
- address: "10.00.00" # Outdoor device address as the following components are dependent on an outdoor unit.
error_code:
name: error_code
# This sensor measures the instantaneous power consumption of the outdoor unit in Watts.
# The captured value represents the current power draw of the outdoor HVAC components, helping track energy usage patterns.
outdoor_instantaneous_power:
name: "Outdoor Instantaneous Power"
# This sensor records the cumulative energy consumption of the outdoor unit in kWh.
# It calculates the total energy consumed over time, allowing users to monitor and analyze energy efficiency.
outdoor_cumulative_energy:
name: "Outdoor Cumulative Energy"
# This sensor measures the current drawn by the outdoor unit in Amperes.
# Monitoring current values helps identify electrical irregularities and ensure safe power levels in the system.
outdoor_current:
name: "Outdoor Current"
# This sensor tracks the voltage supplied to the outdoor unit in Volts.
# Consistent voltage readings indicate stable power delivery, while deviations can help detect electrical issues in the system.
outdoor_voltage:
name: "Outdoor Voltage" ESPHome Samsung AC LogsNo response Additional InformationNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The temperature unit (Celsius or Fahrenheit) is directly determined by the settings on the device itself. The driver simply publishes the raw data received from the device, without performing any conversion. Therefore, if your device is configured to use Celsius or Fahrenheit, the published data will reflect that unit directly. If you want to change the unit, you must do so from the device's settings. Additionally, Home Assistant or other integration platforms can often handle unit conversion or display the correct units based on localization settings. |
Beta Was this translation helpful? Give feedback.
The temperature unit (Celsius or Fahrenheit) is directly determined by the settings on the device itself. The driver simply publishes the raw data received from the device, without performing any conversion. Therefore, if your device is configured to use Celsius or Fahrenheit, the published data will reflect that unit directly.
If you want to change the unit, you must do so from the device's settings. Additionally, Home Assistant or other integration platforms can often handle unit conversion or display the correct units based on localization settings.