Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pilotak/esphome-eeprom
Lets you write/read EEPROM in lambdas
https://github.com/pilotak/esphome-eeprom
eeprom esphome esphome-component i2c restore
Last synced: about 2 months ago
JSON representation
Lets you write/read EEPROM in lambdas
- Host: GitHub
- URL: https://github.com/pilotak/esphome-eeprom
- Owner: pilotak
- Created: 2024-07-19T19:44:55.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2024-09-16T08:07:53.000Z (4 months ago)
- Last Synced: 2024-09-17T08:06:45.128Z (4 months ago)
- Topics: eeprom, esphome, esphome-component, i2c, restore
- Language: C++
- Homepage:
- Size: 12.7 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# esphome-eeprom
[![build](https://github.com/pilotak/esphome-eeprom/actions/workflows/build.yml/badge.svg)](https://github.com/pilotak/esphome-eeprom/actions/workflows/build.yml)
Lets you write/read EEPROM in lambdas
```yaml
external_components:
- source: github://pilotak/esphome-eeprom
components: [i2c_eeprom]i2c:
scl: 16
sda: 17
id: i2c_1i2c_eeprom:
- id: eeprom_1
size: 16KB
- id: eeprom_2
size: 32KB
i2c_id: i2c_1
address: 0x52some_option:
on_something:
- lambda: |-
uint8_t write_byte = 0b1;
eeprom_1->put(0x0001, write_byte);uint8_t read_byte;
eeprom_1->get(0x0001, &read_byte);
ESP_LOGD("eeprom","Read: 0x%02X ", read_byte);
```> Multiple devices can be used at the same time.
### Configuration
- **size** - _(required)_ Set the EEPPROM size: `1KB`, `2KB`, `4KB`, `8KB`, `16KB`, `32KB`, `64KB`, `128KB`, `256KB`, `512KB`
- **id** - _(required)_ Unique ID for use in lambdas
- **i2c_id** - _(optional)_ ID of the I2C bus
- **address** - _(optional)_(default 0x50) I2C address
- **on_setup** - _(optional)_ Automation to run after setupPlease see [example](./example.yaml) how to use it action.