Giter Club home page Giter Club logo

Comments (3)

CoMPaTech avatar CoMPaTech commented on September 23, 2024 2

Thats because they only update on 'bluetooth connect' now ... if you change the update_interval of both sensors accordingly (from never to 500s for example) you will get updates

  - platform: ble_client
    ble_client_id: idasen_desk
    id: desk_height
    (...)
    update_interval: 500s

from esphome-idasen-desk-controller.

fabiosoft avatar fabiosoft commented on September 23, 2024

Here is my yaml

esphome:
  name: deskcontrol
  libraries:
    - "ESP32 BLE Arduino"

esp32:
  board: esp32dev
  framework:
    type: arduino

logger:
api:
ota:
wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  ap: {}
captive_portal:
time:
  - platform: homeassistant
    id: homeassistant_time

###### DESK IDASEN #######
external_components:
  - source: github://j5lien/[email protected]
idasen_desk_controller:
    # Desk controller bluetooth mac address
    # -----------
    # Required
    mac_address: "f5:45:f6:3d:53:12"
    # Use bluetooth callback to update sensors and cover entities
    # Deactivate this option when data are not correctly updated when using the cover entity
    # -----------
    # Optionnal (default true)
    bluetooth_callback: true

cover:
  - platform: idasen_desk_controller
    name: "Desk"

sensor:
  - platform: idasen_desk_controller
    desk_height:
      # Height in cm
      name: "Desk Height"
      # Millimeter precision
      accuracy_decimals: 1
      
binary_sensor:
  # Desk bluetooth connection
  - platform: idasen_desk_controller
    name: "Desk Connection"
    type: CONNECTION
  # Desk moving status
  - platform: idasen_desk_controller
    name: "Desk Moving"
    type: MOVING

from esphome-idasen-desk-controller.

CoMPaTech avatar CoMPaTech commented on September 23, 2024

Can't seem to get an event to trigger an automation, but having the above in at least provides some information. If you want a manual button you can use something like the below in addition to have a manual refresh, but I really think the current_operation data isn't moving across (I do see it in the code, but I do not get any events or state changes if I move the desk). I'm fine with lower update rates, but if you feel like hitting a button, that would work also:

button:
  - platform: template
    name: Update Desk Information
    id: update_desk_data
    on_press:
        # Update desk height and speed sensors on button press
        - lambda: |-
            id(desk_height).update();
            id(desk_speed).update();

from esphome-idasen-desk-controller.

Related Issues (20)

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.