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.
- Host: GitHub
- URL: https://github.com/benjamin-dcs/file-plusplus
- Owner: benjamin-dcs
- Created: 2024-10-01T18:54:02.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-08T14:28:13.000Z (about 1 year ago)
- Last Synced: 2025-06-08T06:36:38.692Z (about 1 year ago)
- Topics: hacs-integration, homeassistant, homeassistant-custom-component
- Language: Python
- Homepage:
- Size: 75.2 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
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)
[](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/)
