All Projects → sopelj → hass-ember-mug-component

sopelj / hass-ember-mug-component

Licence: MIT license
Ember Mug Integration for Home Assistant

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to hass-ember-mug-component

read your meter
Home Assistant sensor to read water meter
Stars: ✭ 27 (-25%)
Mutual labels:  hacs, custom-component
openrgb ha
OpenRGB integration for Home Assistant
Stars: ✭ 40 (+11.11%)
Mutual labels:  hacs, custom-component
plugwise-beta
Custom-component / development version of the Plugwise Home Assistant platform
Stars: ✭ 23 (-36.11%)
Mutual labels:  hacs, hacs-integration
hagooglewifi
Home Assistant integration for Google Wifi systems.
Stars: ✭ 65 (+80.56%)
Mutual labels:  hacs, custom-component
ha-zoom-automation
Custom Home Assistant component for Zoom. Tracks when you are connected to a Zoom call by default but may allow you to track more.
Stars: ✭ 47 (+30.56%)
Mutual labels:  hacs, custom-component
home-assistant-frigidaire
Custom component for the Frigidaire integration
Stars: ✭ 11 (-69.44%)
Mutual labels:  hacs, custom-component
ledfxrm
Custom Integration for Home Assistant to control a any (local/remote) LedFX-server - State: beta
Stars: ✭ 31 (-13.89%)
Mutual labels:  hacs, custom-component
ltss
Long time state storage (LTSS) custom component for Home Assistant using Timescale DB
Stars: ✭ 34 (-5.56%)
Mutual labels:  hacs, custom-component
home-assistant-p2000
🚒 This component tracks P2000 emergency events in The Netherlands.
Stars: ✭ 45 (+25%)
Mutual labels:  hacs, custom-component
ha-eskom-loadshedding
Fetches loadshedding data from Eskom
Stars: ✭ 48 (+33.33%)
Mutual labels:  hacs, custom-component
ad-ench
👩‍⚕️🔋 AppDaemon entity check app. Currently supports battery level, unknown/unavailable states, stale entities
Stars: ✭ 24 (-33.33%)
Mutual labels:  hacs
home-assistant-flair
Custom component for Home Assistant Core for Flair pucks, vents, rooms, structures, and minisplits
Stars: ✭ 51 (+41.67%)
Mutual labels:  hacs
atomic-calendar-revive
An advanced calendar card for Home Assistant Lovelace.
Stars: ✭ 218 (+505.56%)
Mutual labels:  hacs
fullscreen-card
Make your Home Assistant browser fullscreen with one tap.
Stars: ✭ 23 (-36.11%)
Mutual labels:  hacs
hacs-hubitat
A Hubitat integration for Home Assistant
Stars: ✭ 126 (+250%)
Mutual labels:  hacs
balboa homeassistan
Balboa spa integration for home-assistant
Stars: ✭ 21 (-41.67%)
Mutual labels:  hacs
alarmdotcom
Custom component to allow Home Assistant to interface with Alarm.com
Stars: ✭ 90 (+150%)
Mutual labels:  hacs
ps-date-countdown
A python script for Homeassistant that counts down the days to birthdays, anniversaries etc
Stars: ✭ 21 (-41.67%)
Mutual labels:  hacs
MeteoalarmCard
Meteoalarm, Météo-France and DWD severe weather warnings card for Home Assistant Lovelace UI ⛈️
Stars: ✭ 48 (+33.33%)
Mutual labels:  hacs
Squeeze-and-Recursion-Temporal-Gates
Code for : [Pattern Recognit. Lett. 2021] "Learn to cycle: Time-consistent feature discovery for action recognition" and [IJCNN 2021] "Multi-Temporal Convolutions for Human Action Recognition in Videos".
Stars: ✭ 62 (+72.22%)
Mutual labels:  hacs

Ember Mug Integration for Home Assistant

GitHub Release License hacs_badge Project Maintenance

Device View

Custom integration for the Ember Mug in Home Assistant. I only have the Ember Mug 2, but in theory it should be the same with other Ember Mugs.

The protocol is not public, so there is quite a bit of guesswork involved. @orlopau did a great job documenting some UUIDs here And had to attempt to extract the rest of them.

I can't seem to get writing to attributes working yet, but reading the data works great.

Important!

The new Home Assistant 2022.8 introduces a new Bluetooth Integration which conflicts with this integration. If version 0.3.X of this integration will work on 2022.8 as long as you to not configure the new Bluetooth integration and the new devices that use it. If you have configured it, you can delete it from Settings -> Services. I am going to explore the new integration and see if I can rewrite this one to use it. However, in the meantime they are mutually exclusive.

Installation / Setup

Add Repository

Add to HACS as custom repository:

https://github.com/sopelj/hass-ember-mug-component

And then install "Ember Mug" integration.

Preparing your Mug

The Ember Mug is very finicky. It will only maintain a connection with one device at a time. If you have previously paired it with another device (like your phone) you will need to forget it from that device and reset the mug to factory settings.

Note: This will mean you cannot use that device to connect to at the same time as Home Assistant, and it will default to initial temperature and colour settings.

To do so:

  1. Forget the Mug on ay device you previously used
  2. Hold down button on the bottom of the mug until light goes blue, then yellow anf then red
  3. It should blink red twice and goes back to white (The default colour)
  4. Then enter pairing mode again - Hold down the button until the light starts blinking blue
  5. Once home assistant successfully connects it should leave pairing mode and go back to white

Setup in home assistant

  1. Click here: Add Integration
  2. Select MAC that was found and choose next.

Or

  1. Go into Settings -> Devices
  2. Choose "Add Integration"
  3. Search for "Ember Mug"
  4. Select MAC that was found and choose next.

Note If it fails to find your mug please try resetting and entering pairing mode again before trying again.

Caveats / known issues:

  • The services to change mug values fail with a bluetooth permission error, that I can't figure out yet.
  • If you have another device paired with it like your phone it will cause it to disconnect, so you need to remove it from that device.
  • This maintains a connection to your mug which:
    • may affect battery
    • may interfere with other local bluetooth integrations as it can only maintain one connection at a time.
  • Currently, it won't work with more than one mug

Examples

Automations:

If you want to have notifications similar to the app you can do something like:

Note: If you chose a different name for you mug the sensor names may be different.

automation:
  - id: mug_filled
    alias: Mug Filled
    trigger:
      - platform: state
        entity_id: sensor.mug  # your mug entity
        from: "Empty"
        to:
          - "Filling"
          - "Heating"
          - "Cooling"
    action:
      service: notify.mobile_app_jesse_s_pixel_4a  # Mobile device notify or other action
      data:
        message: Your mug has been filled

  - id: mug_temp_right
    alias: Mug Temp is right
    trigger:
      - platform: state
        entity_id: sensor.mug
        attribute: liquid_state
        from:
          - "Heating"
          - "Cooling"
        to: "Perfect"
    action:
      service: notify.mobile_app_jesse_s_pixel_4a  # Mobile device notify or other action
      data_template:
        message: "Your mug is at the desired {{ states('sensor.mug_current_temp') }}{{ state_attr('sensor.mug_current_temp', 'unit_of_measurement') }}."

  - id: mug_battery_warning
    alias: Mug Battery Low
    trigger:
      - platform: numeric_state
        entity_id: sensor.mug_battery
        below: 20
        for:
          minutes: 10
    action:
      service: notify.mobile_app_jesse_s_pixel_4a  # Mobile device notify or other action
      data_template:
        message: "Your mug battery is low ({{ states('sensor.mug_battery') }}%)."

Lovelace

An example for what I use in my lovelace config. This uses a couple custom lovelace cards, you could do something similar with base widgets, but I've used these here (battery-state-card, lovelace-multiple-entity-row and stack-in-card)

Lovelace Example

type: custom:stack-in-card
cards:
  - type: entities
    icon: mdi:coffee
    title: Ember Mug
    show_header_toggle: false
    entities:
      - entity: sensor.mug_current_temp
        type: custom:multiple-entity-row
        name: Temperature
        show_state: false
        entities:
          - entity: sensor.mug
            name: State
          - entity: sensor.mug_current_temp
            name: Current
          - entity: sensor.mug_target_temp
            name: Target
      - type: custom:template-entity-row
        entity: sensor.mug_liquid_level
        name: Liquid Level
        unit: '%'
      - type: custom:battery-state-entity
        name: Battery
        entity: sensor.mug_battery
        charging_state:
          attribute:
            name: battery_charging
            value: true
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].