Skip to content

STTS22H component documentation #5275

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ Creates a button with an image that links to a URL.
Creates a collapsible section with a title that can be clicked to show/hide content.

``` text
{{< collapse "title" true >}}
{{< collapse true >}}
This content will be hidden by default and can be expanded by clicking the header.
You can include any Markdown content here, including lists, code blocks, etc.
the second parameter, if true, will have the content initially opened.
the parameter, if present and set to true, will have the content initially opened. Note that False is a truthy string, not a boolean
{{< /collapse >}}
```

Expand Down
4 changes: 2 additions & 2 deletions content/changelog/2025.4.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ get the project picking up some steam again.

### All changes

{{< collapse "Show" True >}}
{{< collapse true >}}

- [esp32] Allow pioarduino versions 5.3.2 and 5.4.0 {{< pr number="8440" repo="esphome" >}} by {{< ghuser name="swoboda1337" >}}
- [cli] Add `--reset` and `--upload_speed` options {{< pr number="8380" repo="esphome" >}} by {{< ghuser name="clydebarrow" >}}
Expand Down Expand Up @@ -113,7 +113,7 @@ get the project picking up some steam again.

### Dependency Changes

{{< collapse "Show" False >}}
{{< collapse >}}

- Bump setuptools from 69.2.0 to 76.0.0 {{< pr number="8405" repo="esphome" >}} by {{< ghuser name="dependabot[bot]" >}}
- Bump puremagic from 1.27 to 1.28 {{< pr number="8406" repo="esphome" >}} by {{< ghuser name="dependabot[bot]" >}}
Expand Down
8 changes: 4 additions & 4 deletions content/changelog/2025.5.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ messages for each phase & frequency. An apparent power sensor was also added.

### Beta Changes

{{< collapse "Show" False >}}
{{< collapse >}}

- [media_player] Deprecate `MEDIA_PLAYER_SCHEMA` {{< pr number="8784" repo="esphome" >}} by {{< ghuser name="jesserockz" >}}
- [schema] Get component name if available for deprecation warning {{< pr number="8785" repo="esphome" >}} by {{< ghuser name="jesserockz" >}}
Expand Down Expand Up @@ -171,7 +171,7 @@ messages for each phase & frequency. An apparent power sensor was also added.

### All changes

{{< collapse "Show" True >}}
{{< collapse true >}}

- [esp32] Allow pioarduino version 5.3.3 and 5.5.0 {{< pr number="8526" repo="esphome" >}} by {{< ghuser name="swoboda1337" >}}
- Update setup to make .temp directory {{< pr number="8558" repo="esphome" >}} by {{< ghuser name="calumapplepie" >}}
Expand Down Expand Up @@ -376,7 +376,7 @@ messages for each phase & frequency. An apparent power sensor was also added.

### Dependency Changes

{{< collapse "Show" False >}}
{{< collapse >}}

- Bump ruff from 0.11.2 to 0.11.4 {{< pr number="8538" repo="esphome" >}} by {{< ghuser name="dependabot[bot]" >}}
- Bump pytest-cov from 6.0.0 to 6.1.1 {{< pr number="8537" repo="esphome" >}} by {{< ghuser name="dependabot[bot]" >}}
Expand Down Expand Up @@ -408,7 +408,7 @@ messages for each phase & frequency. An apparent power sensor was also added.

## Past Changelogs

{{< collapse "Show" False >}}
{{< collapse >}}

