GithubHelp home page GithubHelp logo

jaynewstrom / home_assistant_integration Goto Github PK

View Code? Open in Web Editor NEW

This project forked from openepaperlink/home_assistant_integration

0.0 0.0 0.0 1.35 MB

Home assistant Integration for the OpenEPaperLink project

License: Apache License 2.0

Shell 1.04% Python 98.96%

home_assistant_integration's Introduction

OpenEPaperLink integration for Home Assistant

Home Assistant Integration for the OpenEPaperLink project

Feature Request and code contributions are welcome!

Functionality

Sensors

Every sensor of the tags is exposed in Home Assistant. Every tag and the AP is exposed as a device.

Services

drawcustom

This Service call draws a image local in home assistant, and will send it to the EPaper AP afterwards. To not draw the inside of the rectangle use null as the fill color value.

Example Call:

service: open_epaper_link.drawcustom
target:
  entity_id:
    - open_epaper_link.0000021EC9EC743A
data:
  background: white
  rotate: 270
  ttl: 300
  payload:
    - type: rectangle
      outline: red
      fill: white
      width: 5
      x_start: 10
      y_start: 10
      x_end: 185
      y_end: 240   
    - type: line
      fill: red
      width: 3
      x_start: 0
      y_start: 237
      x_end: 196
      y_end: 240  
    - type: text
      value: "Hello World!"
      font: "ppb.ttf"
      x: 0
      "y": 0
      size: 40
      color: red
    - type: icon
      value: account-cowboy-hat
      x: 60
      y: 120
      size: 120
      color: red

Supported payload types, see drawcustom payload types

Download Image (deprecated, use drawcustom for more options)

Download an image from the provided url and if required, resized it for the esl it should be displayed on.

This requires that the esl has checked in once before fo Home Assistant knows the hardware type of it so if this service fail, wait 10 to 20 minutes.

5 Line Display (deprecated, use drawcustom for more options)

Displays 5 (or up to 10) lines of text on a small 1.54" esl. If a text line contains a newline (\n), it will be split in 2 lines. Only works on 1.54" M2 displays.

4 Line Display (deprecated, use drawcustom for more options)

Displays 4 (or up to 8) lines of text on a 2.9" esl. If a text line contains a newline, it will be split in 2 lines. Only works on 2.9" M2 displays.

Example Service Call

Go to Developer Tools, Services, select the OpenEPaperLink: 4 Line Display service and paste the below in to the YAML editor. Replace the sensor names in curly brackets with values from your own system. Note that floats work better when rounded and that all numbers work better when converted to strings.

service: open_epaper_link.lines4
target:
  entity_id:
    - open_epaper_link.0000021EDE313B15
data:
  line1: " Time: {{ states('sensor.time') | string }} " 
  line2: " LR Temp: {{ state_attr('climate.living_room_2','current_temperature') | string }} C " 
  line3: " Yest. Elec {{ state_attr('sensor.electricity_yesterday_previous_accumulative_consumption','total') | round(2) | string }} kWh " 
  line4: "Car: {{ states('sensor.car_state_of_charge') | int | string }} % / {{ ((states('sensor.id_3_pro_performance_range')) | float / 1.609344) | int | string }} miles  {{ states('sensor.bins') }}  " 
  border: r 
  format1: mbbw 
  format2: mrbw 
  format3: lbrw 
  format4: mwrb

If a template with a numeric sensor value still does not work, try appending a non-numeric string (can't be a blank string or just a space) e.g.

" {{  (states('sensor.car_range') | float / 1.609344 ) | int }} mi "

Installation

If you use HACS:

  1. Click on HACS in the Home Assistant menu
  2. Click on Integrations
  3. Click the EXPLORE & DOWNLOAD REPOSITORIES button
  4. Search for OpenEPaperLink
  5. Click the DOWNLOAD button
  6. Restart Home Assistant

Manually:

  1. Copy open_epaper_link folder from latest release to custom_components folder in your config folder
  2. Restart Home Assistant

Configuration

Adding OpenEPaperLink to your Home Assistant instance can be done via the user interface, by using this My button:

image

Manual configuration steps

If the above My button doesn’t work, you can also perform the following steps manually:

  1. Browse to your Home Assistant instance
  2. In the sidebar click on Settings
  3. From the configuration menu select: Devices & Services
  4. In the bottom right, click on the Add Integration button
  5. From the list, search and select “OpenEPaperLink”
  6. Follow the instructions on screen to complete the setup

home_assistant_integration's People

Contributors

jonasniesner avatar hhansen06 avatar jonasc avatar muddyrock avatar jterrace avatar plasticrake avatar chunkysteveo avatar jhbruhn avatar gil04 avatar svenove avatar rohankapoorcom avatar deltacore avatar gertlind avatar armenghazaryan avatar abultman avatar derflob avatar ivancea avatar jwoglom avatar pieterboeren avatar viper5000 avatar scottpopplewell avatar secretowo avatar therealmrsteel avatar g4bri3ldev avatar kvandt avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.