An open API service indexing awesome lists of open source software.

https://github.com/benjamin-dcs/file-plusplus

The File++ integration allows storing large, multi-line notifications in a file or setting up a sensor based on a file’s (multi-line) content.
https://github.com/benjamin-dcs/file-plusplus

hacs-integration homeassistant homeassistant-custom-component

Last synced: about 1 year ago
JSON representation

The File++ integration allows storing large, multi-line notifications in a file or setting up a sensor based on a file’s (multi-line) content.

Awesome Lists containing this project

README

          

# File++
Based on the Home Assistant Core Integration [`File`](https://www.home-assistant.io/integrations/file/), I created a custom version that reads and writes **multi-line** content.

**Use case examples:**
- Store and read data larger than 255 characters
- Load email HTML templates
- Store large AI/ChatGPT responses
- ... and much more!

**Features:**
- Use the `notify` service to write multi-line content to a local file. If a file already exists, its content will be erased and the new content will be stored
- Use the `sensor` service to read multi-line content from a local file. The content is available in the `content` attribute of the sensor.

**Removed:**
- State of the `sensor` no longer holds the content of the file. Shows 'Ok' (for now :) ).
- No header is written to empty/new files

**Notes:**
- ⚠︎ I have **not** limited the size of the filesize for the `sensor` service. On a dev setup I successfully read the 10M ([Studenten Net Twente FTP](https://ftp.snt.utwente.nl/pub/test/)) file. The 1000M ended up in a crash-reboot loop from HA.

# Installation

## Install via HACS (recommended)
[![Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.](https://my.home-assistant.io/badges/hacs_repository.svg)](https://my.home-assistant.io/redirect/hacs_repository/?owner=benjamin-dcs&repository=file-plusplus&category=Integration)

## Manual install
1) Download the latest release of the File++ from this repository;
2) In Home Assistant, create a folder `config/custom_components`;
3) Add the File++ files to the `custom_components` folder (you should end up it with a `config/custom_components/file_plusplus` folder);
4) Restart Home Assistant;
5) Add a File++ entity as an Integration in Home Assistant `(menu: settings -> devices & services -> add integration)`;

For updates, repeat step 1 to 4. Home Assistant will not delete any configuration.

# Configuration
Configuration is done the same as the Home Assistant Core Integration [`File`](https://www.home-assistant.io/integrations/file/)

# Support
Buy Me A Coffee