- {{< docref "2025.4.0/" >}}
- {{< docref "2025.3.0/" >}}
Expand Down
14 changes: 7 additions & 7 deletions content/changelog/2025.6.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ It does not apply to the older, now-outdated {{< docref "/components/sensor/bme6

## Release 2025.6.1 - June 23

{{< collapse "Show" True >}}
{{< collapse true >}}

- Eliminate memory fragmentation with BLE event pool {{< pr number="9101" repo="esphome" >}} by {{< ghuser name="bdraco" >}}
- [nextion] Fix command spacing double timing and response blocking issues {{< pr number="9134" repo="esphome" >}} by {{< ghuser name="edwardtfn" >}}
Expand All @@ -174,7 +174,7 @@ It does not apply to the older, now-outdated {{< docref "/components/sensor/bme6

## Release 2025.6.2 - June 27

{{< collapse "Show" True >}}
{{< collapse true >}}

- [lvgl] Fix dangling pointer issue with qrcode {{< pr number="9190" repo="esphome" >}} by {{< ghuser name="clydebarrow" >}}
- [audio] Bugfix: improve timeout handling {{< pr number="9221" repo="esphome" >}} by {{< ghuser name="kahrendt" >}}
Expand All @@ -188,7 +188,7 @@ It does not apply to the older, now-outdated {{< docref "/components/sensor/bme6

## Release 2025.6.3 - July 3

{{< collapse "Show" True >}}
{{< collapse true >}}

- [uart] fix: missing uart_config_t struct initialisation {{< pr number="9235" repo="esphome" >}} by {{< ghuser name="Rezoran" >}}
- Fix api log client crashing when api encryption is dynamic {{< pr number="9245" repo="esphome" >}} by {{< ghuser name="jesserockz" >}}
Expand Down Expand Up @@ -219,7 +219,7 @@ It does not apply to the older, now-outdated {{< docref "/components/sensor/bme6

### Beta Changes

{{< collapse "Show" False >}}
{{< collapse >}}

- Fix dashboard logging being escaped before parser {{< pr number="9054" repo="esphome" >}} by {{< ghuser name="bdraco" >}}
- Always perform select() when loop duration exceeds interval {{< pr number="9058" repo="esphome" >}} by {{< ghuser name="bdraco" >}}
Expand Down Expand Up @@ -261,7 +261,7 @@ It does not apply to the older, now-outdated {{< docref "/components/sensor/bme6

### All changes

{{< collapse "Show" True >}}
{{< collapse true >}}

- add actions to the MAX7219Component {{< pr number="6462" repo="esphome" >}} by {{< ghuser name="nielsnl68" >}}
- [api] Update api proto to add legacy value {{< pr number="8802" repo="esphome" >}} by {{< ghuser name="jesserockz" >}}
Expand Down Expand Up @@ -430,7 +430,7 @@ It does not apply to the older, now-outdated {{< docref "/components/sensor/bme6

### Dependency Changes

{{< collapse "Show" False >}}
{{< collapse >}}

- Bump aioesphomeapi from 30.2.0 to 31.0.0 {{< pr number="8779" repo="esphome" >}} by {{< ghuser name="dependabot[bot]" >}}
- Bump cairosvg from 2.7.1 to 2.8.0 {{< pr number="8780" repo="esphome" >}} by {{< ghuser name="dependabot[bot]" >}}
Expand Down Expand Up @@ -468,7 +468,7 @@ It does not apply to the older, now-outdated {{< docref "/components/sensor/bme6

## Past Changelogs

{{< collapse "Show" False >}}
{{< collapse >}}

- {{< docref "2025.5.0/" >}}
- {{< docref "2025.4.0/" >}}
Expand Down
16 changes: 8 additions & 8 deletions content/changelog/2025.7.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ For detailed migration information, see the [ArduinoJson migration guide](https:

## Release 2025.7.1 - July 17

{{< collapse "Show" True >}}
{{< collapse true >}}

- [lvgl]: fix missing await keyword in meter tick_style width processing {{< pr number="9538" repo="esphome" >}} by {{< ghuser name="theshut" >}}
- Fix compilation error when using string lambdas with homeassistant services {{< pr number="9543" repo="esphome" >}} by {{< ghuser name="bdraco" >}}
Expand All @@ -395,7 +395,7 @@ For detailed migration information, see the [ArduinoJson migration guide](https:

## Release 2025.7.2 - July 19

{{< collapse "Show" True >}}
{{< collapse true >}}

- Fix template event web_server crash {{< pr number="9618" repo="esphome" >}} by {{< ghuser name="AzonInc" >}}
- [api] Fix compilation error with char* lambdas in HomeAssistant services {{< pr number="9638" repo="esphome" >}} by {{< ghuser name="bdraco" >}}
Expand All @@ -416,7 +416,7 @@ For detailed migration information, see the [ArduinoJson migration guide](https:

## Release 2025.7.3 - July 23

{{< collapse "Show" True >}}
{{< collapse true >}}

- [gpio] Auto-disable interrupts for shared GPIO pins in binary sensors {{< pr number="9701" repo="esphome" >}} by {{< ghuser name="bdraco" >}}
- Fix format string error in ota_web_server.cpp {{< pr number="9711" repo="esphome" >}} by {{< ghuser name="tmpeh" >}}
Expand All @@ -433,7 +433,7 @@ For detailed migration information, see the [ArduinoJson migration guide](https:

## Release 2025.7.4 - July 28

{{< collapse "Show" True >}}
{{< collapse true >}}

- [remote_receiver] Fix idle validation {{< pr number="9819" repo="esphome" >}} by {{< ghuser name="swoboda1337" >}}
- [gt911] i2c fixes {{< pr number="9822" repo="esphome" >}} by {{< ghuser name="clydebarrow" >}}
Expand All @@ -446,7 +446,7 @@ For detailed migration information, see the [ArduinoJson migration guide](https:

## Release 2025.7.5 - August 5

{{< collapse "Show" True >}}
{{< collapse true >}}

- [lvgl] Bugfix for tileview {{< pr number="9938" repo="esphome" >}} by {{< ghuser name="clydebarrow" >}}
- [api] Fix OTA progress updates not being sent when main loop is blocked {{< pr number="10049" repo="esphome" >}} by {{< ghuser name="bdraco" >}}
Expand Down Expand Up @@ -500,7 +500,7 @@ For detailed migration information, see the [ArduinoJson migration guide](https:

### All changes

{{< collapse "Show" False >}}
{{< collapse >}}

- [core/pins] improve pins types {{< pr number="8848" repo="esphome" >}} by {{< ghuser name="ximex" >}}
- [binary_sensor] Add action to invalidate state and pass to HA {{< pr number="8961" repo="esphome" >}} by {{< ghuser name="clydebarrow" >}} (breaking-change)
Expand Down Expand Up @@ -779,7 +779,7 @@ For detailed migration information, see the [ArduinoJson migration guide](https:

### Dependency Changes

{{< collapse "Show" False >}}
{{< collapse >}}

- Bump pytest-cov from 6.1.1 to 6.2.1 {{< pr number="9063" repo="esphome" >}} by {{< ghuser name="dependabot[bot]" >}}
- Bump pytest-asyncio from 0.26.0 to 1.0.0 {{< pr number="9067" repo="esphome" >}} by {{< ghuser name="dependabot[bot]" >}}
Expand All @@ -806,7 +806,7 @@ For detailed migration information, see the [ArduinoJson migration guide](https:

## Past Changelogs

{{< collapse "Show" False >}}
{{< collapse >}}

- {{< docref "2025.6.0/" >}}
- {{< docref "2025.5.0/" >}}
Expand Down
6 changes: 3 additions & 3 deletions content/changelog/2025.8.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ or advanced configurations may need updates.

### All changes

{{< collapse "Show" True >}}
{{< collapse true >}}

- [web_server] fix `Arudino` typo {{< pr number="9404" repo="esphome" >}} by {{< ghuser name="ximex" >}}
- Speed up clang-tidy CI by 80%+ with incremental checking {{< pr number="9396" repo="esphome" >}} by {{< ghuser name="bdraco" >}}
Expand Down Expand Up @@ -584,7 +584,7 @@ or advanced configurations may need updates.

### Dependency Changes

{{< collapse "Show" False >}}
{{< collapse >}}

- Bump ruff from 0.12.2 to 0.12.3 {{< pr number="9446" repo="esphome" >}} by {{< ghuser name="dependabot[bot]" >}}
- Bump aioesphomeapi from 34.2.1 to 35.0.1 {{< pr number="9474" repo="esphome" >}} by {{< ghuser name="dependabot[bot]" >}}
Expand Down Expand Up @@ -633,7 +633,7 @@ or advanced configurations may need updates.

## Past Changelogs

{{< collapse "Show" False >}}
{{< collapse >}}

- {{< docref "2025.7.0/" >}}
- {{< docref "2025.6.0/" >}}
Expand Down
4 changes: 2 additions & 2 deletions content/components/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -525,8 +525,8 @@ Sensors are organized into categories; if a given sensor fits into more than one
"Xiaomi Miscale","components/sensor/xiaomi_miscale","xiaomi_miscale1&2.jpg",""
{{< /imgtable >}}
Looking for a sensor that outputs its values as an analog voltage? Have a look at the
{{< docref "/components/sensor/adc" "ADC Sensor" >}} together with a formula like in the `TEMT6000
configuration <https://devices.esphome.io/devices/temt6000>`__.
{{< docref "/components/sensor/adc" "ADC Sensor" >}} together with a formula like in the
[TEMT6000 configuration](https://devices.esphome.io/devices/temt6000).

## Binary Sensor Components

Expand Down
61 changes: 57 additions & 4 deletions content/components/graph.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ graph:
- **max_value** (*Optional*): Specifies the maximum Y-axis value.
- **min_value** (*Optional*): Specifies the minimum Y-axis value.
- **traces** (*Optional*): Use this to specify more than a single trace.
- **legend** (*Optional*): Configures a legend for the graph traces. See [Legend Options](#legend-options).

Trace specific fields:

Expand All @@ -74,15 +75,60 @@ Trace specific fields:
- **continuous** (*Optional*): connects the individual points to make a continuous line. Defaults to `false`.
- **color** (*Optional*): Sets the color of the sensor trace.

## Legend Options

The legend displays trace names, current values, units, and line style samples. Only one legend per graph is supported.

- **name_font** (**Required**, [Font](#display-fonts)): Font used for trace names.
- **value_font** (*Optional*, [Font](#display-fonts)): Font used for current values. If not specified, values are not displayed.
- **width** (*Optional*, int): Legend width in pixels. If not specified, width is automatically calculated.
- **height** (*Optional*, int): Legend height in pixels. If not specified, height is automatically calculated.
- **border** (*Optional*, boolean): Draw a border around the legend. Defaults to `true`.
- **show_lines** (*Optional*, boolean): Display line style samples. Defaults to `true`.
- **show_values** (*Optional*): Position of current values. Can be `NONE`, `AUTO`, `BESIDE`, `BELOW`. Defaults to `AUTO`.
- **show_units** (*Optional*, boolean): Include units with values. Defaults to `true`.
- **direction** (*Optional*): Layout direction. Can be `AUTO`, `HORIZONTAL`, `VERTICAL`. Defaults to `AUTO`.

Example with legend:

```yaml
graph:
- id: temperature_graph_with_legend
duration: 1h
width: 151
height: 51
traces:
- sensor: indoor_temp
name: "Indoor"
line_type: SOLID
color: my_red
- sensor: outdoor_temp
name: "Outdoor"
line_type: DASHED
color: my_blue
legend:
name_font: legend_font
value_font: value_font
show_values: BELOW
border: true
show_lines: true
show_units: true

font:
- file: "arial.ttf"
id: legend_font
size: 10
- file: "arial.ttf"
id: value_font
size: 8
```

And then later in code:

```yaml
display:
- platform: ...
# ...
pages:
- id: page1
lambda: |-
pages:
- id: page1
lambda: |-
Expand All @@ -92,6 +138,11 @@ display:
lambda: |-
// Draw the graph at position [x=10,y=20]
it.graph(10, 20, id(multi_temperature_graph), my_yellow);
- id: page3
lambda: |-
// Draw graph and legend
it.graph(10, 20, id(temperature_graph_with_legend));
it.graph_legend(170, 20, id(temperature_graph_with_legend), my_yellow);

color:
- id: my_red
Expand All @@ -117,6 +168,8 @@ Here are some things to note:

- Setting `y_grid` will expand any specified range to the nearest multiple of grid spacings.
- Axis labels are currently not possible without manually placing them.
- The grid and border color is set with it.graph(), while the traces are defined separately.
- The grid and border color is set with `it.graph()`, while the traces are defined separately.
- Legends are drawn separately using `it.graph_legend()` and can be positioned independently of the graph.
- Legend dimensions are automatically calculated if not specified, based on font sizes and trace count.

{{< /note >}}
Binary file added content/components/sensor/images/stts22h.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 38 additions & 0 deletions content/components/sensor/stts22h.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
description: "Instructions for setting up STTS22H temperature sensor from STMicroelectronics"
title: "STTS22H Temperature Sensor"
params:
seo:
description: Instructions for setting up STTS22H temperature sensor from STMicroelectronics with ESPHome
image: stts22h.jpg
---

The `stts22h` sensor platform allows you to use a STTS22H temperature sensor ([datasheet](https://www.st.com/resource/en/datasheet/stts22h.pdf)) with ESPHome.
The [I²C bus](#i2c) is required to be set up in your configuration for this sensor to work.

{{< img src="stts22h.png" alt="Image" caption="SparkFun Temperature Sensor & SparkFun Micro Temperature Sensor" class="align-center" >}}

```yaml
# Example configuration entry
sensor:
- platform: stts22h
name: "STTS22h Temperature"
address: 0x3C
update_interval: 60s
```

## Configuration variables

- **address** (*Optional*, int): The I²C address of the sensor. Defaults to
`0x3C`.
Can be one of the following: `0x38`, `0x3C`, `0x3E`, `0x3F`.

- **update_interval** (*Optional*, [Time](#config-time)): The interval to check
the sensor. Defaults to `60s`.

- All other options from [Sensor](#config-sensor).

## See Also

- [Sensor Filters](#sensor-filters)
- [STTS22H Product Overview - STMicroelectronics](https://www.st.com/en/mems-and-sensors/stts22h.html)
4 changes: 2 additions & 2 deletions content/guides/yaml.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ Example:
```yaml
# this is a comment
foo:
bar: 3 # this is another comment
text: "# can be included in a string"
bar: 3 # this is another comment
text: "# can be included in a string"
```

{{< anchor "yaml-scalars" >}}
Expand Down
3 changes: 1 addition & 2 deletions content/projects/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
description: "Install ready-made projects directly on your device."
title: "Ready-Made Projects"
layout: "projects"
params:
seo:
description: Install ready-made projects directly on your device.
Expand All @@ -13,5 +14,3 @@ Unleash the potential of your device by installing ready-made ESPHome
projects from this page. Connect your device to your PC, a few clicks in the browser
and your ESPHome device is ready to do its magic - as a Bluetooth proxy or a media player.
No programming or other software required.

{{< html_file file="./installer.html" >}}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/projects/bluetooth-proxy/gl-s10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/projects/bluetooth-proxy/header.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/projects/bluetooth-proxy/wt32-eth01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/projects/empty/espressif.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/projects/empty/pico-w.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/projects/media-player/atom_echo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/projects/media-player/atom_speaker_kit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/projects/media-player/esp_muse_luxe.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/projects/media-player/esp_muse_proto.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading